Jump to content
Sign in to follow this  
DaJuice

PSCALE expression

Recommended Posts

Hi again, back with another question. :D

I have a popnet that's instancing metaballs for geometry. Instead of the particles popping (bad pun) out of existence I want them to shrink to nothing at the end of their life. I'm using a Property POP to mess with the pscale attribute, and I'm trying to find an expression that will do what i described. What do I need to do so Houdini knows I want the expression to work on each particle from the time it spawns until the time it dies? Anyone have an idea how I should reference that info?

Thanks.

Share this post


Link to post
Share on other sites

Try placing two property ops and initialize the scale in the first one with the correct number you need and then in the second property op you could reduce the scale of each particle over its life with this expression:

$PSCALE - ($PSCALE*$LIFE)

If you want to start the scaling at a certain age and not from the start you could replace the $LIFE in the expression with a smooth function.

This will start to scale the particles down when they've reached 70% of their lifespan:

$PSCALE - ($PSCALE*smooth($AGE, .7,$LIFESPAN))

Hope this is what you were looking for :)

--Ronnie

smooth_interp.zip

Share this post


Link to post
Share on other sites

You da man! :D

That worked like a charm, thanks a lot! I'll try and post an animation once it's all done.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×