Friday 15 April 2011

Adding variation to per particle attributes that use ramps

Let's say you have a classic particle (not an nParticle) which will use a ramp to assign it's radiusPP.
You want to add some variation to the ramp but have each particle read a unique value and then travel up the ramp over it's lifespan as usual.

Here are the steps:

1. Create the radiusPP via the Add Dynamics Attibutes button
2. Create the ramp by right-clicking in the RadiusPP box
3. Right-click the RadiusPP box again and hold over the menu item until the second menu appears. Choose Create RadiusUPP

4. Once you have the RadiusUPP attribute, give it a random value betweek 0 and 1 via the expression editor

5. To link the UPP value to the ramp, we need to re-make the array mapper. Right-click on the RadiusPP box and delete the arrap mapper (you will want to rename or check the name of the ramp before you do this)

6. Right-click in the RadiusPP box again and click on the Create Ramp options box. Choose RadiusUPP for the input U, leave input V as Particle's Age and then choose the ramp in the Map To list.

Now each particle is going to read a value at a random point across the bottom of the ramp and then move up the ramp over it's lifetime. Now we need to add some variation to the ramp. A quick way to do this is to use the ramp's built in noise functions

No comments:

Post a Comment