---
title: "ZBrush Vector Displacement"
canonical: "https://rmanwiki-25.pixar.com/space/RFM25/21889028/ZBrush%20Vector%20Displacement"
format: markdown
---
### Export OBJ and OpenEXR from ZBrush

- Shift+d to step down to the **lowest subdivision. **Lion Sculpted by Olivier Drion.

- Hit the Switch button in** Morph Target ** **to switch to the original model**.  If you don't have a Morph Target setup, please consult ZBrush documentation on how to set up a Morph Target.


![image](media://ab1d4bbb-9b9b-4471-a073-d07a171255d2)


The original model is a plane for this example:

![image](media://3c41e4ed-5e13-46f8-8b6d-07f7b5c3b2ba)


- In Preferences, Import/Export, Vector Displacement Map, set the **Tangent FlipAndSwitch to 43.**  There are 48 different vector displacement because a red channel for a renderer may be up while down for the another renderer.  RenderMan is 43.

> ⚠️ Recent changes meant a change from Tangent FlipAndSwitch 41, if your displacement is not correct, you may need this setting rather than 43.


![image](media://f96d6554-35d1-4e4c-926c-1019afee9c55)


- On the Tools, Vector Displacement Map, set *vd Tangent* on, set *vd 32 Bit* to export a 32-bit map otherwise it is 16-bit, set *vd SUV* for smooth UV to on, *vd Normals* to on.


![image](media://58a23e7d-53f0-4831-9f86-91d10910ce40)


- Click on CreateAndExport VDMap to export the maps and OBJ. The maps will be exported as OpenEXR.

### Import OBJ and Add Subdiv Scheme


> ⚠️ For some subdivision surfaces, it may be helpful to add the attribute "Dice Watertight" to resolve seam issues. This may incur a memory overhead so it is not on by default.


- Import the OBJ you just exported from ZBrush.  For its shape node, add **Attributes|RenderMan|Subdiv Scheme:**


![image](media://ebff312b-66f7-4950-a5b0-26d9c871ec28)

### Assign Displacement Shader

- Create a **PxrTexture** node. Set the Filename to your exported ZBrush EXR map. Keep all parameters at their defaults.
- Create a** PxrDispTransform** node. Set Displacement Type to **ZBrush Vector** and Vector Space to **Tangent**.


![image](media://4d82b0dc-f6f6-4802-ab86-63b061cf8979)


- Create a **PxrDisplace** node (this is the displacement shader that actually displaces your surface).
- Connect PxrTexture's output Result RGB to PxrDispTransform's Disp Vector.
- Connect PxrDispTransform's Result XYZ to PxrDisplace's Disp Vector. Your graph should look like this:

![image](media://d62c976b-ec87-44a6-a029-9305cee2925d)


- Add [PxrSurface](https://renderman.atlassian.net/wiki/pages/createpage.action?spaceKey=RFM24&title=PxrSurface), assign it to the model and add some [lights](https://renderman.atlassian.net/wiki/spaces/RFM26/pages/21037106), set the displacement bound appropriately, and render!


![zbrush_vectorDispRender.png](media://058bb829-322f-4321-b401-17dc5c314ddf)

![image](media://dbff342a-edbd-4636-8afa-3d96aabb41db)


> ℹ️ ### Maya Project
> ℹ️ 
> ℹ️ Download a Maya Project and test the official Zbrush vector displacement scene.
> ℹ️ 
> ℹ️ [Download RfM](https://renderman.atlassian.net/wiki/download/attachments/21889028/zbrush_Vector_Displacement.zip?version=1&modificationDate=1709249149413&api=v2&download=true)
> ℹ️ 
> ℹ️ Or a rib file...
> ℹ️ 
> ℹ️ [Download RIB](https://renderman.atlassian.net/wiki/download/attachments/21889028/VD_Zbrush_Diagnostic.rib.zip?version=2&modificationDate=1709250658797&api=v2&download=true)