On this page |
Attributes
Attributes are named values stored on vertices, points, primitives, and objects. Point color, position, UV coordinates , spline weight (W
), and normal, for example, are stored as point attributes.
-
Houdini sets some point attributes that you can use in expressions. For example, you could set the per-point color based on the vertical position (
PY
) of the point. -
Certain attributes you can set manually and if they're present they will be used by Houdini. For example, the dynamics solvers and rendering engines will often use certain attributes on the geometry if they exist.
-
You can also set your own custom attributes to be used by your node expressions, scripts, exporters, and so on.
The surface nodes in the Attributes group of the tab menu set different types of attributes. You can also set or create arbitrary attributes using the Attribute SOP.
To see the attributes on the geometry in a node, press on the node’s tile in the network editor and choose Spreadsheet to open the geometry spreadsheet for the node.
Particles also have attributes, and attributes are very important when geometry and particle systems interact. For example, particles emitted from geometry inherit (by default) the attributes of the point from which they are emitted, and you can create interesting effects by transferring attributes between surfaces and particles using the Attribute Transfer POP.
Geometry components

You can create/set attributes using the generic Attribute Create surface node, or the
Vertex, Point,
Primitive nodes. You can attach attributes to vertices, points, primitives (e.g. polygon faces), or the entire piece of geometry (called the "detail" level).
Note
When you merge two or more branches in a geometry network, if a detail attribute with the same name exists in multiple branches, Houdini uses the value in the first branch. If the attribute is a string array, Houdini merges the arrays.
Attribute precedence
When two components in the same geometry have an attribute with the same name, the attribute on the "lower level" of geometry is used, so:
-
Vertex attributes, which override:
-
Point attributes, which override:
-
Primitive attributes, which override:
-
Detail (whole geometry) attributes
-
-
-
Applying nodes based on attribute values
Most surface nodes have a Group field that lets you enter a named group or a pattern to select which components the node should apply to. This field recognizes special syntax that lets you select components by the value of an attribute. For example, in a Point node's Group field, @foo>5
selects all points whose foo
attribute is greater than 5
.
See the section on manually specifying groups for more information.
Dictionary attributes
Since Houdini 18.5, SOP geometry supports dictionary attributes, an attribute type where each element (point, vertex, primitive/face, or the whole geometry/detail) can store a set of key/value pairs.
-
You could use a dictionary attribute to store complex "blind" element data, such as game engine data, or data for a foreign geometry format that Houdini does not support natively.
-
You could store metadata about geometry in a dictionary attribute on the detail.
-
You could store the parameter values of the node that created different elements, for debugging. You could even store a node network as geometry by representing nodes with points and wires and parameters in a dictionary point attribute. See the
Attribute From Parms SOP.
(You can also create a dictionary array attribute, where the attribute value is an array of dictionaries, rather than a single dictionary.)
Dictionary keys are strings. Dictionary values can be string, number, an array, or a (nested) dictionary. Dictionary attributes essentially have the same data model as JSON. In fact, UI such as the geometry spreadsheet displays the contents of a dictionary attribute like a JSON-encoded string.
Currently, support for dictionary attributes is mostly in Python, VEX, VOPs. You can manipulate dictionary attributes on geometry using VEX snippets in an Attribute Wrangle, or with a
Python SOP. There is also simple support for reading key values in parameter expressions.
Language |
Support |
---|---|
VEX/VOPs |
See the documentation for the VEX dict type for more information on working with |
Python |
|
Expressions |
|
Tip
The Attribute Create node only creates an empty dictionary attribute. The best way currently to actually set dictionary values in a geometry network is with a
Python SOP or
Attribute Wrangle.
Intrinsic attributes
Intrinsic attributes are computed values derived from the geometry that you can access as if they were attributes. For example:
Examples of intrinsic attributes
Detail |
|
Number of points in the geometry |
Detail/primitive |
|
Bounding box of the geometry |
Primitive |
|
Surface area of the geometry. |
Primitive |
|
Amount of memory used by the primitive. |
To... | Do this |
---|---|
See what intrinsic attributes are available |
|
Use intrinsic attributes |
|
Tip
Despite the name, some "intrinsic" attributes can actually be written to, causing Houdini or Mantra to change some internal setting. For example, you can set the intrinsic:unexpandedfilename
intrinsic attribute on a packed primitive.
Higher and lower precision storage
You can choose the numeric precision of attributes you create with the Attribute Create node, and/or convert attributes to higher precision types (at the cost of more memory) or lower precision types (to save memory) using the
Attrib Cast surface node.
See the help for Attrib Cast for information on the available storage types and limitations.
Indexing and limit variables
You may see the following "pseudo-attributes" in VEX snippets. They represent the number of the current element being processed (for example, the point number), and the total number of elements in the geometry/list. See indexing and limit variables in VEX snippets for more information.
@elemnum
, @ptnum
, @primnum
, @vtxnum
Represent the number of the current element when a VEX snippet is run.
@numelem
, @numpt
, @numprim
, @numvtx
Represent the total number of elements in the geometry/list when a VEX snipped is run.
Common attributes
Each type of node will use certain attributes if they exist (or in some cases require them to exist), and may create/set attributes as part of their operation. See the documentation for individual nodes to see what attributes they use/set.
The following lists a number of attributes that by convention are read/written by multiple node types.
|
vector |
Point position. The viewport uses this to lay out the points of the model in 3D space. You can overwrite this attribute to move the point. |
|
vector |
Normal direction. You can overwrite this attribute to change the normal. |
|
vector |
Velocity. The renderer uses this attribute to know where to add motion blur. This attribute is not computed automatically, but several nodes, especially particle DOPs, can set/use it. You can add velocity to points using the |
|
int |
A unique element ID. This is not the same as the element number (for example, the point number). This is an attribute you can, for example, assign to points to keep track of them even if the point numbers change (which can happen if the number of points changes). Particle DOPs often set/use this attribute. |
|
string |
This is a value you can set on primitives, such as volumes or packed primitives, to be able to find them in code by name. Some nodes set/read this attribute. |
|
int |
Nodes the break up geometry into pieces will often set this attribute so you can tell which polygonal faces are part of the same piece. Faces in the same piece will share the same value in their |
|
float |
Uniform scaling factor. This is used in different ways in different places. For particle/point rendering, it controls the size of the particle/point (in world space units) at render time. For instancing, you can use it to uniformly scale the instanced geometry. |
|
vector |
Whereas |
|
float |
When rendering open curves, sets the line width (in world space units) at render time. If this attribute does not exist, Mantra renders the open curve a thin line instead of as a ribbon with thickness. |
|
float |
Level of detail. This may be used in instancing. |
|
vector |
When displaying particles using sprint images, this gives additional sprite scaling over |
|
float |
When displaying particles using sprint images, this gives sprite rotation (around camera angle) in degrees. |
|
int |
If this detail attribute is 1, the geometry always appears as wireframe in the viewport. If this detail attribute is -1, the geometry always appears as shaded in the viewport. For guide geometry, which are normally only drawn as wireframe, this allows them to also be drawn as shaded when using any of the shaded viewport modes. |
|
int |
If this detail attribute is not 0, the geometry always appears without lighting. This is currently ignored for guide geometry. |
|
int |
If this detail attribute is not 0, all points will be rendered as sprites, even if they are connected to geometry. Normally only unconnected points are rendered. This is currently ignored for guide geometry. |
|
float |
Controls the cusp angle used for generating normals when the geometry doesn’t have any. 180 will produce entirely smooth point normals. |
|
vector |
The |
||||||||||||||||
|
vector |
Conventional name for an attribute containing each point’s rest position, used by various nodes.
Some shaders can use this rather than |
||||||||||||||||
|
vector |
The |
||||||||||||||||
|
vector |
Represents the up vector of a particle’s local space. This is used for instancing geometry onto a point. You can overwrite this attribute to change the particle’s orientation. |
||||||||||||||||
|
vector |
Obsolete, used by old POPs. The new DOP particle nodes use the |
||||||||||||||||
|
vector4 |
Obsolete. Used by old POPs to store the particle’s previous position. |
||||||||||||||||
|
vector4 |
Quaternion orientation of a particle. Allows fully specifying rotation, whereas |
||||||||||||||||
|
vector4 |
An additional offset-quaternion applied after all other attributes, used when instancing geometry onto a point. |
||||||||||||||||
|
int |
Detail attribute storing the largest particle ID, allowing Houdini to create new particle ids efficiently. |
||||||||||||||||
|
int |
A bit field encoding different pieces of information about a particle’s state (for example, whether it’s alive, whether it’s stopped, whether it collided in the previous frame, and so on). Various particle DOPs read and write this attribute. The
|
Most shaders will use the override attributes to change how elements with these attributes are shaded.
|
vector |
Diffuse color override. The viewport uses this to color OpenGL geometry. |
|
float |
Alpha transparency override. The viewport uses this to set the alpha of OpenGL geometry. |
|
vector |
Specular color override. |
|
vector |
Reflect color override. |
|
vector |
Transmit color override. |
|
vector |
Emission color override. |
|
float |
Roughness override. |
|
float |
Fresnel coefficient override. |
|
float |
Shadow intensity override. |
|
float |
Shadow bias override. |
|
vector |
The UV coordinates of the point/vertex. The first two elements of this vector contain the current U and V coordinates. Note that |
|
string |
The node path to the material to use to shade this primitive. Overrides the object’s material. |
|
string |
The |
|
string |
Detail/primitive. The name of a RenderMan shader. |
See also |