Set attributes using ramps

Some of the most dramatic effects in Maya scenes are obtained by editing object attributes with ramps or gradients. For example, you can control how color changes along the length of an object, or how opacity changes during the life of a particle.

This topic explains the standard methods for working with ramps for any attributes. Two basic ramp types are available: single value and color.

Single-value ramp

The following example of a single-value ramp is used to adjust the mass scale attribute of a particle.

Here the marker at position 0.7 (horizontally) with a value of 0.42 (vertically) is selected, and it can be dragged in any direction to modify how the attribute changes over time. Additional position markers can be added by clicking where you want them, and deleted by clicking the box along the bottom of the ramp.

To the right of the ramp (not shown) is an arrowed grey button that you can click to open the ramp in a larger window. You can resize this large window as desired.

Interpolation

This setting controls how the ramp value changes between the selected position marker and the next one, or to the end of the ramp if there is no later marker. The example shows linear transitions. The other three settings are as follows:

  • Smooth - interpolates values along a bell curve, so that each value dominates the surrounding region, then changes quickly to the next value
  • Spline - interpolates values along a spline curve, taking neighboring values into account for greater smoothness
  • None - provides no change in value moving forward

Some attributes have a choice of inputs to ramp values, as shown in the following example for changing particle radius over time:

Instead of making particle radius dependent on Normalized Age, as shown, you could set Radius Scale Input to another value, such as the speed or acceleration of the particle. Another example is with fluid opacity. By default, the Opacity Input is Density, but you could set it to the temperature or pressure of the fluid.

Color ramp

This type of ramp uses the same controls for position markers and interpolation as the single-value ramp, but the changes are shown in grayscale or color.

When a position marker is selected, you can click the Selected Color swatch to change the color, or add a texture at that point. The interpolation options are the same as for a single value ramp, but the transitions are shown as color changes instead of a line graph.

In the large window option for color ramps, an option is provided to change the window orientation from horizontal to vertical.