Gradient Position | RGBA Gradient | Particle Gradient
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.
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.
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.
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.
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.
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.
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. |
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.
Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License