Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Maya® / Dynamics / parentId becomes unreliable when particles start to die
  RSS 2.0 ATOM  

parentId becomes unreliable when particles start to die
Rate this thread
 
64202
 
Permlink of this thread  
avatar
  • Total Posts: 6
  • Joined: 11 June 2009 05:35 PM

I have a particle shape that is emitting a second particle shape as tails for the first. The tails are inheriting their color (incandescence) from the specific particle they’re the tail for through the following command.

The problem is, many seconds after the simulation begins, once the parent particle shape has particles start to die, the colors of the tails for brand new parent particles don’t match their parent’s color, and all tails have the same color (instead of the randomly selected colors the different parent particles have.)

Here is the expression:

float $parentParticle tailParticleShape.parentId;
$command "getParticleAttr -at incandescencePP -a true parentParticleShape.pt["+$parentParticle+"]";
vector $parentColor eval($command);
tailParticleShape.incandescencePP $parentColor;

What is going on behind the scenes that causes this behavior? Any suggestions of how I can hack around this?



Replies: 0