Houdini 20.5 Nodes Geometry nodes

Attribute Promote geometry node

Promotes or demotes attributes from one geometry level to another.

On this page

This node provides a straightforward way to convert an attribute from one class to another. For example, a point attribute can be converted to a primitive attribute using any one of a number of different merge methods.

For index attributes, the merge methods treat the attribute as a string - Average will perform median, Sum will perform concatenation, and the other numeric methods will resort to First Match.

For attributes with multiple components (such as vectors), each merge is done independently on each component.

Note

Use Attribute Promote when you want to copy attributes between geometry in the same stream (it has one input). Use Attribute Transfer when you want to copy attributes from geometry in one input onto geometry in another input.

Parameters

Original Name

The name of the attribute in the source class. For example, Cd will pick color. This can also be a pattern or space-separated list of attributes, such as * or Cd pscale.

Original Class

The class that the attribute starts in. It can be one of point, primitive, detail, or vertex.

New Class

The class to which the attribute is promoted. Unless Piece Attribute is turned on, New Class must be different than Original Class. Otherwise a warning is raised and nothing is done.

Piece Attribute

The name of a partition attribute in the New Class, which must be a string or integer type. Each point/vertex/primitive where the attribute has the same value is considered part of the same piece. The Promotion Method will be applied using the corresponding elements in the Original Class for the piece, and the result will be written to all of the piece’s elements.

For example, when promoting from points to primitives, the Promotion Method will be applied to all of the points referenced by the primitives in the piece:

  • Elements from the Original Class will not be included multiple times (for example, if a point is referenced by multiple primitives in the piece).

  • Elements from the Original Class will be ordered by index (for example, First Match will return the value for the lowest point index of any point referenced by the piece’s primitives).

  • The Original Class may be the same as the New Class when using a piece attribute (for example, this can be used to compute the average value of an attribute for each piece).

Promotion Method

Whenever there is more than one attribute in the original class that matches a single entity in the new class, some method must be used to determine the new value. For example, if converting from point attribute to primitive attribute, there will be many points corresponding to a single polygon.

Maximum

Picks the largest match.

Minimum

Picks the smallest match.

Average

The mean, or the sum of all matches divided by the number of matches.

Mode

The most common match. If there is more than one most common, it will be the minimum of the most common.

Median

The middle of the matches. If there is an even number of elements, it is the higher of the two possible middles.

Sum

All of the matches added together.

Sum of Squares

All of the matches squared, and then added together.

Root Mean Square

The square root of the average of the squares of all the matches.

First Match

The first valid match. For promoting points to primitives, this would be the point of the first vertex in the primitive.

Last Match

The last valid match. For promoting points to primitives, this would be the point of the last vertex in the primitive.

Array of All

Provided the source attribute is a tuple attribute, a new array attribute is created. The array attribute is populated with all the values of the matches.

Change New Name

When turned off, the new attribute name will match the original name.

New Name

The new name for the attribute if Change New Name is turned on. If the source is a pattern, this new name should be a pattern that can expand to the same length. Glob-style renaming is done, so if the matching pattern is instance* and the new name is my*instance, then the attribute instancepoint would be promoted into mypointinstance.

Delete Original

When turned on, the original attribute is deleted after promotion. Note that in some cases, such as promoting a vertex attribute to a point attribute of the same name, the original attribute will always be deleted. To avoid this, rename the attribute when promoting.

Examples

AttribPromoteSphere Example for Attribute Promote geometry node

This example demonstrates how the AttribPromote SOP can be used to transfer (promote) attributes between points and primitives.

See also

Geometry nodes