Houdini 22.0 Nodes Copernicus nodes

Logic Copernicus node

Applies logic operations to ID layers.

On this page
Since 22.0

This node applies logic operations to integer ID layers, attributes, and VDBs.

Parameters

Signature

The layer type that the source accepts.

See Signatures for more information.

Mask

For ID layers, if the final mask is greater than 0.5, the new value is used. Otherwise the original value is used.

The amount of the new value to mix in with the original value. Higher values mix in more of the new value. Lower values mix in less of the new value.

The default value is 1, which means this node uses only the new value. See Mask for more information.

Function Class

Selects the high-level category of logic functions to perform.

Logic

Expose boolean logic operators.

Comparison

Expose comparison operators.

Bit Shift

Expose bit shifting operators.

Bit Twiddle

Expose bit-twiddling operators that enable low-level control of individual bits.

Logic

Boolean logical functions. In logical mode, 0 is false and any other value is true. In bitwise mode, the individual bits are processed independently.

A

Output the A input.

B

Output the B input.

And

True if A and B are both true.

Or

True either A or B are true.

Exclusive Or

True only if A or B are true, but not both.

True If

Equal to each other (==)

True if the A and B are equal.

Not equal to each other (!=)

True if the A and B are unequal.

A greater than B (>)

True if A is greater than B.

A greater than or equal to B (>=)

True if A is greater than or equal to B.

B greater than A (<)

True if B is greater than A.

B greater than or equal to A (<=)

True if B is greater than or equal to A.

Bit Shift

This shifts the bits of the A input.

Shift Right Arithmetic

Shift the bits right by the B value. The sign of the number will be preserved.

Shift Right Logical

Shift the bits right by the B value. Zeros will be shifted in from the left, so the number will be treated as unsigned.

Shift Left

Shift the bits left by the B value.

Rotate Right

Rotate the bits right by the B value. Bits that fall off the right side will be moved to the left.

Rotate Left

Rotate the bits left by the B value. Bits that fall off the left side will be moved to the right.

Bit Twiddle

Specific operations to manipulate individual bits.

Is Bit Set

True if the Bth bit in A is set.

Set Bit

Outputs A with the Bth bit set.

Clear Bit

Outputs A with the Bth bit cleared.

Toggle Bit

Outputs A with the Bth bit toggled.

Count Set Bits

Output the number of set bits in A.

Leading Zeros

Output the number of leading zeros in A.

(A * B) >> 32

Multiply A and B together and shift right by 32. This returns the high component of the multiplication that normally is lost due to overflow.

Operate Bitwise

Boolean operations will operate per-bit rather than logically.

All Bits Set for True

A true result normally is 1, and a false 0. This instead will have the true value have all the 1s set, which usually is -1. This is useful for masking operations.

Not A

Complement the value of A before doing the operation.

Not B

Complement the value of B before doing the operation.

Not Result

Complement the result of the operation.

Default B Value

If B is unwired, this is the value used for B.

Inputs

A

An ID layer or integer VDB or attribute for the A input.

B

An ID layer or integer VDB or attribute for the B input.

mask

A Mono layer or integer VDB or attribute for whether to output the result of the operation or the original A value.

Outputs

logic

An ID layer or integer VDB or attribute with the result of the logic operation.

See also

Copernicus nodes