View Full Version : RadiusPP help please.

07 July 2008, 05:39 AM
hello, ive been breaking my head over this.Any help would be appreciated.
What im trying to do is this:
My particles have a 0 radius at birth and as they move forward in time they get a random radius between 0 and 1.
Is there a simple route to this? My creation expression has a "radiusPP=0;" at the moment but i dont know how to step forward.Thanks.

07 July 2008, 08:48 AM

you can plug in a simple ramp going from black to white in your rgbPP field.

(right-click>Create Ramp, right-click > Edit Ramp)

Now your particle radius will start at zero and end with 1...

Hope it works,


07 July 2008, 01:39 PM
Why would i plug a ramp into rgbpp? Its radiusPP that im concerned about not RGBPP :).

07 July 2008, 02:50 AM
Just key in creation expression

07 July 2008, 02:52 AM
Just key in creation expression

particleShape1.radiusPP = rand(.2,4);


In runtime expression


hope this one helps

07 July 2008, 11:43 AM
another suggestion, which will do as you describe: all particles start with radiusPP = 0 and each particle end up with a unique radiusPP somewhere between 0 and 1...

first add a couple of custom PP attributes (floats) to the particleShape. Could be called
"finalRadiusPP" and "radiusGrowthPP"

then in creation expression you write:
particleShape1.radiusPP = 0;
particleShape1.finalRadiusPP = rand(0.0,1.0);
particleShape1.radiusGrowthPP = particleShape1.finalRadiusPP * 0.01;
and in runtime expression you write:
if(particleShape1.radiusPP < particleShape1.finalRadiusPP)
particleShape1.radiusPP += particleShape1.radiusGrowthPP;

That will make the particles grow until they reach their final radius in small increments proportioned to their final radius. In other words they all end up having their final size at the same time, but you could change this of course by putting in a rand(someNumber) for the radiusGrowthPP.

CGTalk Moderation
07 July 2008, 11:43 AM
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.