Houdini 20.0 Nodes Geometry nodes

Attribute Copy geometry node

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

On this page

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.

Unless Match by Attribute is enabled 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 Match by Attribute is enabled, source and destination points and primitives will be matched up by equal values in the attribute specified by the Attribute to Match parameter. If there is no matching source value for a particular destination, then nothing will be copied to that destination. In the case of multiple matching source values, the source with the highest point or primitive number will be used.

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.

Match by Attribute

Match source and destination points or primitives by equal attribute values, rather than just performing a sequential copy. This option is only valid when the source and destination Group Type are both set to Points or Primitives.

Attribute to Match

The name of the attribute used to match source and destination points or primitives. This attribute must exist on both the source and destination geometry, and should be an integer or string.

Attribute to Copy

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.

Allow P Attribute

P can be specified in the name to copy points, otherwise P is ignored even if it matches the pattern.

New Name

When enabled, this name will be used for the destination attribute. The second input is optional when this is enabled; the source attribute will be from the first input if there is only one. This supports multiple renames and even wildcard patterns, using * and ?, so long as the number of patterns is the same as the number of patterns in Attribute Name. For example, if Attribute Name is * and this is copied_*, attributes like P and N will be copied to copied_P and copied_N. It also supports reordering wildcards, so if Attribute Name is *_* and this is *(1)_*(0), an attribute named a_x will be copied to x_a.

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. This cannot be used if New Name is used and different from Attribute Name.

Copy Data

Copies the actual attribute data contained in elements. Disabling this can be useful when you just need to copy over the attribute properties and meta data.

Examples

AttribCopyTessel Example for Attribute Copy geometry node

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.

See also

Geometry nodes