5
$\begingroup$

I'm trying to wrangle a vector displacement map from Zbrush into Blender but nothing seems to make it render properly. Instead it comes out mangled.

Zbrush includes a helpful diagnostic model and map to determine which of the 48 different ways of exporting a map should be used. I tried loading this into Blender and all 48 are completely trashed, there isn't one that's even close to looking correct.

enter image description here

One of those is supposed to be a sphere, yet none are even close. This is using the basic settings for the Displace modifier: RGB to XYZ, UV coordinates, Midlevel 0.00, Strength 1.00.

The EXR displacement map is loading properly, everything looks good texture-wise, but the displacement results are trashed. I'm having a hard time finding any detailed information on what format Blender expects vector displacement maps to be in. I could do some more diagnostics but it's really unclear what settings ZBrush needs.

$\endgroup$
4
  • 1
    $\begingroup$ Are you using non-color for the image used as displacement map? $\endgroup$
    – user1853
    Jul 6, 2016 at 6:16
  • $\begingroup$ There is no visual difference between Linear and Non-Color. $\endgroup$
    – Involatile
    Jul 6, 2016 at 6:17
  • $\begingroup$ can you upload the file (with the image packed into it)? $\endgroup$
    – user1853
    Jul 6, 2016 at 6:19
  • $\begingroup$ Uploaded Diagnostic.blend with images packed in. This is really strange. You'd think one of those many settings would work, but I can't find much in the way of a recommended export or import recipe. $\endgroup$
    – Involatile
    Jul 6, 2016 at 6:28

1 Answer 1

9
$\begingroup$

Vector displacement maps can contain negative values (and this one does), so you also need to disable "clamp" under the texture's "colors" rollout. Also, you need to apply rotation since the by default Blender will import Zbrush obj's with a 90 degree object rotation to handle the Y-up/Z-up conversion, you want that applied to the base mesh, not the post-modifier object transform. Once you do that, the correct value reveals itself (it's 27).

Displace Modifier (World Space Displacement only)

Zbrush:
vTangent = disabled (world space map, see below if you need tangent)
exr output = on
Flip and switch = 27

Displacement modifier
Mode = RGBtoXYZ
Midlevel = 0.0
Scale = 1.0
Coordinates = UV

Mesh

Apply rotation after importing to bake the axis flip, but DO NOT apply scale. (if you apply scale, you must compensate with the modifier's scale setting)

Displacement map (texture panel)

Color space = non-color ("linear" or "raw" should give the same result by default, but are technically not "proper")
Clamp = disabled


Tangent Space Displacement

In Blender 2.8, Cycles includes support for vector displacement. Unlike the displace modifier, this system DOES support tangent-vector maps. The node setup will look like this. Note the use of "non color data" on the image texture. In most cases, the "vector displacement" node should be left at exactly these settings, they are the defaults for a reason.

example shading setup of an image node connected to a vector displacement node, which is feeding the material displacement socket

Tangent space maps are not dependent on the object transform, and can also displace meshes after they have been affected by deformation modifiers such as armature, corrective smooth, curve, etc. This is extremely useful when rigging a sculpted character from Zbrush. You can rig the level 1 mesh, then use subdivision and tangent vector displacement to rebuild the high-level sculpt at render time after deformation has been applied.

Note that as of Blender 2.80, adaptive subdivision does not support mesh tangents. As a result, you will need to use fixed subdivision with tangent-space maps. (if your object is not going to deform and you'd rather have adaptive subdivision, you can still use the same world space maps and settings you'd use with the displace modifier with Cycles vector displacement shader. Just change the vector displacement node's space to "object" or "world")

In this case, export your map from Zbrush with the following settings:

vTangent = enabled
exr output = on
Tangent flip and switch = 25

Whether you apply rotation or not does not matter with tangent space maps.

$\endgroup$
2
  • 1
    $\begingroup$ I was using "Clamp" as recommended by a YouTube video, one of the few references I found, so that was the big problem. Without rotation applied, 47 is correct. With it's 27. Thanks! Hope this helps other people too because this is really poorly documented. $\endgroup$
    – Involatile
    Jul 6, 2016 at 7:25
  • $\begingroup$ Nice answer, couldn't write it better. Btw. I am honestly amazed Blender still doesn't have tangent space vector displacement as it is basically included inside the new Corrective smooth modifier.. $\endgroup$ Jul 6, 2016 at 12:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .