Share

Tokens - Arnold for Houdini

HtoA supports the following texture tokens, including both the (Mudbox) and __ (Mari) tokens. Tokens can be added to the filepath of an image shader for extra control.

  • <attr:>
  • <tile>
  • <udim>

Examples

attr:

The attr: token enables you to apply different texture maps based on the name of the attribute that is assigned to the mesh. It is supported in the form <attr:name index:name default:value>. The tag will look for the named user data (as a string). The index and default tokens are optional; if the index is used, the UINT user data is found first, and the main attribute then must be an array of strings it indexes into. Among other techniques, this allows e.g. facesets, where you can list the faceset names once each in a constant array, and then have a uniform UINT assigned to each face specifying which faceset the face is a member of. Finally, the default, if present, is substituted if the user data cannot be found for any reason.

When using the  token, multiple textures can be used to cover a model, rather than a single, much larger, texture. It is the notation at which it is exported in UV texture space. This starts at 1001 (0,0) and continues in U for another 10 offsets. It then progresses onto the next row of V, meaning for every 10 in U it moves 1 in V.

UV's should be arranged into separate UV tiles in order to maximize texture space

You can use a single File texture to open textures composed of multiple images that correspond to the grid tiles in your UV layout. You can, therefore, open and render high-resolution textures produced by 3D painting applications such as Mudbox, and is a better alternative to using UVsets.

Imageshader with <udim> tag in the file name, which is then replaced with the appropriate number.

UDIM values are a way of representing the integer coordinates of a texture, from the coordinates of its bottom-left corner in UV space. This way, multiple textures can be used to cover a model, rather than a single, much larger, texture.

Was this information helpful?