ZBrushCentral

Displacement woes!

So my displacement maps aren’t turning out okay. I’ve read all the tutorials and the practical guide and am not having any luck with it. This is my procedure, can someone spot something I’m doing wrong:

  • Create model in ZBrush with Zspheres.

  • Make it a PolyMesh3D object. Clear the document and draw this new tool onto the canvas.

  • Store a morph target.

  • At subdiv level 1 create a new texture (2048x2048)

  • Go to Tools, Texture, and assign GUV tiles to it.

  • Divide to bits (say 6 times) and start sculpting away, adding as much detail as you can at each level before moving on to the next.

  • At level 6 paint it with your colour map and sculpt finer details with projection master. Flip your texture vertically, and then export it as a Tiff (this will be your Diffuse texture map).

  • Go back to level 1 and hit Switch for Morphtarget to change the level 1 model to the one you started with.

  • Create a displacement map by going to Tool, Displacement and hitting Create DispMap (at either 1024 or 2048), turn on Adaptive for better quality.

  • Export your Displacement map as a Tiff (it’s the one in the Alpha slot).

  • Still at level 1, go to NormalMap and turn on Tangent, and Create NormalMap. Export as Tiff.

  • At level 1, export your model to OBJ.

  • Open Photoshop and open your Displacement and Diffuse TIFFs and convert to RGB, Flip Vertically, hit Save and close. (because these images need to be 16 bit and not 32, right?)

  • In Max 8, import the model, and convert to an editable poly. Throw a Turbosmooth onto it with a couple of of render iterations.

  • Assign a texture, and in the Diffuse slot put your exported Diffuse texture.

  • In the Displacement slot, add your displacement texture. Go to Output for that map, Enable Colour Map and set the first point to -1.

  • In the Bump slot, add your a Normal Bump map type and choose your exported normal map. Set the V tiling to -1.

  • Change to the Mentalray renderer, make sure Displacement is on and set Edge Length to 0.5. Render.

What I get is a mess. The diffuse map is fine, the normal map is fine, but the displacement is all over the place. I’ve tried flipping the displacement texture different ways, it’s always a mess. It just looks a bloated mess.

Any ideas?
I’d REALLY appreciate help on this. There seem to be so many tutorials out there, but I’m still struggling to find the definitive one for an object created in ZBrush, using ZBrush UVs into Max 8. I thought I had covered everything, but obviously not.

From what I can see, your ZBrush steps are fine. Hopefully a Max user can help you figure out what’s happening on that end of things.

