Reference Material Manager Shaders Channel Shaders Gradient Shader

Gradient Shader

Basic Shader

Shader Properties

Gradient

To access additional gradient parameters, click the triangle next to the gradient.

The knots or handles below the gradient are used to set the color and position of colors in the gradient. To add a knot, click in an empty area below the gradient and a knot of the color at that position will be added. To remove a knot, drag and drop it away from the gradient. To change the color of a knot, doubleclick it and use the system color chooser that opens to pick the desired color. The diamond shapes on the gradient are bias handles and these pull the interpolation of the color knots from side to side for more control over how the gradient changes.

Interpolation

Cubic Knots

Interpolates the knots with a CatMull - Rom interpolation while using the bias handles to offset the interpolated value (good for several knots).

Cubic Bias

Uses a Bezier interpolation algorithm to interpolate between the knot previous to the sample point, a weighted bias to the left, a weighted bias to the right, and the knot to the right of the sample position (good for few knots and accurate control).

Smooth Knot

Uses a SmoothStep function to weight an interpolation between the knot to the left of the sample point and the knot to the right of the sample point. It uses the bias handles to offset the interpolated value.

Linear Knot

Uses a BoxStep function to weight an interpolation between the knot to the left of the sample point and the knot to the right of the sample point. It uses the bias handles to offset the interpolated value.

Linear

Linear falloff/growth between the knots. No bias handles.

Exponent Up/Down

Exponential gain/loss between knots. No bias knots.

None

Uses the color of the knot to the left of the sample point.

Pos

The position of the currently selected knot or bias handle on the gradient. You can type a value into the box or drag the up/down arrows at the right to move the currently selected knot or bias handle.

Intensity

A measurement for the intensity of the currently selected knot.

Context menu for gradients

To access the context menu for gradients, right-click (Windows) or Command-click (Mac OS) the gradient. You’ll find three commands on this menu.

Invert Knots reverses the direction of the gradient.

Double Knots doubles the number of knots.

Reset sets the gradient to a uniform white color with no knots.

Type

The type of gradient to be created.

Clockwise: 2D - U, 2D - V, 2D - Diagonal, 2D - Radial, 2D - Circular, 2D - Box, 2D - Star, 2D - Four Corner

Cycle

When you are editing UVs, sometimes the UVs can become much larger than the original texture. Enable this option to tile the shader.

Start [XYZ ]

For 3D gradients, this defines the start point of the gradient. For 3D Cylindrical, this is the start of the center vector.

End [XYZ ]

For 3D gradients, this defines the end point of the gradient. For 3D Cylindrical, this is the end of the center vector.

Radius [-10000000..10000000]

For 3D Spherical and 3D Cylindrical, this is the radius of the gradient from the center.

Turbulence [0..100%]
Octaves [0..10]
Scale [0..10000000%]
Frequency [-10000000..10000000]

Turbulence values greater than 0 switch on the Noise shader. The Octaves, Scale and Frequency parameters will then become available, which are standard noise parameters.

Turbulence set to a low value (left) and a high value (right).

Octaves set to a low value (left) and a high value (right).

Scale set to a low value (left) and a high value (right).

A Frequency value greater than 0 animates the noise with undulations.

Angle [-10000000..10000000°]

Rotates the entire color gradient.

Absolute

If this option is enabled, the gradient refers to the turbulence only, not to the entire texture.

Absolute disabled (top) and enabled (bottom).

Space

For 3D gradients, this defines space that the gradient is calculated in.

Texture

The gradient is calculated in object space and remains the same regardless of object position or orientation and takes into account the projection modifications of the Texture tag.

Object

The gradient is calculated in object space and remains the same regardless of object position or orientation, but does not use the attributes of the Texture tag.

World

The gradient is calculated in world coordinates and is not affected by the objects orientation or position. This allows the object being shaded to move through the gradient.

Camera

The gradient is calculated in the space of the camera and will stay oriented relative to the camera. The object can move through the gradient, and camera moves will also affect the gradient.

Screen

The gradient is calculated in the space of the screen including Z depth. The object can move through the gradient, and camera moves will also affect the gradient.

Raster

The gradient is calculated in screen pixels and has no depth information, so no matter how far the object gets away, the texture is calculated in the same way. The object can move through the gradient, and camera moves will also affect the gradient.

Return to CINEMA 4D Index