Using rand() on a source node in a PopNet

   2795   1   2
User Avatar
Member
3 posts
Joined: April 2008
Offline
I want to use rand() so I can bias my particles life expectancy but since the particles are not yet emitted, I do not have $PT or $ID to use as the seed. How does one get around this? I know that the lifeVariance is using the see from outside the popnet so some form or rand() is being called under the hood. Anyway to expose that so I can make a rand() call in my expression? Thanks

~Michael
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
Easiest way is to not set it in the Source POP but in an Age POP wired right after the Source POP.
Just use something like:
fit01(rand($PT), 0.5, 3)
I would recommend that you do this on the birth sub-frame for each particle. In the Source POP use the Birth Group field (do NOT set it to be persistent) and then in the Age POP set it to use that group as the source.
There's at least one school like the old school!
  • Quick Links