Software:
Unreal Engine 4.24
Having to remap a value range is very common in designing shaders, whether it’s to perform a traditional “levels” operation on a texture, or use just a specific range of values in a float input.
The RemapValueRange node let’s us do just that. this node has 5 inputs:
- Input: The input value
- Input Low: Input mapping range minimum
- Input High: Input mapping range maximum
- Target Low: Output range minimum
- Target Height: Output range maximum
Mono Noise examples:
- The original noise pattern:
- Mapping input 0 -> 1 to output 0 -> 1 obviously has no effect:
- Mapping input 0 -> 1 to output 0.3 -> 0.7 reduces the pattern contrast:
- Mapping input 0.3 -> 0.7 to output 0 -> 1 increases the pattern contrast:
- Mapping input 0 -> 1 to output 1 -> 0 inverts the pattern:
In this example RemapValueRange nodes are applied to a texture’s individual color channels to increase contrast (Levels):
> Note that this operation can be performed using a simpler graph by using float3d adding and multiplication operations on the texture color (this will be a subject for a different post)
> Note that a different remapping operation can be performed on each color channel of a texture to adjust its color balance.
After the value remapping tha value in each channel 0.1 -> 0.9 to 0.0 to 1.0:
The same operation performed by multiplication by 1.2 and subtracting 0.1: