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.

  • 1
    Are you using non-color for the image used as displacement map? – cegaton Jul 6 '16 at 6:16
  • There is no visual difference between Linear and Non-Color. – Involatile Jul 6 '16 at 6:17
  • can you upload the file (with the image packed into it)? – cegaton Jul 6 '16 at 6:19
  • 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. – Involatile Jul 6 '16 at 6:28
up vote 7 down vote accepted

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).

To summarize:

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


If You Need Tangent Space Displacement

Blender does not support tangent-vector displacement as of the time of this post (this will hopefully change sooner rather than later). In the meantime though, there's a trick to get the same result. The multires modifier stores its data in a way that can be applied post-deformation, with a deform modifier(s) above the multires modifier. If you put your displace modifier underneath the multires modifier, subdivide to your max needed level, then apply the displace modifier, it will copy the result INTO the multires modifier! Essentially transferring your zbrush sculpt into a Blender sculpt. You will get a warning about the displace modifier not being first, ignore it. That "unexpected" result is the one we want. You can then put your deform modifiers above multires (armature, curve, whatever you need) and lower the viewport level on multires if you like. It should function exactly like you'd baked a tangent-vector displacement map.

Side note: shoutout to NudelZ on BlenderArtists who taught me basically everything in this post.

  • 1
    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. – Involatile Jul 6 '16 at 7:25
  • 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.. – Jaroslav Jerryno Novotny Jul 6 '16 at 12:16

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.