TG Slope RampGradient

PARAMETERS

Steep Angle and Shallow Angle

Range : -1 to 1

(Only used if  “Use Ramp” is unchecked).

A value of -1 represents surfaces pointing away from the slope source, a value of 0 is at right angles to the slope source, and a value of 1 is pointing back toward the slope source.

Any point with an angle of less than or equal to the Steep Angle renders with the colour from the leftmost edge of the Gradient, while any point with an angle of greater than or equal to the Shallow Angle renders with the colour from the rightmost edge of the Gradient. Any point with an angle in between these two reads the colour from along the Gradient.

True Angle

Range : Unchecked / Checked

When unchecked, the shader works with the Cosine of the angle between the direction of view and the surface normal, resulting in a non-linear sweep to the values (so what you see in the Ramp isn’t exactly what you get in the render).

When checked, the shader does the extra bit of processing (so may be a little slower) in order to work back to the linear sweep of the angle between the two vectors, so moves through the Ramp values in a linear fashion.

Local Slope Point

Range : Unchecked / Checked

If unchecked, the shader uses an infinite slope source - the angle between the surface normal and a preset vector (set by the “Slope Point Position”) is calculated and used.

If checked, the shader uses a local slope source - the angle between the surface normal, and the line from a point (set by the “Slope Point Position”) is used.

Slope Point Distance

Range : 0 to 100

(Only has an effect if “Local Slope Point” is checked).

The position of the slope source in the 3D world is set using “Slope Point Position”. However, the ShaderLab colour parameters only allow for values up to (10,10,10). Using the Slope Point Distance parameter, you can multiply the values set in “Slope Point Position”, to move the point used to calculate the slope nearer or further away. Its also a handy way of shifting the slope source once you have the angle set tto your liking using “Slope Point Position”, without having to recalculate the individual x, y and z values to get the new position!

Values greater than 1 will scale the slope source further away, and values of less than 1 will scale it closer.

Slope Point Position

Range : -10 to 10 (for each of the x, y and z parameters)

When “Local Slope Point” is checked, this parameter determines the co-ordinates of the slope source’s position in the 3D (world) space. Note that if you set the position to be inside the object, this will affect the results (the points on the objects surface will be facing away from the slope source, so all of the angles will be negative). Remember that you can alter the “Slope Point Position” by using the “Slope Point Distance” parameter to move the source nearer or further away, but retaining the same relative angle between the object and the slope source.

When “Local Slope Point” is unchecked, this parameter sets the vector of the slope source (the direction the slope source is coming from). Note that since this represents a vector (direction) rather than a position in space, the slope source cannot be classed as “inside” the object (unlike when “Local Slope Source” is checked). Also, the “Slope Point Distance” will have no effect (it simply makes the vector longer, but it still represents slope source coming in from the same angle).

Overall Noise Frequency

Range : 0 to 500

Sets the overall frequency for the noise, scaling it in all directions equally. Higher values will mean squash the noise pattern, while lower values will stretch the noise pattern.

Noise Type

Range : 0, 1 or 2

Sets the type of noise to be used - 0 is Perlin, 1 is Classic, and 2 is Sparse.

Min, Max, Octaves

Range : -100 to 100 for each of the x, y and z.

This sets the parameters for the noise, which affects the boundaries between the colours.

The first part sets the Minimum shift, which causes the noise to shift the Shallow Colour toward the Steep Colour. Lowering this value below zero will make the Shallow Colour shift toward the Steep Colour, increasing the amount of Steep Colour in the result.

The second part sets the Maximum shift, which causes the noise to shift the Steep Colour toward the Shallow Colour. Raising this value above zero will make the Steep Colour shift toward the Shallow colour, increasing the amount of Shallow Colour in the result.

When both Minimum and Maximum shift are set to 0, the noise has no effect on the result, and the noise processing is turned off to optimize the speed of the shader.

Use the Minimum and Maximum shift to control the noise effect at the boundaries between the colours. If you keep them equivalent (so that the Minimum shift is equal to the negative of the Maximum shift), this keeps the boundary at the same location, but increases the strength of the noise.

The third part controls the Octaves of the noise. Higher values result in more detail in the noise pattern (but will result in the shader rendering more slowly). There is little visible effect in increasing the Octaves above a value of 4 or so. Note that Octaves only responds to whole numbers - for example, a value of 2.5 will give the same result as a value of 2.

Noise Frequency

Range : -100 to 100 for each of the x, y and z.

Sets the frequency for the noise in the x, y and z directions independently. Use this to stretch or squash the noise in certain directions.

Use Ramp

Range : Unchecked / Checked

If unchecked, the “Steep Angle” and “Shallow Angle” settings are used, to provide basic control over the way the shader reads through the Gradient.

If checked, the Ramp is used to control how the shader reads through the Gradient.

Slope Ramp Image

Range : Image

Used to control the transition points in colours dependent on angle of view.

Black represents the left edge of the Gradient image, white represents the right edge of the Gradient Image.

The left edge of the Ramp is read by surfaces pointing directly away from the slope source, while the right edge of the Ramp is read by surfaces pointing straight back at the slope source.

Slope Ramp Gradient

Range : Image

Used to control the colours dependent on the values in the Ramp image.

The leftmost edge of the Gradient image is read for black in the Ramp image, and the rightmost edge of the Gradient image is read for white in the Ramp image.

TG Slope RampGradient Intro

TG Slope RampGradient Parameters

TG Pack 3 Index