Returns a value from 0 to 1 that represents a parameter’s proportional distance between a minimum and maximum value. This function lets you increase an attribute such as Opacity from 0 to 1 linearly over a time range.
CloudShape.opacity = linstep(0,5,age);
This expression increases the per object Opacity attribute of CloudShape in equal steps from 0 to 1 for the first 5 seconds of the object’s existence. Because you created the object with the Particle Tool, the particles existence begins in the first frame of the animation.
In each subsequent frame, the linstep function returns a proportionally larger opacity value. When the age of the object reaches 5, the linstep function returns 1 for the opacity. An opacity of 1 is 100% opaque.
As the table shows, the opacity increases in linear increments for the first 5 seconds of the object’s age. At the midpoint of the specified 0 to 5 second age range, the opacity is 0.5. At 3/4 of the way between 0 and 5 seconds, the opacity is 0.75. At 5 seconds of the object’s age, opacity is 1. After 5 seconds, the opacity stays at 1.
CloudShape.opacity = linstep(5,10,age);
particleShape1.opacity = 1-linstep(0,5,age);