Displace
Distort image using another image as a map.
Node Data | |
---|---|
FilterArray | |
Display name | |
Displace | |
Internal name | |
Node_Displace | |
Inheritances | |
node | |
node_processor | |
node_displace | |
Inputs | |
node_displace | |
surface |
Surface In |
surface |
Displace Map |
vec2 |
Position |
float |
Strength |
float |
Mid Value |
enum |
Mode |
bool |
Iterate |
enum |
Oversample Mode |
surface |
Mask |
float |
Mix |
bool |
Active |
enum |
Blend Mode |
toggle |
Channel |
surface |
Strength Map |
bool |
Separate Axis |
surface |
Displace Map 2 |
Outputs | |
node_displace | |
surface |
Surface Out |
Displace node distort an image based on a displacement map.
Displacement
Displacement refers to the shifting of pixels. A shifting can be uniformly applies to the entire surface, which will simply move the image. By using the Displace Map you can control the shifting amount to make the effect more interesting.
Mode property control how the displacement amount is being calculated.
Linear
When using linear mode, you can set the Position to control the direction you want the displacement to happen. The displacement map will be use to scale that position vector.
Vector
In vector mode, the red and green channel will be used to calculate the displacement in x and y axis respectively.
Angle
In angle, the red and green channel will use to calculate direction and distance of the displacement. The direction starts with 0 means toward the right and goes counter-clockwise.
Gradient
Gradient mode will distort the image down the slope of the displace map brightness.
Separate Axis
For vector and angle mode which use red and green channel, you can check the Separate Axis to use two separate surfaces for each value.
Strength
The intensity of the displacement depends on the Mode. In linear mode, the intensity can be defined directly in the Position. But for other modes, the Strength can be use to scale the displacement intensity.
Mid Value
By default, the data read from displacement map goes from 0 to 1, with black color correspond to 0 and white color equals 1. However, if you want the effect to goes from -0.5 to 0.5, so the black color means invert displacement. You can change the Mid Value properties to 0.5.
Algorithm
Properties in this section control how the color is being sampled.
Iterate
Iterate make the displace map sampling done step by step, instead of calculating where the pixel will go by taking a single sample and multiply with the Strength. It will only move by one step, then take another displace map sample repeatedly for Strength amount of time.
Blend Mode
Blend mode control how the new color is chosen.
- Overwrite replace the pixel with the new one.
- Min replace the pixel only if it's darker than the current one.
- Max replace the pixel only if it's brighter than the current one.