View Full Version : API: Alternative Particle Cache

10 October 2006, 04:16 PM
Hello All!

I trying to write a alternative particle cache plugin, because the maya solution works only with relative paths to the project, and this doesnt work with our Pipeline.

I thougth that I can make a emitter node, and just read a cache file and set the output with values, but it is evaluated like a normal emitter, logicalli and i get a false result.

The another method works not too, i tryied to write a simpe node, that has a array attrs for position , velocity and age. It is enough to recreate a particles in maya per MEL or Expression.
But I cannot connet my output attributes direct to particleShape.pp attributes.

Any Ideas???????

10 October 2006, 04:51 PM
I've done this by breaking the dependency graph rules and having a dependency node write values to the particle arrays outside of direct connections. This is a hack, but it works pretty well.

My dependency node has a bool output attribute connected to the particleShape's visibility; this forces the dependency node to be computed every frame. The compute method then gets the MFnParticleSystem by following that connection, and you can set the various arrays through that MFn class.

CGTalk Moderation
10 October 2006, 04:51 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.