Houdini 12 Nodes Surface nodes

Copies attributes between groups of vertices, points, or primitives.

Attributes are copied from a source group to a destination group. The source and destination group must be of the same type, but there is no restriction on the attribute class.

When copying, a general rule is applied when the size of the destination is greater than the size of the source. In this case, the elements of the source are repeated in a cyclic fashion. An analogous example follows:

Given a source pattern “ABC” and a destination pattern of length 8, the resulting destination pattern is “ABCABCAB”.

The same logic applies to vertices, points, and primitives. The order in which the source and destination groups are specified will affect the result of the copy.

If the copied attribute does not exist on the destination geometry, it is created automatically.

Example

Use the AttribCopy Operation to copy UV texture coordinates from one face to another. The group type should be primitives, and the attribute class should be points or vertices (depending on where the UV attribute has been applied).

Parameters

Source Group

A subset of the source geometry from which to read attribute values.

Destination Group

A subset of the destination geometry whose attribute values will be overwritten by the values contained in the source geometry.

Group Type

The type of elements referenced in the Source and Destination Group fields. The Source and Destination Group Types must be identical.

Attribute

Attribute to copy. “Color” and “Texture UV” are provided for convenience. Other attributes can be specified by name by selecting “Other Attribute”.

Attribute Name

When “Other Attribute” is selected, this is the name of the attribute to copy. Multiple attributes may be specified. If no attribute name is provided, all of the source attributes will be copied.

Accept “P” and “Pw”

“P” and “Pw” can be specified in the name to copy points.

Attribute Class

Where the attribute is located on the geometry. Vertex, point, primitive, and detail attributes can be copied. “Use Group Type” looks for the attribute in the same place as specified by the Group Type parameter. “Auto Detect” first looks in the place specified by the Group Type, then looks for the attribute in vertices, points, primitives, and detail (in that order).

Copy Local Variable

All local variables referring to the copied attributes are also copied.

Examples

Load | Launch

.../examples/nodes/sop/attribcopy/AttribCopyTessel.otl

This is an example of how to transfer attributes from one geometry to another using the AttribCopy SOP.

A “smiley face” is painted onto a grid as a color attribute using the Paint SOP. The attribute is then transferred to another grid. Because of a discrepancy between the sizes of the grid, a tesselation occurs.

When there are differences between the sizes of the geometry, the AttribCopy SOP will repeat the pattern of the attribute in a cyclic fashion.

On this page

Related topics