Jump to content
Sign in to follow this  
wiked lo

alpha of particles based on age

Recommended Posts

Is there an easy way to control the alpha of particles based upon their $AGE so that they will fade out, rather than just die?

I've created a smoke/fog POP and right now the metaballs have a poping look because they just disappeare when they die, it would be smoother to have them begin to fade out when they get to a certain age, say 2 seconds. Any suggestions?

Share this post


Link to post
Share on other sites

You can use $AGE in conjunction with the smooth() expression.

You can put the following expression into the Alpha attribute in the Point SOP. "1-smooth($AGE,2,3)"

This will return 1 (Fully opaque) when the age of the particle is less than 2 seconds old.

After 3 seconds the alpha will be completely transparent.

If the particles age is in between 2 and 3 the alpha will be smoothly interpolated.

See the attached hip for an example.

If you wanted you could add some random offset to "start fade" and "end fade" so each particle fades out at a different time and rate. Like

"1-smooth($AGE, 2+(rand($ID)/2), 3+(rand($ID+5)/2))"

LIFEpops1.zip

Share this post


Link to post
Share on other sites

Wolfwood - thanks so much. I knew I had done this before, but had a brain fart and couldn't remember the exactly code I had put in the point SOP (must be the lack of sleep). Thanks again.

Share this post


Link to post
Share on other sites

Would you please re-upload attached file ?

It was corrupted archive.

Thanks

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  

×