nParticle objects are created with internal ramps that are automatically connected to the appropriate per-particle attribute on the same nParticle node. Internal ramps let you control the way per-particle attributes are applied to your nParticle objects and are included in the nParticleShape node's Attribute Editor.
The connection between the nParticleShape node and the internal ramps are not typical, in that they occur on the same node rather than between different nodes. For example, there are no external connections to ramp texture nodes. The connections are created when an input attribute is selected from the ramps in Scale Input list.
For example, on the Radius Scale ramp, when you select a Radius Scale Input, such as Normalized Age, the dynamic per-particle attribute is updated, and the input and output connections are made. nParticle Radius is now determined by the ramp's output and applied to particles on per-particle basis according to their normalized age.
If you select Off from the Radius Scale Input, the connections between the input and the output are broken, and if the output attribute is a dynamic attribute, it will be deleted. Be aware that the dynamic attribute is deleted even if it was originally created using the some other method, such as using Add Dynamic Attributes. You can view the Per Particle (Array) Attributes to verify which internal per particle ramps are currently being used by the selected nParticleShape node.
If you want to control these per-particle attributes using an expression, you must first delete them by setting the Input Scale attribute on the respective ramps to Off.
This section lists the nParticle internal ramps and provides examples of how to use the ramps in your nParticle simulations.
Internal ramp | Per-particle attribute | Example use |
---|---|---|
Radius Scale | radiusPP | Set input to Age so that particles decrease in size as they age. See Radius Scale. |
Collide Strength Scale | collideStrengthPP | Set input to Radius so that small particles do not collide with other Nucleus objects. See Collide Strength Scale. |
Bounce Scale | bounceScalePP | Set input to Speed so that faster moving particles have greater deflection or rebound on collision. See Bounce Scale. |
Friction Scale | frictionScalePP | Set input to Speed so that faster moving particles have less tendency to resists relative motion on collision. See Friction Scale. |
Stickiness Scale | stickinessScalePP | Set input to Radius so that larger particles have less tendency to stick to other Nucleus objects. See Stickiness Scale. |
Mass Scale | Mass | Set input to Radius so that larger particles have greater mass. See Mass Scale. |
Point Field Scale | pointFieldScalePP | Set input to Radius so that large particles attract or repel each other. See Point Field Scale. |
Opacity Scale | OpacityPP | Set input to Normalized Age so that older particles gradually fade then disappear. See Opacity Scale. |
Color | NA | Set input to RandomizedID so that particles are randomly assigned color when they are born. See Color. |
Incandescence | incandescencePP | Set input to Normalized Age so that the amount and color of light emitted from a particle decreases as the particle ages. See Incandescence. |
Viscosity Scale | ViscosityScalePP | Set input to Normalized Age so that as liquid particles age, viscosity increases, slowing the liquid’s flow as in the effect of a cooling lava flow. See Viscosity Scale. |
Surface Tension Scale | surfaceTensionScalePP | Set the input to Speed so that fast moving liquid particles remain close together, maintaining the surface to the liquid. See Surface Tension Scale. |
Internal per-particle attribute ramps work the way that other Maya ramp editors do, and they have similar controls such as Interpolation options and input selections. nParticle internal ramps have additional functionality that let you set input maximum values and randomizing scale multipliers.
On the ramp, Selected Position, which is the horizontal component, is defined by the ramp’s input value, or property to which the ramp is mapped. For example, if a ramp’s scale input is set to Normalized Age, then the far left position on the ramp represents the beginning of the nParticle's lifespan, while a Position of 1 represents the end of the nParticle lifespan.
The values, and the Interpolation type at each point define the shape of the ramp's curve. For example, for a Radius Scale ramp, at any input value between 0 and 1, the value of the curve at that point is the value that is multiplied by the Radius value. By default, the ramp has one entry, which defines a constant curve with a value of 1.
Values output from an internal per-particle ramp are also affected by the ramp's Scale Input and Input Max values. Scale Input defines the property used to map the ramp's input value, while Input Max defines the value range used by the ramp. For example, if Radius Scale Input is set to Age and Input Max is set to 50, the ramp would map radius values for particles that have an age between 0 and 50 seconds. The radius of nParticles that have an age of 50 seconds or older would be set to the radius defined by the Selected Value of the ramp's right-most position marker.