Houdini 22.0 Nodes Copernicus nodes

Slope Direction Copernicus node

Converts a height layer into a direction layer.

On this page

This operation converts a layer that represents a nominal height to a UV layer that represents the direction of the slope.

Note

The slope direction is always in the frame of the layer or VDB. For layers, a direction of (1,0) corresponds to the direction of increasing pixels along the layer’s width. Likewise for VDBs, a direction of (0,0,1) corresponds to the direction of increasing voxels along the VDB’s depth.

Parameters

Signature

The layer type that the source accepts.

See Signatures for more information.

Space

The space in which to compute the slope. This affects the magnitude of the directions. This may also affect the directions themselves if pixels are anisotropically scaled in the provided space.

Image

Compute the slope in image space, which normalizes the change in values by the image-space pixel size.

Pixel

Compute the slope in pixel space, which normalizes the change in values by the pixel size.

Local

Compute the slope in local space, which normalizes the change in values by the world-space pixel size.

Angle

After computing the slope direction, rotate it by this amount. By setting to 90 you will get directions that avoid going up slope and instead circumnavigate hills.

Scale

Heights are often not to scale, so this adjusts the direction’s magnitude globally to get into a useful value.

Read Pixels outside Image

Determine if derivatives at the boundary should read outside the image or restrict to the image range. Reading outside is useful for building seamless textures with wrap-mode. But restricting to the image range avoids artificial flattening of the derivative at the boundary in clamp modes, as it acts more like an extrapolation.

Kernel Size

Usually a derivative is computed with adjacent pixels, but if the values are slowly varying there may not be enough bit-detph to get smooth derivatives. This will expand the distance, in buffer elements, to compute the derivative, possibly removing stepping artifacts from the derivative.

Inputs

height

A Mono layer or Float VDB representing a heightmap from which to find slopes.

Outputs

slopedir

A UV layer or Vector VDB storing the direction of the slope of the height input. The values will be larger for steeper slopes.

See also

Copernicus nodes