Particle Gradient

 
 
 

Gradient Position | RGBA Gradient | Particle Gradient

Category: Particle

Shader Family: Texture

Output: Color

The Particle Gradient shader allows you to change the color and/or density of the particles based on the particle's density, age percentage, or any particle attribute you define.

The shader's parameters control the position of colors along an RGBA gradient (ramp). The gradient controls are similar to the Gradient Mixer except that they are designed for ICE particles.

For general information about ICE particle shaders, see ICE Particle Shading.

Gradient Position

The parameters on this tab allow you to specify the criteria that is driving the color gradient on the RGBA Position tab. The color gradient's position is controlled by six attributes. The first two attributes (Density, Age %) are predefined while the other four attributes (Inputs 3 - 6) can be controlled by any input shader, such as an Attribute shader or a fractal texture shader.

You can set multiple options and have their results blended together, such as using both the particle's Density and Age % to determine the color set used by the color gradient.

Per Cloud: Density

Uses the particle's density to drive the color gradient. The density increases from the rim to the center of each particle. If there are multiple particles in the same space, their density is added together.

Gradient Starts At/Ends At

Uses the colors on the gradient based on the particle density.

If the Gradient Start At value is set to 0 (particle rim), the color in the color box on the left end of the gradient control is used.

If the Gradient Ends At value is set to 1 (particle center), the color in the color box on the right end of the gradient control is used.

Intensity/Influence

Determines how the Density is weighted relative to the other attributes set on this tab.

For example, if the Density Influence is 0.6 and the Age % Influence is 0.3, then Density has twice as much influence on the final result.

Per Particle: Age %

Uses the particle's age percentage to drive the color gradient. You must define the particle's age limit in the ICE tree so that the shader can use that value to set the colors correctly — see ICE Particle Age for more information.

Gradient Starts At/Ends At

Uses the colors on the gradient based on a percentage of the particle's age.

If the Gradient Start At is set to 0 (particle birth), the color in the color box on the farthest left of the gradient control is used.

If the Gradient Ends At is set to 1 (particle death), the color in the color box on the farthest right of the gradient control is used.

For example, if the Gradient Start At value is set to 0 the color at the left end of the gradient is used at the birth of the particle. But if the Gradient Ends At value is 0.5, only half of the particle's lifetime has been reached, so the colors stop changing in the middle of the age of the particle.

Intensity/Influence

Determines how the Age % is weighted relative to the other attributes set on this tab.

For example, if the Age % is 0.6 and the Density Influence is 0.3, then Age % has twice as much influence on the final result.

Per Particle Input 3 - 6

These four inputs can use any shader to drive the color gradient. They are controlled by shaders such as ICE Attribute shaders (see Bringing ICE Data into the Render Tree with Attribute Shaders for more information) or fractal texture shaders, such as the Fractal Scalar or Cell Scalar shader.

For example, using the Vector Attribute shader, you can use the particle's velocity to drive the color gradient values so that the particles fade off or change color as they get faster. You can use any attribute that is defined for the particles in the ICE tree to drive the color gradient.

Enable Input n

Toggles the activeness of this input.

Input

The value of the input shader.

Gradient Starts At/ Ends At

Sets the start and the end of the gradient based on the attribute value.

Intensity/Influence

Determines how this Particle Input is weighted relative to the other attributes set on this tab (Density, Age %, and other Particle Inputs).

Adjust Result

Adjusts the result of the input; otherwise, add to it.

For example, say you have created a gradient that you like. Now you just want to add a little bit of variation to the gradient. With Adjust Result, you can use a new input shader, such as a fractal. The gradient on all the particles does not change much, just a bit of noise is added.

With Add, you add another shader, which has a more significant effect on the gradient.

RGBA Gradient

You can render the particle's color using an RGBA color gradient. The gradient is determined by the particle's density, age %, or by an Input that you define on the Gradient Position tab.

Evaluation Range

Minimum/Maximum

Minimum/maximum points on the gradient to evaluate for color.

Gradient

Gradient Control

The gradient slider is where you create and adjust the gradient. The bar displays the gradient left-to-right from beginning (0) to end (1).

Square markers on the bottom of the gradient bar are color markers. You can use up to 8 color markers, each with its own color. Clicking on the gradient bar inserts a color marker at the click-point. By default, the new marker assumes the color of that point in the gradient. To delete a color marker, select it and press Delete.

A round marker on the top of the gradient bar appears between each pair of color markers, indicating the mid-point in the blend between those two colors. Moving the round marker closer to either color marker causes less of that color and more of the other to appear in that area of the gradient.

For details on using the gradient controls, see Using the Gradient Controls.

Color Chip (Box)

Controls the R, G, B, and A (alpha) values for the selected color marker.

Pos

Controls the position of markers on the gradient:

Square Color Markers: If a color marker is selected, the Pos value indicates its position, on a scale of 0.00-1.00, within the entire gradient.

Round Interpolation Markers: If an interpolation marker is selected, the Pos value indicates its position, on a scale of 0.00-1.00, between its associated pair of color markers.

Cubic/Linear

Switches between linear and cubic interpolation of the gradient. Cubic interpolation results in a smoother transition between values, while linear interpolation results in sharper transitions.

Animation

Key All

Keys all current color marker values on the gradient control at this frame.

Remove Keys

Removes all keys the color markers.

Remove Shaders

Disconnects all shaders that are attached to the gradient shader parameters (markers).

Invert Direction

Applies the gradient colors in the reverse order of how they appear in the gradient slider.

Presets

Loads different types of preset color values into the gradient control to give you a head start on setting up your own gradient: Colored, Fire, Explosion, Black/White, and White/Black.

Render Tree Usage

You can plug the Particle Gradient shader into any gradient port, such as the Per Cloud or Gradient Color and Density ports of the Particle Density shader or any gradient port on any of the particle shader compounds.

The Particle Gradient shader uses input from which it generates a gradient. There are two predefined inputs set up for you (Density and Age %), but you can also use shaders connected to the shader's four Per Particle: Input (scalar) ports.

You can use any of the Attribute shaders as inputs into this shader to drive the color gradient based on almost any ICE attribute for the particles, such as their velocity, size, orientation, mass, point position, etc.