Change in Life Expectancy affecting $LIFE

   3356   3   2
User Avatar
Member
7 posts
Joined: March 2013
Offline
I have an expression on a property node under Uniform Scale: (0.25 + ($LIFE * 50)) and my particles are simulating exactly how I want them too. However, I just changed the Life Expectancy of my particles from 100 to 4. Doing so drastically changed $LIFE thus making my particles scale up uncontrollably. Is there some math that I can do to my Uniform Scale expression to return my particles to the way they were before without having to just tweak the numbers until it looks good again?
Kelly Eckstein

Student at CG Masters School of 3D Animation and Visual Effects
User Avatar
Member
8554 posts
Joined: July 2007
Offline
I assume you are talking about old POPs
$LIFE s normalized age from 0-Lifespan range to 0-1
so
$LIFE = $AGE/$LIFESPAN
and because you have changed lifespan (Life Expectancy) from 100 to 4 it will affect the point scale drastically as it delends in $LIFE
to keep your math independent of lifespan it's better to base it on $AGE (which is life in seconds, not normalized to the lifespan)
so for your case you want the value returned by $LIFE to be the same for both cases
your $LIFE value was $AGE/100 so just replace the Uniform Scale expression with that
(0.25 + ($AGE/100 * 50))
which equals ==>

0.25 + $AGE/2

and it should be the same as original no matter how you change the lifespan
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
What Tamte said but here's an exact get 'er done conversion:

(0.25 + (($LIFE * 4/100) * 50))


Ratios are easy to remember if you go “final / initial” so final is 4 and initial was 100 giving 4/100 multiplied by your variable.

btw if you are using new POPs in DOPs and have the POP Property DOP, it would be:

pscale = (0.25 + (@nage * 4/100) *50);

@nage is what $LIFE was.

—-

+1 vote for using $AGE in old POPs or @age in POPs in DOPs as it is immune to changes in lifespan.
There's at least one school like the old school!
User Avatar
Member
7 posts
Joined: March 2013
Offline
Much thanks to both of you. Works like a charm
Kelly Eckstein

Student at CG Masters School of 3D Animation and Visual Effects
  • Quick Links