Houdini 21.0 Nodes Copernicus nodes

Prefix Sum Copernicus node

Computes the prefix sum of a layer.

On this page

This node computes the prefix sum of an input layer. The Direction parameter determines how the scan is performed along the x and y axes. Each sequence is made up of all the buffer elements along the set Direction.

Parameters

Signature

The layer type that the source accepts.

See Signatures for more information.

Direction

The direction of the scan.

+X

Scan along positive X, which is horizontally from left to right.

-X

Scan along negative X, which is horizontally from right to left.

+Y

Scan along positive Y, which is vertically from bottom to top.

-Y

Scan along negative Y, which is vertically from top to bottom.

+X+Y

Scan in a meandering path from the lower-left corner to the upper-right corner. This means the steps alternate between moving in the positive X direction and then in the positive Y direction.

Linear

Scan from the left to right and bottom to top, starting from the lower-left corner to the upper-right corner. This means each horizontal scanline is aggregated before moving on to the next one.

Operation

The operation to apply to the elements of the sequence.

Add

Add all elements of the sequence together.

Minimum

Return the smallest element in the sequence.

Maximum

Return the largest element in the sequence.

Count

Return the number of elements in the sequence.

Scale

Scale the prefix sum by the pixel size. This ensures the summation is independent either of resolution or during proxy cooking.

This parameter applies to only non-integer summation. The scale factor changes depending on whether X or Y passes of the prefix sum are present. It’s scaled by the horizontal factor if there’s an X pass, the vertical factor if there’s a Y pass, or the horizontal and vertical factors if there’s both an X and Y pass.

None

Don’t perform scaling.

Pixel

Divide the values by the pixel scale. This means the values remain the same when proxy-resolution cooking is used.

Texture

Divide the values by the texture size of a buffer element. This causes a constant pixel value of 1 for the data window to sum to 1. This is often an anistropic scale for non-square images. See Spaces for more information.

Image

Divide the values by the image size of the buffer elements. This causes a constant pixel value of 1 for the image to sum to 2. This summation is independent of the data window, so it stays the same when a tile is cropped out. See Spaces for more information.

Inputs

source

The original layer from which to compute the prefix sum.

active

An optional per-pixel active map that determines which values to take into account when computing the statistics. Values over 0.5 are active while values below 0.5 are inactive.

Outputs

prefixsum

The prefix sum of the original layer.

Copernicus nodes