From RealMotion Wiki

Image Processing/Filters/Gradient

Calculates the gradient of an input. ​


The Gradient box calculates the gradient of an input texture using three different types of filter (Robert, Prewitt, Sobel).

Note that the outputted values can be negative and the multiplier allows modulations of each channel. Therefore, the inputted texture format must be in the RGBA 16 bits. If not, the texture will be converted automatically.

In Du/Dv mode:
- Red Channel expresses the derivative of each pixel along the U axis.
- G Channel expresses the derivative of each pixel along the V axis.
- B Channel expresses the calculated height map.
- Alpha Channel always equals 1.0 or 255 depending on the texture format.

In Normal Map mode:
- The result expresses the normalized RGB vector where B equals 1.0 or 255 (depending on the texture format) and where A equals the heightmap value.

For more information about gradients, see the Wikipedia about Gradient .
For more information about heightmaps, see the Wikipedia about Gradient .


Texture 2D Texture Receives the texture to be processed. The texture format must be in the RGBA 16 bits to allow negative vector calculation. If not, the texture wil be converted automatically .


Texture 2D Render Target Outputs the processed texture.


Gradient Filter String Uses the Roberts, Prewitt or Sobel filter.
Enable Multiplier Toggle Activates the multiply function.
Multiplier Float4 Sets the float4 factor multiplying with each of the RGBA channels of the gradient texture.
Selected Output Mode String Chooses between the Du/Dv mode or the generation of a full normal map with initial heightmap within the alpha channel.

See Also

Boxes related

Paint, Threshold, Velocity, Format, Get Channel, Accumulate, Fluid Sim, Particle System 2D, Particle System 3D, Wave Sim, ​​

Version Information

Current documentation version: 2.1.0. ​ ​