DisplaceGeo

With the DisplaceGeo node, you can modify the shape of your 3D geometry object based on an image. When using the node, each vertex is displaced along its normal with a value corresponding to the image pixel the vertex’s uv attribute points to. The higher the pixel value, the greater the displacement.

See also Displacement.

Inputs and Controls

Connection Type

Connection Name

Function

Input

unnamed

The 3D geometry object you want to modify. This can be a Card node, for example. If you want to modify several objects together, you can also connect a MergeGeo node here.

displace

The image you want to use to modify the 3D geometry object.

Control (UI)

Knob (Scripting)

Default Value

Function

DisplaceGeo Tab

display

display

unchanged

Adjust the display characteristics of the 3D object. These settings don’t affect the render output of the scene; these are for display purposes only in the 3D Viewer.

off - hides the 3D geometry object.

wireframe - displays only the outlines of the object’s geometry.

solid - displays all geometry with a solid color.

solid+wireframe - displays the geometry as solid color with the object’s geometry outlines.

textured - displays only the surface texture.

textured+wireframe - displays the wireframe plus the surface texture.

unchanged - doesn't change the object's display mode. The Viewer can override this setting.

selectable

selectable

enabled

When enabled, you can make selections as normal in the Viewer. When disabled, points cannot be selected or changed.

render

render_mode

unchanged

Sets how the object will render. This control is independent from the display selection, but has the same settings.

channels

channels

rgb

The displace input’s channels to use for the displacement value.

If you set this to something other than all or none, you can use the checkboxes on the right to select individual channels.

source

source

luminance

The source channel you want DisplaceGeo to get a displacement map from. For example, if you selected rgb or rgba from the channels dropdown menu, you can use the red, green, or blue channel, or the pixel luminance as the source.

luminance - create a displacement map from luminance values.

red - create a displacement map from red color values.

green - create a displacement map from green color values.

blue - create a displacement map from blue color values.

alpha - create a displacement map from the alpha channel values.

rgb absolute - move your geometry object’s vertices to the values in rgb.

rgb relative - move your geometry object’s vertices on the x, y and z axes by the amounts in rgb.

scale

scale

0.1

Increase or decrease the scale of the displacement. The higher the value, the bigger the displacement.

weight

weight

1, 1, 1

To give x, y, and z different weightings, enter new weights the weight fields. By default, each weighting is set to 1. If you don’t want to make changes to a value, set its weight to 0.

offset

offset

0, 0, 0

To offset x, y, and z values from the center of the geometry object, enter the value by which you want to offset them in the offset fields. For example, if you enter 0.5 in the offset y field, 0.5 is added to the y value.

filter size

filter_size

5

Change the size of the filtering applied to the image before the displacement.

filter

filter

Parzen

Select the filtering algorithm to use when remapping pixels from their original positions to new positions. This allows you to avoid problems with image quality, particularly in high contrast areas of the frame (where highly aliased, or jaggy, edges may appear if pixels are not filtered and retain their original values).

Impulse - remapped pixels carry their original values.

Cubic - remapped pixels receive some smoothing.

Keys - remapped pixels receive some smoothing, plus minor sharpening (as shown by the negative -y portions of the curve).

Simon - remapped pixels receive some smoothing, plus medium sharpening (as shown by the negative -y portions of the curve).

Rifman - remapped pixels receive some smoothing, plus significant sharpening (as shown by the negative -y portions of the curve).

Mitchell - remapped pixels receive some smoothing, plus blurring to hide pixelation.

Parzen - remapped pixels receive the greatest smoothing of all filters.

Notch - remapped pixels receive flat smoothing (which tends to hide moire patterns).

Lanczos4, Lanczos6, and Sinc4 - remapped pixels receive sharpening which can be useful for scaling down. Lanczos4 provides the least sharpening and Sinc4 the most.

attrib name

uv_attrib_name

uv

Change the name of the attribute that’s used as the vertex’s UV coordinates to find the image pixel. Normals are stored as a named attribute of a piece of geometry.

Cf - surface color

N - normal

PW - world-space point

uv - texture coordinates

vel - point velocity.

recalculate normals

recalc_normals

enabled

After the displacement, check this to recalculate the normals, which usually aren't correct after the vertices have been moved.

Step-by-Step Guides

Modifying Objects Using an Image - Method 1

Example Nuke Scripts

Note:  Loading example scripts only works if you launched the help from Nuke and have set documentation source to local in the Behaviors > Documentation tab of the Preferences.

See Using Script Links for more information.

Displacing a Card based on a noise image