Houdini 20.5 Nodes Copernicus nodes

Crop Copernicus node

Crops a layer to a new size.

On this page

This operation will crop an image to a new size. It is also able to “uncrop” an image to a larger size than it was originally, though the new pixels will gain values according to the border rules.

There are several ways to interpret the crop operation because of the use of different spaces in Copernicus.

Parameters

Mode

Cropping can be seen as cutting out part of an image, throwing out the extra, but leaving it in the same location of your work space. But it can also be seen as a pan & zoom to reframe the desired region to now fit the center of your workspace.

Discard Cropped

The cropped region is discarded and the pixels remain unchanged in their location in image space.

Discard and Reframe to Crop

The cropped region is discarded, but the pixels that remain are reframed to fill image spaces.

Reframe to Crop

The data is unaffected by the crop. Instead, the image is reframed so the cropped range fits the display window.

This will appear to have no effect in the 2D viewport.

Border

Override the border values used when un-cropping an image.

Unchanged

Use the input border type.

Constant

Treat the border as zero, with the boundary interpolating to black.

Clamp

Clamp boundary values, streaking them outwards.

Mirror

Reflect along the boundaries.

Wrap

Wrap to the opposite boundary.

Clip

Define an implicit cut off at the boundary without any bleeding of black values.

Units

Controls how to specify the crop. This controls the range of the values and if they are in respect to the input’s display or data window.

Image

The cropping region is specified in terms of the display window, with -1 to 1 being the range. A square size will result in a square crop.

Texture

The cropping region is specified in terms of the data window, with 0 to 1 being the range. A square size is not necessarily a square crop because the source may not be square.

Pixels

The cropping region is specified in pixels directly.

Note

The cropping is always done in pixels, which may result in rounding if they do not correspond to buffer elements due to the use of pixel scale.

Geometry Units

If a geometry input is used to drive the crop, this controls what the units of the geometry are.

Image

The geometry specifies image coordinates, ranging -1 to 1, that are relative to the display window.

Texture

The geometry specifies texture coordinates, ranging 0 to 1, that are relative to the data window.

Pixels

The geometry specifies pixel coordinates, ranging 0 to resolution.

World

The geometry specifies world coordinates. The resulting crop region will respect the 3D transform that the input layer has.

Lower Left

Lower left of the crop, in image space.

Upper Right

Upper right of the crop, in image space.

Lower Left

Lower left of the crop, in texture space.

Upper Right

Upper right of the crop, in texture space.

Lower Left

Lower left of the crop, in pixel space.

Upper Right

Upper right of the crop, in pixel space.

Aspect Ratio

Adjust the final crop values to have this aspect ratio.

Extract Tile

Divide the cropped region into equal sized tiles, and crop to one of the tiles. Pixel padding is done after the tile determination, so can be used to ensure there is a buffer around the tiles.

Tile Counts

Number of tiles to divide the image into in each axis.

Tile Number

The tile number to extract, starting with 0 at the bottom left and increasing to the right.

Minimum Resolution

The cropped region will be increased to include at least this number of pixels.

Limit Resolution

Lets you set a Maximum Resolution to limit the size.

Maximum Resolution

The cropped region will be clamped to at most this size. This is useful for dynamic cropping to avoid unexpected input from creating overly large textures.

Pixel Padding

Left/Right

Additional pixels to pad the cropped image on the left and right.

Top/Bottom

Additional pixels to pad the cropped image on the top and bottom.

Inputs

source

A layer to crop.

size_ref

A representative layer that determines the size of the output image and controls the metadata.

bounds

A reference geometry to use for cropping dimensions.

Outputs

crop

The cropped image.

See also

Copernicus nodes