you play the simulation, notice that the nParticles are not dissipating
into the air like smoke does. This is because the nParticles lifespan
is not yet defined.
In this lesson, you make
the nParticles disappear from the scene after they reach a specified
age by using the nParticle Lifespan attributes.
You can set the nParticle object’s size (Radius) according
to its lifespan so that nParticles decrease or increase in size
as they age.
To set nParticle Lifespan
- In the Outliner,
- In the Attribute Editor,
click the nParticle_ShapeSmoke tab.
- In the Lifespan section,
select Random range from the Lifespan Mode list.
- Play the simulation.
The nParticles now die
(disappear from the scene) shortly after they are emitted. nParticle Lifespan is
measured in seconds, meaning that at a Lifespan of
1.0, the nParticles die after one second.
- Set Lifespan to
- To add some randomization to the nParticle’s
Lifespan, set Lifespan Random to 5.
- Rewind the simulation and play it back.
The nParticles die off
more randomly, but the nParticle object is still not dense enough
to look like smoke. You can make your nParticle object denser by
increasing the nParticle Radius.
For a realistic smoke simulation, the
nParticles must gradually disperse as they rise in the air. You
can use the Radius Scale ramp to increase
the radius of nParticles as they age, which creates the effect of
smoke dispersing until it gradually disappears.
To set nParticle size
- In the Particle Size section,
set Radius to 5.0.
- In the Radius Scale section,
select the first marker in the ramp, set Selected Position to 0.016,
and set Selected Value to 0.04.
Creating a new marker
allows you to set two Selected Value and Selected
Position values. Each Selected Value specifies
a scaling value for the nParticle object's Radius attribute.
By default, ramps define a scaling value of 1, meaning that only
one mark exists on the ramp and that marker represents an attribute
scaling factor of 1. Setting a selected position to 0.5 sets per-particle
radius to half the Radius value.
- Click in the ramp to create additional
markers and set the Selected Position and Selected Value for
the new markers to the following values:
For each point in the
ramp, leave Interpolation at its default
setting of Linear.
- To map nParticle Radius to
the nParticles’ age, set Radius Scale Input to Normalized
Age is used, per-particle radius is mapped within the
range of the nParticle object’s lifespan.
- To add randomization to the per-particle
radius, set Radius Scale Randomize to 0.25.
- Play the simulation.
You can continue to adjust
the per-particle radius by adding more markers to the ramp, or optimize
the ramp values as the simulation plays back.