Caching particles imported using Houdini engine to Maya, so as to use on other machines without Houdini engine.

   3105   10   4
User Avatar
Member
4 posts
Joined: March 2017
Offline
Hi

Just started using Houdini engine for Maya and need help with finding a way to disconnect the Houdini asset after its in my scene in Maya so i can use the scene on other machines running Maya without Houdini engine.
I have imported a Houdini read node into Maya 2016 and attached a particle sim from Houdini as a bgeo.sc
I was wondering if there was a way to do this. I have tried creating an alembic but that wont work. Tried to cache the sim but that didn't seem to do it either.

Any suggestions?

P.S. Sorry if this has already been answered, I searched about it but couldn't find any info hence posted.
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
The Maya plugin imports the Houdini particles as a standard Maya nParticle, so Maya's built-in nParticle cache would work on the imported particle. This essentially converts the .bgeo cache into Maya's own caching format. You can then attach Maya cache to a nParticle without needing Houdini Engine.

Note that when you use Maya's nParticle cache to cache the Houdini Engine nParticle, Maya will likely print out an error at the end saying it can't attach the cache to the nParticle. This is because the nParticle is connected by Houdini Engine. The caching has actually been completed at this point, so it's safe to ignore the error.

If you have custom point attributes on the particle, Maya would also cache them. However, when you attach the Maya cache onto a nParticle, you have to manually create the equivalent per-particle attributes on the nParticle. Otherwise, Maya wouldn't read in per-particle attributes. The easy way to have all the per-particle attributes imported is to duplicate the nParticle node that was created by the Maya plugin, since that nParticle node contains all the necessary per-particle attributes. Then, attach the nCache onto the duplicated particle.
Andrew / アンドリュー
User Avatar
Member
4 posts
Joined: March 2017
Offline
Thank you so much for the detailed response. This makes total sense as I got the error you mentioned, I will try this out.

Cheers
S
User Avatar
Member
29 posts
Joined: May 2006
Offline
awong
The Maya plugin imports the Houdini particles as a standard Maya nParticle, so Maya's built-in nParticle cache would work on the imported particle. This essentially converts the .bgeo cache into Maya's own caching format. You can then attach Maya cache to a nParticle without needing Houdini Engine.

Note that when you use Maya's nParticle cache to cache the Houdini Engine nParticle, Maya will likely print out an error at the end saying it can't attach the cache to the nParticle. This is because the nParticle is connected by Houdini Engine. The caching has actually been completed at this point, so it's safe to ignore the error.

If you have custom point attributes on the particle, Maya would also cache them. However, when you attach the Maya cache onto a nParticle, you have to manually create the equivalent per-particle attributes on the nParticle. Otherwise, Maya wouldn't read in per-particle attributes. The easy way to have all the per-particle attributes imported is to duplicate the nParticle node that was created by the Maya plugin, since that nParticle node contains all the necessary per-particle attributes. Then, attach the nCache onto the duplicated particle.

Hi Andrew,

I followed your instructions to the letter, the nparticles cache is created on disk,
however upon attaching the nparticles cache to the duplicated nparticles transform node nothing appears when scrubbing in the viewport. I get the following warning I suspect might be related:

// Warning: file: CProgram Files/Autodesk/Maya2018/scripts/others/doImportCacheFile.mel line 99: Channel names did not match selected objects. Using channel houdini_engine_particles_v0011_0Shape_id on object houdini_engine_particles_v0011_1Shape. //

I'm on windows7 maya 2018, houdini engine 16.5.405
Many thanks
Luca
Edited by lucavfx - June 1, 2018 19:26:16
http://www.lucavfx.com [lucavfx.com]
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
lucavfx
I followed your instructions to the letter, the nparticles cache is created on disk,
however upon attaching the nparticles cache to the duplicated nparticles transform node nothing appears when scrubbing in the viewport. I get the following warning I suspect might be related:

// Warning: file: CProgram Files/Autodesk/Maya2018/scripts/others/doImportCacheFile.mel line 99: Channel names did not match selected objects. Using channel houdini_engine_particles_v0011_0Shape_id on object houdini_engine_particles_v0011_1Shape. //

Hm, here are a few things I can think of that you can check/try:

1. Take a look at the cached files, and make sure the file sizes do look like sensible. For example, the file size shouldn't be too small (less than a few kilobytes would be too small).

2. Before exporting the cache, do a sync to make sure the nParticle node has the exact same set of per-particle attributes that your asset is outputting. There might be issue if your asset is actually outputting less attributes than your nParticle is expecting. Otherwise, the nParticle node would have attributes with no data, and I'm not sure how nCache would react to that.

