If you generate primitives on a displaced surface, you can add the same Ptex-based vector displacement map to the Description so that primitives get properly positioned and orientated on the displaced surface. For example, if you instance trees on a landscape mesh shaped by a displacement map, adding the map to the Description ensures the trees generate based on the shape of the mesh.
- In the XGen Editor, click the Primitives tab.
- In the Displacement attribute group, turn on Use Vector Displacement for maps.
- To add the displacement map to the Description, you need to create a map expression. To do this:
- Click this icon
beside Displacement.
- In the
XGen Expression Editor, type a map expression to source the location of your displacement map.
For example:
- Click Accept.
The position and orientation of primitives now follow the shape of the displaced surface.
- Click this icon