Houdini 22.0 Nodes Copernicus nodes

Align Pixels Copernicus node

Shifts a layer to align pixelwise with another layer.

On this page
Since 22.0

This node has two main operations. The first is to snap a layer into the pixel grid of the reference layer. The pixel sizes will be the same, orientation match, and the offset be an integer number of pixels.

The second is to align the two layers by a pure pixel translation. This translation is always an integer number of pixels, so is performed with no interpolation so fully preserves the input.

This is most useful when trying to do pixel-perfect overlays, such as dealing with sprite grids or watermarks.

Parameters

Snapping

The initial snapping needs to pick a point on the source layer to snap. This point will be mapped as closely as possible, but if there are scales or rotations, other points may end up increasingly distant from their own snapped location.

This is also used as the source window for alignment.

Data Window

The snapping point is picked from the data window of the source. This is where pixels actually are; so usually includes effects of cropping or overscan.

Display Window

The snapping point is picked from the display window of the source. This is the idealized screen location in pixels, so is independent of cropping or overscan.

Side

Which side to locate the snapping point on the snapwindow, in Y.

Side

Which side to locate the snapping point on the snapwindow, in X.

Justify with

The alignment works by aligning a source rectangle with a target rectangle.

Reference Data Window

Use the data window of the reference as the target rectangle.

Reference Display Window

Use the display window of the reference as the target rectangle.

Original Data Window

Use the data window of the source as the target rectangle.

Original Display Window

Use the display window of the source as the target rectangle.

Target Point

Use a specific point for the target. Since resizing isn’t possible, this is just a single point.

Units

The space in which to specify the target. This applies to the size_ref input, which is the reference layer.

Image

Use image coordinates that range from -1 to 1 on the display window of the layer.

Texture

Use texture coordinates that range from 0 to 1 on the data window of the layer.

Pixels

Use absolute pixel locations in the layer.

World

Use coordinates in world space that project through the layer’s implicit camera.

Target Point

The target point. The Units parameter determines if this is in image, texture, pixel, or world space.

Justify X/Y

Controls which side of the source rectangle is used.

None

No movement on this axis

Min

The minimum of the source rectangle is aligned.

Center

The center of the source rectangle is aligned.

Max

The maximum of the source rectangle is aligned.

Goal X/Y

Controls the target side of the alignment.

Same

Aligned to the same side of the target that the source used, so minimum to minimum and center to center.

Min

The minimum of the target rectangle is the goal.

Center

The center of the target rectangle is the goal.

Max

The maximum of the target rectangle is the goal.

Offset by

An additional nudge from the computed alignment position. This is in pixels.

Inputs

source

A layer to align.

size_ref

An optional reference layer to align to.

Outputs

result

The source layer shifted to align with the specified target.

See also

Copernicus nodes