|On this page|
This changes the precision and amount of memory used to store an attribute. You can use this to get greater precision for floating point operations at the cost of increased memory usage, or lower precision to save memory for very large models.
For example, if your use case can tolerate 16-bit float precision, for a point
attribute on a model with 100 million points, using
real16 would save 300 MB.
Notes and warnings
Not all operations in Houdini maintain 64-bit precision.
Storing out-of-range values in a low-precision attribute (for example, storing 130 in an
int8attribute) does not raise an error. Instead, the value wraps around (for example, storing 130 in an
You may need to add bounds checking to your own scripts/expressions if necessary to work around this.
When a script or expression reads an attribute, the attribute’s value is converted to the usual numeric type for the scripting environment. For low precision attribute types, this means you can use higher precision/range for intermediate results before you store the value back to the attribute.
Available storage types
||8 bit integer (1 byte).||-128 to 127|
||16 bit integer (2 bytes)||-32768 to 32767|
||32 bit integer (4 bytes)||-2147483648 to 2147483647|
||64 bit integer (8 bytes)||-9223372036854775808 to 9223372036854775807|
||16 bit float (2 bytes), about 3 decimal digits of precision.||Maximum value about 104|
||32 bit float (4 bytes), about 7 decimal digits of precision.||Maximum value about 1038|
||64 bit float (8 bytes), about 15 decimal digits of precision.||maximum value about 10308|
Number of Casts
The number of different type conversions you want to do. Click the + button to add another conversion.
The class of attributes to change.(vertex, point, primitive, or detail).
A space-separated list of attribute names to change. You can also use
patterns here. For example,
The new storage type for the attribute(s). See available types above.
Variable names ending with
2 refer to the geometry from the second input, if applicable. For example,
PT2 is the current point number from the second input.
The seconds a particle in the template has been alive.
Arc length distance from root in the L-systems.
The surface area of the primitive (created by the Measure SOP).
BBX, BBY, BBZ
The point’s relative position in the bounding box.
Point or vertex alpha value.
CEX, CEY, CEZ
The centroid of the geometry.
COMX, COMY, COMZ
Center of mass.
CR, CG, CB
Diffuse point or vertex color.
Point or vertex crease weight value.
Stores the currently processed layer for texture/materials (set by the Layer SOP).
Distance from particle to last collision.
Number of divisions to build the circle swept with Polywire (created by L-systems).
Generation in the L-systems.
The ID of the particle in the input.
The age of the point in the L-system computation.
Percent of total life used (from 0 to 1).
Level of detail.
MAPU, MAPV, MAPW
Point or vertex texture coordinates.
The string name of the current material (the value of the
The number of layers that are considered active for display.
The total number of points in the template geometry.
NX, NY, NZ
The perimeter of the primitive (created by the Measure SOP).
Primitive number & total number of primitives.
The point number of the currently processed point.
RESTX, RESTY, RESTZ
The rest position.
Number of segments to divide a curve up into in Polywire (created by L-systems).
SIZEX, SIZEY, SIZEZ
The size of the bounding box.
Elasticity of a point.
Spring tension of an edge.
TX, TY, TZ
UPX, UPY, UPZ
The vector pointed in the up direction.
Vertex number & total number of vertices.
VX, VY, VZ
Point spline weight.
The width of the curve. Used by mantra for rendering curves & polywire for generating trees.
The X extents of the bounding box of the geometry.
The Y extents of the bounding box of the geometry.
The Z extents of the bounding box of the geometry.