Thanks for confirming that Aurick, I appreciate it, although I actually thought the ZBrush steps might the area I’m going wrong in. When I go through other tutorials like the head tutorial (http://www.zbrushcentral.com/zbc/showthread.php?t=32020), I get the correct result (using the supplied pregenerated displacement map), so I’m presuming I’m doing something wrong on the ZBrush end of things when I’m generating my displacement map… Now, I’m at even more of a loss!

If anyone has ANY ideas what I might be doing wrong, I’d really appreciate it!

P.s One thing I did notice was that in some of the tutorials I’ve found, they say to specifically open your displacement tiff in photoshop and change to RGB mode and save it. But the tiff supplied in the head tutorial above is 16 bit grayscale when I open it in photoshop, if I convert that one to RGB it messes up the head render. Guess that’s one step to change anyway, not converting displacement tiffs to RGB.

I don’t think that you have to store the morph target and then switch it. That step can be omitted. It looks like you may be combining too many steps from all the different tutorials. I thought only Lightwave users need to store the Morph Target. I usally;

Create the model in ZBrush via ZSpheres
Convert to a PolyMesh3D
Use that PolyMesh3D and go up to about 6 sub-divisions
Delete the lowest level so that level 2 becomes 1
Add all of my detail via Projection Master and other brushes, etc.
Go back down to level 1 and then use ZMapper to make a normal map
Then flip the texture that it creates
Export that
Create a Displacement map
Export that as well
Export the tool as an obj

In MAX I import the model
turn it into a poly-object
add Turbosmooth iterations set to (about 3-4 at render time)
add the normal\bump material in the bump channel (use the exported normal map here) and assign that to the model.

For displacement, I add a displace modifier and add the displacement map that I exported earlier. I’m not at my machine right now, but I’ll post the settings that I use for the displacement modifier, later tonight.

Hope this helps! Hey, I would appreciate if anyone can add to this workflow as I am still learning as well.

Cheers.

Oh, maybe I’ll post an image of this process at work tonight as well.

-Ron

Show us an example of what’s going wrong then we can better assist you. Do you know of the 3ds max/ ZBrush Pipeline Guide? http://pixologic.com/zbrush/class/zpipeline.html

You are correct to use morph target if you want to use the displacement map on your original, unaltered geometry. The key is to use the displacement map on the version of the mesh you created it from…otherwise you will get obvious seams.

If you use the Multi-Displacement 2 quick code DE-LBEK-EAEAEA-R32 then you don’t have to do any editing at all of you displacement map/s.

You have the step of flipping your maps vertically posted twice… you only do this once…and if you’ve done this you don’t use the -1 Tile step within max’s material editor.

Usually, 1 Turbosmooth iteration is enough, especially if you’re using a Normal map as well.

No... 32-bit maps are preferable over 16-bit. 32-bit maps allow for more detail and no "stepping" of the displacements. The following thread contains great instructions of rendering displacement maps in 3ds max 8. It's tried and true... [http://www.zbrushcentral.com/zbc/showthread.php?t=32020&page=1&pp=15](http://www.zbrushcentral.com/zbc/showthread.php?t=32020&page=1&pp=15) Good luck

Hi guys, and thanks for the responses!

rkanyama: I’m actually doing pretty much what you say there, but it doesn’t seem to work for me. I must be doing something wrong somewhere though…

smokebox46and2: that tutorial you pointed to is actually the one I was talking about in my original post. It works fine for me too, it’s just a problem for me when I generate my own displacement maps. The one supplied in that tutorial, for that head - work fine. That’s what’s making me think the way I’m generating my own displacement map is wrong and I’m not sure why.

I’m going to spend some time going through the pipeline again, I had thought I’d narrowed it down to the steps above, but obviously something else is still wrong.
I’ve been avoiding the whole Multiple Displacement 2 tool I’ve seen people talking about, because to be brutally honest, if I haven’t even got the basics yet, that tool is just too intimidating.

Okay, seem to have it working now. Phew!
So, I changed things around a little. After modelling in ZSpheres, I created a PolyMesh3D object and exported that as OBJ. I imported that into Max, edited it, gave it a flat UVW map and collapsed it (to make sure the UVs were all in 0,1 space), then exported that as OBJ again. After bringing it back into ZBrush, I divided it, sculpted, textured, went back to Level 1, turned on Adaptive under Displacement, used the MD2 plugin to generate a tiff using the code you gave me smokebox46and2 (and also mentioned in the guide), exported the model and reimported it into Max. Then I did something I hadn’t done before, I used the settings in the practical guide for mental ray. I hadn’t done this before as I’ve seen so many tutorials and they either use a Displace modifier on the mesh or just throw the map into the Displacement map slot in a standard material. All the difference in the world, works a charm! Thanks a lot guys, really appreciate the help!

Ok, but both render methods work like a charm…

Glad things are working for you :slight_smile:

Yeah, thanks again for all the help. It’s really appreciated. I suppose I was mixing things up between different tutorials and not using the guide properly.
And I know this isn’t the decent thing to do, but can I ask you just one more question? When in Projection Master, if I want to snapshot alphas on to the model using a DragRect stroke, is there a way I can rotate them before placing each snapshot?

In Projection Master you can rotate any alpha a full range of 360 degrees while dragging if you use the Directional Brush with the DragRect Stroke…

Have fun :wink:

You sir, are a hero!
Thanks for that!

No problem :wink:

I think I learned that from one of the Meats Meier or Aaron Sims DVDs found at www.thegnomonworkshop.com, but I’m not sure…I’m terrible at crediting people :confused: …I mean the best, though.

Have a great day

Hi,
Would it be possible for youto outline what settings you used from the pratical guide in Mental Ray for this thread? I would like to recreate your steps for my own sculpt.
Best,
Jacques

Sure. Basically I just followed the instructions from page 17 on to page 20 (chapter 5):

  • Change renderer to Mental Ray

  • Unclick the lock icon for the Material Editor

  • Select a standard material and apply

  • On the Mental Ray Connection rollout, unlock Displacement and choose 3D Displacement

  • Use the map you generated in ZBrush in the Extrusion slot

  • Set Extrusion Length to 2.2

  • Go to edit the map in the Extrusion slot

  • Set Blur to 0.01

  • In the Output rollout, set RGB Offset to -0.5

  • Make sure your mesh has a Turbosmooth modifier on it with at least 1 iteration

  • Back on the Rendering dialog, go to the Rendering tab and under the Shadows and Displacement rollup, set the Edge Length to 1.0, the Max Displace to 2.2 and the Max level to 7.0.

  • Render! BAM!

Hope this helps!