PDA

View Full Version : expression for lifespan and opacity for particles


zoc
07-17-2006, 01:36 PM
Hi everybody,
I try to make an expression for particles that do this:
I have an initial state for particles. Then i put the rate of emitter at 0.
I have a field that pass through the particles and make it move... i want that the particles has different mass and they must disappear when they arrive at a certain velocity, like ash do with wind...
so, to give a different mass I write this expression:

particleShape1.mass = rand (1, 5);

but then I think I need a runtime expression, but I don't know how to do it...
can someone help me?

thanks a lot!

drGonzo
07-17-2006, 03:20 PM
Add opacityPP and custom PP attribute called speedPP:

vector $vel = particleShape1.velocity;
float $speed = mag ($vel);
particleShape1.speedPP = $speed;

if (speedPP > 5)

opacityPP = 0;

zoc
07-18-2006, 02:38 PM
thanks!
but I think that like that the opacity go away without fade out.

What I try to do is:
create expression (ParticleShape.mass=rand(1,5)
and then this (from gnomon tutorial):

You could even have the size of the dust clumps be derived from particle mass, so that larger clumps move slower then smaller ones... you get the idea. Mass can also be controlled via a runtime expression so that mass can change based on definable conditions (i.e./mass could decrease as velocity increases so that as particles move faster they eventually accelerate at the same rate).

http://www.gnomononline.com/written.php?tutorial_id=41

really thanks a lot!

CGTalk Moderation
07-18-2006, 02:38 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.