The following information provides more details on a change in release 23.11 for Hydra instancer primvars, referenced in the 23.11 release notes.
Hydra used the synthesized instancer primvars “translate”, “rotate”, “scale”, and “instanceTransform” to communicate instance-rate transform parameters to render backends. Due to their simplicity, these names could easily produce collisions with custom authored primvars, resulting in unexpected behavior (see github issue #2380). We have decided to make these names more complex to avoid such collisions.
The primvars have been renamed and added to the “hydra” namespace:
- translate → hydra:instanceTranslations
- rotate → hydra:instanceRotations
- scale → hydra:instanceScales
- instanceTransform → hydra:instanceTransforms
For consumers who need to move to release 23.11 before they can update any custom backends they may be using, we have added the ability to use the old names by setting the environment variable
HD_USE_DEPRECATED_INSTANCER_PRIMVAR_NAMES. Our open-source backends for RenderMan, Storm, and Embree have been updated and will all work with either the new or deprecated primvar names, provided the environment variable is appropriately set. Note that this environment variable and all support for the deprecated primvar names will be removed no later than release 24.05.
Most custom backends should be trivial to update by replacing the old, deprecated HdInstancerTokens with their new counterparts:
HdInstancerTokens->instanceTransforms(note the terminal ‘s’)
For brevity, the “hydra:” namespace prefix is omitted from the token names. It is present in the tokens’ values, and backends that use these tokens’ values for, e.g., shader codegen may need to make further adjustments to account for the change.