ZBrushCentral

Displacement for beginners

Hello all,

I’m trying to export from ZBrush to other packages for rendering purposes, but it’s just not happening for me.

I am modelling everything in ZB and then plan to import them into external apps to render with Renderman or Mentalray etc. My models are usually in the region of 13+ million polys.

I’ve been searching the web for days for some simple steps as to how to do it with displacement maps, but all I’m getting is pages and pages of settings to tweak to get things looking right. Surely there is an easier way? I purchased ZB so that I didn’t have to get too involved in the technical side as time is usually and issue.

If anyone can please give me some tips, or links to tutorials or where to buy them from I would appreciate it.

I am using ZB3.1 and the software I can use to render it in is Maya 8.5 - Cinema 4D 10 or Modo 203.

Ideally I would love it if someone could draw a sphere in ZB, sculpt it and then import it to an external app and render to show me how something simple like that is done, but I understand you’re all busy.

Thanks.

The problem is that there aren’t standards for displacement mapping. Each application has its own way of handling this subject. In fact, some applications have multiple ways! (Such as Maya, with its built in renderer and the various other standalone renderers.) Every engine has its own way of plugging a displacement map in. There are also multiple formats which some engines use and others don’t. One engine might use a single 32-bit floating point map, while another engine might use two different 16-bit maps with one handling positive displacements and another handling negative displacements.

In other words, it’s a bit of a mess. :wink:

Because of all these possible variations, ZBrush is capable of outputting a wide variety of displacement maps. Within ZBrush, the basic steps are always the same:

  1. Import your base model or build it in ZBrush.
  2. Store a morph target
  3. Subdivide and detail
  4. Return to level 1
  5. Switch to the stored morph target
  6. Use Displacement Exporter to create the map

The only place where this normally changes is when it comes to the specific settings that you use in DE. Those vary depending on the particular rendering engine that you’re going to be using the map in. ZBrush can output any type of displacement map that you need, but it’s up to you to understand your renderer and know what it requires. As well as how to plug your map into that engine once output from ZBrush.

That having been said, we’ve tried to provide at least some assistance. If you go to the Tutorials forum and do a search for ZPipeline, you’ll find that there are a series of tutorials which go into detail about how to handle specific rendering engines.

Thanks for the reply.

I understand what you’re saying.

I am familiar with the steps you list and I have tried them plenty of times, I just really am stuck on what settings to place in DE3, and then what settings to place in Modo etc. I have chosen Modo as an example as it is a lot simpler to use than Maya, although if I use Maya it is usually with Mentalray.

I’ve tried the default Quick Code for Maya - i.e DE-LBEK-EAEAEA-R32

But then the settings in Maya go over my head a lot. I suppose I’ll have to accept there is no easy way and learn the ins and outs when I get some spare time.

Thanks for the info.

most the time it seems u just have to set the refinement seetings or geomertry approximation settings in your render app,like i use xsi and have t o tweak lower numbers ,in the settings to get a perfect displacement identical to zbrush high poly mesh,just takes alittle practice and settings is all good luck :cool:

It took me a long time to figure out how to do the displacements in Maya–I finally got a digital tutors vidoe and it helped–but in their case they didnt use the stored morph target–they exported the altered zbrush object–because the model hadnt been pre-rigged.

Aurick (or anyone else),

What is the reason for storing the morph target? I’ve seen it donee both ways and the result is the same, so I’m curious (said the cat) what exactly is the morph target function for?

Morph target is so that if the object you are working on is being rigged for animation as you are zbrushing it you wont be sending back an altered mesh that has the vertex order changed.

The altered zbrush mesh is truer to the displacement than the morph target since that is the mesh you sculpted over.

So let me see if I understand this correctly?
If I set a morph target, and then I subdivide the mesh, Zadd and Zsub…get what I want and then go back to the morph target the verts will not have reordered ???

That’s right–because you went back to the original level one pre altered mesh. The same one you had before you started altering it.
Unless you radically reshape the object, there shouldnt be that much difference in how the displacement comes out. But I prefer using the altered base mesh and export that back into maya.

All right, thanks for the info.

Sorry about the thread hijack asaxon, you can all return to your seats. lol!

Not a problem mate, it’s all related.

When you subdivide a model, it is smoothed by the subdivision algorithm. This smoothing results in a contraction of the surface. When you later return to level 1, that contraction is interpolated back down, with the result being that your level 1 mesh is now smaller than what you originally imported. (You can see this in action by loading a 6-poly cube, storing a morph target, dividing it, then returning to level 1. When you switch morph targets, you’ll see the cube jump in size. The more polys your model has to begin with, the less this will be noticeable, but it will always be there to some extent or other.)

If you now create a displacement map and then apply that map to the original model, the resulting render will be pretty puffy. This is because the displacements were calculated to be much stronger than are actually necessary for the model that the map is being applied to.

For this reason, it’s always necessary to restore your original mesh before you create the displacement map. That way, the map will be calculated for the base mesh that you’re actually going to render, rather than for the one that’s been affected by multi-res editing. The easiest way to do this is to store a morph target the instant you import your base mesh. Not only does this allow you to restore your original at any time, but it also allows you to go back up to higher levels later if you need to. Before going up in levels again, you would switch back to the smoothed mesh. If you don’t, then your newly enlarged level 1 will cause the upper levels to enlarge as well, which will skew your high-level sculpt!

I don’t know if you’re going to read this or not Aurick, but a VERY HANDY feature would be to have the morph targets named for you. You know, something pretty standard would do (like Original, and New), just so you can recognise which is which when you Switch from one to the other. Without it, I find I sometimes go down to level 1, Switch, generate maps, and then accidently go up again, ruining the original model. Alternatively, a warning or something when doing this would be nice too.

Just a “You are about to change your original model and not it’s morph target if you change subdiv levels now, are you sure you want to do that?” type-of-thing.

Ok I’ve decided to dedicate today to trying to figure out the Displacement map process for Cinema 4D 10, so if I find anything out I will post here to help out others in a similar situation.

Here’s some tests for C4D 10:

The original
original.jpg

Cinema 4D with a PN32 disp map. No matter what settings I now change in Material editor box the result is more or less the same, although the displacement is definately being picked up.

pn32c4d.jpg

Using the following Quick code:

DE-JCGK-EACADA-4D_D32 results in:

dejcgk.jpg

Ok it’s getting better, but does anyone know how to correct the parts circled?

The settings I’ve got for C4D are:

HDR Gamma 1
Sub-Poly Displacement = on
Subdiv level 5
All other settings = on
Keep original Edges = off

weird.jpg

can software have multiple quick codes?

DECLOAK, yes you can use different Quickcodes for your 3D package and slight changes can have a big effect.