ZBrushCentral

Annoying Distortion!!

Hey all,

Does anyone know how to get rid of the annoying distorted bits once I’ve re-imported all my maps etc back from ZBrush into Maya?

I’ve rendered it with 32 bit displacement and the colour and bump maps were also created in ZBrush.

Why does it look like this in the Mental Ray render when it looks perfectly fine in ZBrush? :confused:

For one thing, did you restore your base mesh prior to calculating the displacement map?

On further inspection I can see that the vertices on the mesh have in fact moved from where they are supposed to be. For instance where the shoulder cuts off, I put 2 edge loops close together to get a hard edge when smoothed, but in ZBrush these are moved further apart. This appears to only happen to the mesh and not the UVs. Therefore my only solution seems to be to move the vertices back to where they should be in Maya and that should resolve the stretching. A pain. I’d like to know how to combat this in future.

Moving the vertices didn’t work but merging the UV cords did. But I have some weird displacement now. Doh! I think I’ll just export the high level mesh. :confused:

Hi Res looks just as rubbish. Does anyone else have this problem with ZBrush moving UVs about when importing an OBJ? What can I do to avoid it? Am I not doing something?

ZBrush doesn’t move the UV’s. Depending on your settings, it can smooth them when you subdivide the model (Tool>Geometry>Suv). That’s all.

You never answered my previous question: Did you restore your base mesh prior to creating the displacement map? I asked this because when you subdivide the mesh it will contract. This is a natural effect of subdivision smoothing. When you return to level 1, you will see a mesh that has been modified by that contraction. If you don’t restore your base mesh prior to creating the map, then the displacement map will be calculated based on that modified mesh rather than the one that you’re actually going to be applying the map to.

Your render looks like this is exactly what happened. The edges of the mesh around the shoulders contracted and smoothed when you subdivided. That affected level 1, and in the process affected the displacement map.

If you mean did I set my mesh at level 1 before I created my displacement map then the answer is yes. If that’s not what you meant then do I need to switch my level 1 mesh with an unmodified one (i.e. like switching a morph target)? I’m not too sure if I’ve missed something in the process. :confused:

Someone else suggested I use the fix seam option.

When you calculate a displacement map, ZBrush compares the current subdivision level to the highest level. It then maps the differences and creates the map. So you can’t really create a displacement map without going to level 1 first. :slight_smile: That much of your workflow is correct.

But you’re also missing a very important step.

When you subdivide your model, it contracts. When you change subdivision levels, the one you switch to updates to reflect any changes that have been made at other levels. So when you return to level 1, ZBrush will see that your higher levels have contracted and it will update level 1 to be smaller than what you had to begin with. (You can really see this if you take a 6 poly cube, divide it, then return to level 1. Your cube is going to be smaller.)

If you now create a displacement map, the map will be calculated based on the level 1 that you now have, rather than the level 1 you started with. As a result, if you apply that map to your original model you are going to get bloating and other unwanted effects.

It’s therefore necessary to restore your base mesh (the original version that wasn’t affected by subdivision editing, and which you’ll be applying your displacement map to) before you create your displacement map. There are three ways to do this:

  1. After importing your model into ZBrush, immediately press Tool>Morph Target>StoreMT. Do this before you divide the mesh. Later, when you return to level 1 you press Tool>Morph Target>Switch. This restores your original mesh so that you can create an accurate map.

  2. If you didn’t store a morph target when you imported the model, you can still create one later. Go to level 1 and press Tool>Morph Target>StoreMT. Now press Tool>Import and load your original mesh. Save your tool. You can now create a displacement map. If you want to go up to a higher level again, press Tool>Morph Target>Switch first, to return to multi-res version of level 1. (You don’t want to return to the higher levels while the original mesh is active, because that would change those levels!)

  3. If you didn’t store a morph target prior to subdividing and the model was created in ZBrush so that you have nothing to import, then you can’t use the morph target approach. Instead, you would go to level 1 (or 2) and activate Tool>Geometry>Cage. ZBrush will now calculate a cage mesh. Create your displacement map and export both it AND the cage. If your level 1 has a low polygon count, then you’ll get better results if the cage is calculated and exported at level 2 rather than 1.

Between these three options you will always have a way to be able to restore your base mesh prior to calculating the displacement map. You’ll then get MUCH better results when you apply that map to your model in the renderer.

Ah, now I understand. :smiley:

My displacement map needs to be created from my original UVs I had prior to subdivision. After subdivision they will be smoothed/contracted and inaccurate. So I need to switch to the original ones.

Many thanks for your help on this. Much appreciated!

I have a couple more questions about this.

I didn’t store a morph target but I have the original mesh. So my solution would be to use method 2 that you described. After creating my displacement map on the original map, which mesh do I need to apply the displacement to in Maya? I tried it on the modified obj file and the displacement looked puffy and wrong. Should I be applying it to the original mesh instead?

I also tried the cage method you described too. But this makes my mesh spiky as all the vertices randomly stick out. Why does it do this?

I have tried all of the above but I still get unusual displacement around those edges and a weird strip across the chest. I’m using the Multi Displacement 2 exporter to make a 32 bit map and using the 2.2 and -1.1 settings for the alpha in Maya. Here’s my render -

… and what it should look like -

Would normal mapping instead help in any way? :confused:

I’ve found a work around for this. Instead of using 32 bit maps I’m using 16 bit instead and editing the maps in Photoshop. Not ideal, but there are blatant errors on my displacement maps that should not be there! :evil: As you can see, after my edits I’m gradually getting better results -