In Houdini, attributes are named values stored on vertices, points, primitives, and surfaces. Point color, position, UV coordinates and normal, for example, are stored as point attributes.

Some attributes (such as position) are automatically set by Houdini, but you can also manually set attributes and add your own custom attributes.

To see the attributes on the geometry in a node, right-click 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.

The order of precedence for attributes from highest to lowest is Point - Primitive - Detail.

Some examples of attributes are Cd (diffuse color), N (normal), UV (texture coordinates), ID (identifying tag) and Pref (position reference).

Using Houdini Attributes With Arnold

In order to use attributes, they must be exported to the .ass file by naming them specifically in the Arnold geometry properties. Available attributes will be listed on the drop down arrows on the right.

 

Using the Cd example from the User Data page the sphere will not have any color until the Cd attribute is passed to the .ass file.

default .ass file (left) and with Cd exported via the Attributes tab (right).

 

Conversions
Houdini TypeHoudini SubtypeHoudini SizeArnold Type

 

 

 

Float

-1AI_TYPE_FLOAT
-2AI_TYPE_POINT2
Color

 

3

AI_TYPE_RGB
PointAI_TYPE_POINT
VectorAI_TYPE_VECTOR
-4AI_TYPE_RGBA
Int-1AI_TYPE_INT
String-1AI_TYPE_STRING
HOUDINIARNOLD
VertexIndexed
PointVarying (except for particles: Uniform)
DetailConstant
PrimitiveUniform

 

Pref Example

Pref is a special case.

Input coordinates of the 4D fractal noise function. The surface point is used when not defined (0). An arbitrary coordinate space can be specified manually by linking another shader into the P parameter. This is useful for all sorts of things such as being able to animate patterns flowing through objects, having patterns move along with objects, etc.

For example, a coordinate system that you're animating to move the noise field through an object (a common technique for doing water running over a surface) or a coordinate system that is defined relative to a larger object (e.g. think of a spaceship that's comprised of many smaller objects, and you want to paint noise over the whole surface).


Below are animations that show Pref space coordinates in use with a deforming object. Note how the texture sticks to the object when using Pref space coordinates, compared to Object/World space coordinates where the texture swims. 

 

Using World/Object Space - Texture Swims

 

Using Pref Space - Fixes Texture Swimming


 

  • No labels