3. I wonder if some per-particle attributes are causing issues during nCache export. The simple way to test this is to try removing all the point attributes in the asset itself. This means the particle should have no other attributes except P. Then, in Maya, redo the sync, export cache, and attach cache steps. If this works, then there's likely some attributes on the particle that's causing issues with nCache.

4. If there's no particles in the beginning of the simulation, try exporting the cache from a frame that has particles. (I don't expect this to be an issue, but worth trying just to be sure.)
Andrew / アンドリュー
User Avatar
Staff
135 posts
Joined: Oct. 2017
Offline
When exporting the cache from the imported nParticle shape, you also have some control over which channels to export - if you look in the cache tab on the nParticleShape - you have some choice over which channels to export - the default is “all” which includes any custom attributes that came in from houdini - but if you chose one of the other options, depending what you need, either “Dynamics and Rendering”, “Position and Velocity” or “Position”, then the extra houdini attributes will not be cached. (Note that all the options include the id, count, and lifespan/age related attrs as well)

Look at the xml header for the cache to see what attributes are cached, and then if you want use the
Modify->addAttribute GUI to add non-maya standard attrs that came from houdini. You can also see what the frame range is for the cache on the xml header to see if the cache range overlaps the frames you are looking at,

The warning that you got just indicates that you're trying to apply a cache that was generated for an nParticle system with a with different name - by itself it's just a warning - if there were no other problems, the cache would still attach.
Edited by juliap - June 4, 2018 12:38:10
User Avatar
Staff
135 posts
Joined: Oct. 2017
Offline
Start Frame for both the original sim and the cache are also important. If the houdini sim start frame is after the time slider start, or after the frame you wish to start caching at, make sure you go to the actual sim start frame, sync the asset, and then rewind and cache, otherwise the output nParticle may not be constructed properly.

Starting your cache after the houdini sim start frame can also be problematic - it's better to make sure that you start nCaching at or before the houdini sim start frame, and that the start frame on the nucleus node is at or before the frame you wish to start caching at.

How did you construct the new nParticle shape that you wish to attach the cache to? If you just did createNode, or if you did duplicate with the wrong options, you could end up with no time connection or nucleus connection and it will not play back. The easiest way to make sure you have a valid nParticleShape to attach the cache to is go to the nParticles menu, create emitter, and then delete just the emitter.
User Avatar
Member
29 posts
Joined: May 2006
Offline
Many thanks for the useful pointers.

After trial and error I found out what I was doing wrong:

When duplicating the nParticle transform-shape the new nParticle shape was left without a nucleus solver.

Attaching the newly created nParticles shape to a new solver did the trick.

Many thanks
http://www.lucavfx.com [lucavfx.com]
User Avatar
Member
2 posts
Joined: Jan. 2017
Offline
Hi,

I found all of this information very useful and I thank you for it,it really helped me.

I'm doing a project where I create some particles in Houdini and I'm adding rotation with pop spin and converting the orient to rotationPP for Maya to read it.

My problem is that when I export the Digital Asset from Houdini and then load it in Maya with Engine, it some times seems to work just fine and everything works perfectly but sometimes it just creates empty groups with the last one being called “emptypart” and no nParticle nor nucleus objects created.

I've exported the sim several times from a file sop and a file obj. And it just seems kinda random when it works and when it doesn't. And when I open the asset with Houdini the particles are there.

I'm using Houdini 16.0.504
And Maya 2016

I hope I can get some help.

Thanks again guys!
Luis Moya
User Avatar
Staff
135 posts
Joined: Oct. 2017
Offline
I have hit this kind of problem if the frame that you initially create the asset at is before the houdini start frame of the sim. It has to sync at a frame where a non zero number of particles exist in the houdini output or it will not create an output particle system. If this is the problem you are encountering, then setting the maya time to a frame where you know that particles exist, sync, rewind and playback should work.
User Avatar
Member
2 posts
Joined: Jan. 2017
Offline
juliap
I have hit this kind of problem if the frame that you initially create the asset at is before the houdini start frame of the sim. It has to sync at a frame where a non zero number of particles exist in the houdini output or it will not create an output particle system. If this is the problem you are encountering, then setting the maya time to a frame where you know that particles exist, sync, rewind and playback should work.


Thanks!! That actually worked!

It was the fact thet I was importing the HDA from frame 0 which has 0 particles, I just moved to the frame where the particles actually appeared and it worked.

Thanks man.
  • Quick Links