View Full Version : These displacement maps make me all bloaty!

08-30-2008, 02:36 PM
Okay, so, this has been driving me nuts...I've been trying to get these ZBrush displacement maps working for a week straight, and I'm pulling my hair out.

Originally, I just couldn't get them to work right at all. I would use the post 9.0 nodal system to set it up (image>subtract>multiply>normals>scalar>input), and the mesh would just explode. I eventually figured out that the multiply value I was using from the tuts was WAY too much (they had it at 16, I reduced it to about .05!) I thought that fixed everything...

But then I realized that even that low value is bloating out my entire mesh a little bit...not just the parts that I've displaced in ZBrush. I realized this because I have a character with modeled hair, and when the displacement map is applied to the head, it is poking through the hair. And I do have the subtract node set to 0.5. So it seems like to me that something is wrong with the displacement in Lightwave...it shouldn't be bloating the whole mesh when applied...only the areas that I painted.

Does anybody have any suggestions for me? I'm crazy frustrating and very desperate...

08-30-2008, 03:27 PM
You know, every time I go to do displacement maps in LW I get the same results, though each time I figure out what I'm doing wrong. But, I can't quite recall what it is that causes that.

Is it setting displacement before/after subdividing? I think that might be it, but I am unable to test that right now.

08-30-2008, 05:45 PM
You shouldn't have any problems if you follow the Steve Warner tutorials. Can you post some images / screengrabs / files?

Are you saving out a poly cage obj version of your ZB sculpt? When you subdivide in ZB points are moved about and can result in a slightly distorted mesh when you import into LW.

08-31-2008, 12:11 AM
Yeah, I am saving out the OBJ from ZBrush.

I tested this problem with a sphere made in Lightwave, and it didn't seem to have this issue, but when running the same test with a sphere made in modo, the problem happens. I attached this scene so you can see.

If you toggle the "Edit Nodes" checkbox under the deform tabs to toggle the displacement, you can see the object bloat up and down.


08-31-2008, 12:28 AM
check for a vert normals vertex map in modeler. Delete it if found.

08-31-2008, 12:45 AM
There's a weight map (called "SubPatch Weight"), a UV Map ("OBJ_UVTextureMap"), and a Point Selections map ("Default"). Are any of these what you are referring to?

08-31-2008, 03:28 AM
Are you subtracting a value from your map? You need to subtract .05 from your map (if grey is your mid point) then multiply by a scaling value.

08-31-2008, 11:30 AM
Yeah, I have a subtract node set at 0.5.

@Mike_RB: Where would I find the vertex map, if there is one?

09-02-2008, 03:00 AM
Hey there, ilollar. Were you able to solve this?

Jim M
09-02-2008, 08:06 AM
There are at least 2 ways to produce displacement maps out of ZBrush. You can set the the mid value on either. I noticed at one time on a fresh install one output with the mid at 120 and the other at 128 (127 works best for me)... also you will get different behaviour from a 16 bit and an 8 bit image.

09-02-2008, 11:28 AM
Yeah, I haven't solved this yet. I do know that the model doesn't have a vertex map. It also seems to be a problem that is happening with models I made in modo, though I don't know why.

My workflow is: model in modo, export obj, import to zbrush, make uvs, sculpt, export displacement, export new obj, import to lightwave, add displacement.

I'll try looking at the mid value set in zbrush. I didn't know that that could be changed. I also posted up a test scene you can grab if you like up above in a previous post. You can see the issue I'm talking about.

Thanks for the help!

Jim M
09-02-2008, 12:47 PM
2 things strike me off the bat...

Firstly the disp.map generated has more than just a few dots on it, It has all sorts of variation over the UVs......

Secondly I think you are screwing up the displacement map gen or export.

How are you generating (settings) and how are you exporting (there are easy ways to screw this up, also give settings if relevant).

It will be straight forward to fix.

09-02-2008, 01:26 PM
I've been switching back and forth between how I export the displacement maps from ZBrush. I think that map was exported using the old style way (not with the Multi Exporter).

After I GUV tile it and finish subdividing and sculpting, I lower my mesh back down to the lowest resolution, go to the Displacement menu under Tool, set DPRes to 2048, turn on Adaptive and Smooth, and then create the map. Then I Flip V and export from the Alpha menu. Then I export the lowest resolution mesh to obj and go to Lightwave.

Jim M
09-02-2008, 02:52 PM
Well it all sounds like a normal procedure. You can get a different result with your tif saving method, but if you are using the store morph target, you shouldn't need to export any geometry from ZBrush.

Ahh I remember having this issue... the two numbers which work are 0.01 and 16. Why, I can't remember...

There is now more options with lw obj export, you can set 'write normals off' and all that jazz, maybe that helps...

Jim M
09-02-2008, 03:13 PM
Incidentally if I import your object, Store MT, divide lv4, sculpt, lv1, Switch MT, Displacement map, Alpha select, Disp Exporter, it all works fine....

09-02-2008, 04:03 PM
Ilollar - I feel your pain!!!
I worked on trying to set-up/render zbrush displacements on a lightwave character model all *BEEP*ing weekend, with similar results.

If someone knows how to get this to work with zbrush 3 and lightwave 9.whatever would you be kind enough to post very specific instructions here.

09-02-2008, 04:32 PM
Ilollar - I feel your pain!!!
I worked on trying to set-up/render zbrush displacements on a lightwave character model all *BEEP*ing weekend, with similar results.

If someone knows how to get this to work with zbrush 3 and lightwave 9.whatever would you be kind enough to post very specific instructions here.

Did you search the forums?

Check out this thread - plenty of examples to play with. Solutions about post 18.


It does work.

09-03-2008, 01:19 AM
Okay, I finally figured it out. It does work...but only if you take specific steps. I imagine there are more people than just me out there crazy frustrated by this (in fact I know there is - renton), so I thought that I'd post a detailed step by step. I hope it helps some people out!

1. Make your base model - I've tested this starting with either Lightwave or modo and I've had both work.
2. Make UVs - this step is optional if you are planning to use ZBrush's quick GUV solution.
3. Export an obj - When asked by Lightwave to use point sets as groups, I've done yes and no and haven't seen a difference.
4. Import obj into ZBrush - Slow down...don't start subdividing or sculpting yet...
5. If you didn't make UVs in your host app, make UVs with GUV - Skip this if you already made UVs.
6. STORE A MORPH TARGET - This I found is the key step...without this, everything will be messed up in your displacement map.
7. Now, displace and sculpt away! - Have fun and go crazy. Done? Okay, move on then...
8. Lower the mesh back down the lowest subdivsion level - Should be 1.
9. Switch the morph target - Once you do this, don't go back up to a higher level (this is a saftey precaution).
10. Export a displacement map - There's two ways to do this. You could go old style, and use the Displacement menu under Tool. Set the map size in DPRes (probably 2048), turn on Adaptive and Smooth, and hit Generate Displacement. Once done, select the Displacement map in the Alpha menu, Flip V, and export the tif.
Use the Displacement Exporter 3. It is under ZPlugins. In its options, use the quick code: DE-FBEK-EACADA-D16 to set all the right settings for Lightwave. Then, just click Generate.
11. Export the obj - You only need to do this if you generated UVs in ZBrush.
12. Load the object into Lightwave - Either the original object (if UVs were made in the host app), or the newly exported obj.
13. Set up the displacement node structure - Go to object properties, check the button next to Edit Nodes. Click Edit Nodes, and import the attached node structure. Make sure to connect the result of the scale node to the input node. Load the displacement map into the image node. Check to make sure it is using the UV map of the object.
14. Check the multiply node - This controls the amount of displacement. I've seen discrepancies as to the correct value for this node. Some have it as high as 16. I usually have it really low - anywhere between 0.01 to 0.05. Just try to match what you had in ZBrush.
*At this point, if you toggle the check box next to edit nodes, the displacement should turn on and off. The mesh SHOULD NOT BLOAT. Meaning, only the displacements painted in ZBrush should appear and dissapear. The entire mesh shouldn't be expanding/deforming. If it is, then one of the above steps wasn't executed properly.*
15. Raise the displacement amount - This is under the Geometry tab in the object properties. I'd first raise the Display SubPatch Level to around five, maybe higher. This gives you a higher SubPatch level in the viewport. You could just raise the value for the Per Object Level Render SubPatch to subdivide it more at render time, but I think it's best to use a more adaptive approach. Switch the drop down to Per Polygon Level, and then hit the T box to go to the Texture Editor. Change Projection to UV, select the object's UV map, and then the displacement map for the image. Then Add Layer, and add a gradient. Make sure the Input Parameter is set to Previous Layer, and create a gradient that ramps from a high value at the top and bottom to a low value in the middle. It should be something like:
Value:100, Parameter:0 | Value: 10, Parameter: .5 | Value: 100, Parameter: 1.
This will subdivide your mesh more where more detail is, based off of your displacement map. If you find you need more or less resolution, just change the Values. The top and bottom ones should be the same, though.

That should be it. Sorry about the long post! I hope somebody finds it useful!

*Disclaimer: This is the method I've found works for me. Obviously, everybody's situation is different, and computers and their respective applications seem to find it hilarious to produce different results randomly for different people. To all pulling out their hair over ZBrush to Lightwave workflows, I hope this solves your problem. If it doesn't, I apologize and sympathize deeply...

Thanks for everyone's help!

09-03-2008, 01:40 AM
:) good method. Similar to one described by Steve Warner :D

One thing I do, though, when I'm doing static renders, is that I export a higher resolution mesh from Zbrush, just look at the contour of the model and find lowest SubDiv level that doesn't ruin it. Displace the model in Layout and add Normal maps as a little helper.

Some results can bee seen here http://www.newtek.com/forums/showthread.php?t=87878

09-03-2008, 01:53 AM
Yeah, I know. I guess the most important thing I stress is to actually store and switch the morph target. I ignored that in the Steve Warner tut, and it caused me weeks of headaches.

Jim M
09-03-2008, 03:58 AM
Well there are 3 different tutorial sets for the same thing on his site, so I am not sure if that caused confusion.

6. STORE A MORPH TARGET - This I found is the key step...without this, everything will be messed up in your displacement map.

For the record, this is only true if you aren't exporting LV1 displaced geometry (as oposed to LV1 StoredMT) out of ZBrush. If you are then you don't need the morphtarget method. Again this is out of Steves tutorials, and I have found it to be most definately true.

Jim M
09-03-2008, 04:03 AM
Also for the APS map, I find I get better results with photoshop tweaking of the map and have dedicated one. Often some edge filter,blurring and BC is all thats required....

09-03-2008, 11:06 AM
What if I’ve already done the sculpting and didn’t store morph targets?
Can I just click store morph targets and then just subdivide the mesh again or do I have to start over? (sad face.)

Maybe tonight, if I have time, I’ll try the workflow listed above (Thanks, ilollar.) with a screen recorder on and if my mesh still explodes maybe you guys will be able to see where it goes awry.

09-03-2008, 11:34 AM
@Jim - That's why I ignored the store morph target section of the tutorials...because I was exporting the lv1 version of the mesh after sculpting. But for some weird reason, if I try to map a displacement map before restoring the stored morph target, the map is all screwy. You saw that in the ZIP I posted. And then when you tried it yourself, you used the morph target route, and the map came out fine. That's what sent me in the right direction to find the solution above.

@renton - Sorry, but it looks like the sculpting we've already done is lost. At least, with the solution I've found, I can't seem to find a way to preserve the work I already did, because I didn't store a morph target in the beginning. I even tried reimporting the base mesh OVER the lv1 mesh...which sort of worked, but for some reason it offset the entire mesh upwards slightly in ZBrush.

09-03-2008, 11:45 AM
that sucks!!!
hummm - maybe I'll asked my question again in the zbrush forum...

Jim M
09-03-2008, 12:07 PM
Illoar, I have tried both methods, LV1export and MT, with your object. Both work for me.

You DON'T need to store morph targets. If you haven't stored a morph target its fine. You should go the LV1export method. It should work fine. In fact in most situations it is preferable.
(always store a morph target anyway ... the morph brush is handy)

In the disp exporter, this is what works for me DE-FBEK-EACADA-D16

Beyond that all I can think of is you did some smoothing that you forgot about... and it shows up slightly...

09-03-2008, 08:44 PM
Jim, I must be doing something wrong, because I just can't get it to work with the lv1 mesh. I can see the difference in the displacement maps before I even export the lv1 mesh.

The displacement map made when I switch morph targets is completely gray, except for anything I've painted. So, for instance, if I paint some additive dots on the object, then the displacement map is completely gray except for white dots on it.

With the displacement map made without switching the morph target, there is white gradation all over any UV map portion in addition to the dots. I think that's what is making the object bloat out in Lightwave when the map is applied.

This is very frustrating...

Jim M
09-04-2008, 03:59 AM
I noticed that on your dispmap, and wondered what was going on.
What version are you on & can you give me your disp exporter settings code? so I can compare settings...

Jim M
09-04-2008, 04:02 AM
Just out of curiosity, at what stage did you generate your uvs? as soon as you imported? or after sculpting, and at what subdivision level?

09-04-2008, 03:16 PM
Jim, I've tested this in both ZBrush 2 and ZBrush 3, trying both the Displacement drop down in the Tool menu (DPRes at 2048, Adaptive and Smooth turned on), and the Displacement Exporter 3, with settings DE-FBEK-EACADA-D16. In each of those tests, I exported maps with and without resorting the morph target. In every case, when I restore the morph target I get this:


And when I don't restore the morph target, I get this:


Apparently, this is not an uncommon problem. I did a little search at the ZBrush forums, and found this:


What is so confusing is why other people, like you Jim, aren't having this same problem. You say that you don't need to restore the morph target, and I'm assuming you aren't getting messed up displacement maps.

I've attached the OBJ I used in my tests. My process is pretty straight forward: Load the OBJ, GUV tile it, subdivide it (I went to level 4 in these tests), paint some lines or dots, lower back down to level 1, export displacement.

Let me know what results you get.

Jim M
09-04-2008, 03:56 PM
YOur object is not the right object to test this on. You are mixing triangle with quads at a pretty low poly level, and this is one reason you have that outcome with that object.

The spots where you have errors looks to be where you have tris, and these are moving a massive amount when you divide the mesh. Therefore you would expect a massively different result...

Do it with a all quad box or something, see what happens...

Jim M
09-04-2008, 04:11 PM
Ok, I see another issue, the object you are using is very lo poly, therefore on the first subdivide there will be greater movement, and thus greater probability of 'bloating' if using the export LV1 method (no MT), because you will have to have your node setup perfectly, i.e mulitply node at the exact right number. Its not broken, it is working correctly. Don't fret, its like this for a reason... If there is a lot of movement between the MT and the LV1 then its either because one did it oneself or there aren't enough polys in the initial object. If you just import a 6 poly box, this process will be amplified...

To be sure, you can use the storeMT method. Or if your object is fit (a bit higher poly, and avoid Tri's), you can export it and use a none MT displacement map.

The rule of thumb, if you are making finer changes use storeMT 'displacement export'. If you are making broader changes use LV1 subd 'mesh export ' & noneMT 'displacement export'...

09-04-2008, 04:14 PM
Whoops...yeah, you're right. That did have triangles...that's a noob move with ZBrush. Sorry.

I made an all quad box instead. Same process...load into ZBrush, GUV, divide to level 4, paint, lower to level 1, export displacement.

Results with restoring MT:


Results without restoring MT:


I attached a new ZIP with the quad box object. Do you get the same results?

Jim M
09-04-2008, 04:21 PM
Yes exactly how it works...

I was baffled at first because I never bring such lo poly objects in, and I haven't had the need to examine the maps up close...

It is correct.

now try it with a high poly box, and you will notice what happens on the displacement map for the noneMT....

Jim M
09-04-2008, 04:25 PM
The thing is, it doesn't matter.... apart from when you export you mesh at LV1, with its corresponding noneMT displacement map AND you are using very low poly at that first subdivision level. If that happens... your multiply node must be the right number (to get the correct underlying form)... and regardless with that method (and lo poly objects) toggling displacement on and off will demonstrate that bloating effect you describe, and to a much lesser degree, it will be the same with high poly objects.

09-04-2008, 04:45 PM
I want to chime in here to help.

I too went through this painful process in LW in 2004-2006.

Sometimes I'd have a success and other time hit a wall. Finally I committed to learning all the steps properly and fully and can get predictable results every time.

Here are some tips for those who want to use Zbrush/Mudbox/sculpt app with LW.



When you see great Zbrush results in the gallery rendered in a 3rd party app I guarantee you they are all done with nicely laid out UV maps. You can always try to rely on GUV/AUV tiles and you will get some decent results making you feel good about them depending on the situation you test them with but you will never ever really understand how to get exactly what you want until you learn proper UV mapping and unwrapping.

Learning this step was the biggest pain relief of my entire time of trying to get stuff to look right in any app much less LW.

Number Two.

Learn proper SubD modeling with quads.

Although you can use triangles in subD modeling here and there it is best if you don't rely on CC subD because its useless once you get the object in Zbrush. But more so then just the quads is to know why professionals use certain polygon flow in faces, arms, legs, ears, so that you can get those details in the general shape before attempting displacement. This is important because often people will try to start with a sphere and then model a nose and ears and horns and then they wonder why it wont displace properly. Displacement is a tool and not a magic wand. You need to get your general shape modeled and UV mapped so that the areas of detail are where you need them and not trying to get new large area details (ears, horns, etc) from displacement alone.

Numer Three.

Learn retopology.

Retopology is not only for those who want to model a monster from a sphere OR those who start with a great base mesh before sculpting and then get creative along way, but retopology is also for those who want to clean up the general mesh's poly flow once the final detail level is achieved so that you are stressing the displacement map very little while keeping all the nice details.

In any case Retopo was the final cherry on the cake that made it so that I could really indulge myself in Zbrush and then retopo the final high res mesh to a manageable/animateable mesh while still getting the high quality at render time.

This applies to all apps, not just LW.

I put UV mapping above proper quad subD modeling because it really should be learned first before even trying Zbrush. You really will learn subD modeling first but to do it properly is another game. Watch as many anatomy modeling tuts you can.

I know there are many who circumvent these steps but they always hit a wall.

09-04-2008, 04:47 PM
Yeah, that's what I'm coming to find out...it looks like this is how ZBrush was actually intended to work...just exporting the lv1 mesh AFTER sculpting isn't a prefered way of working, because the displacement map SHOULD be generated from the unaltered original mesh, even if you start from scratch in ZBrush (using ZSpheres)!

When you subdivide and sculpt at high levels, it alters the lv1 mesh. If you generate a displacement from the altered mesh, it includes the changes in the mesh itself. That displacement, applied to either a fresh exported lv1 mesh or the original mesh, will create the bloating issue I've been dealing with.

It looks like there are several workflows that are nessecary to avoid this - storing a MT, import the original mesh over the lv1, and using Cage. This is good news *renton*, it means any work done already without storing a MT should be salvagable.

Check out this thread over at ZBC, aurick explains the whole thing:


I can only assume, based off of his explanations there, that you should restore the lv1 geometry using one of those ways every time you work. I think the bloating issue is minimized when starting with a higher ploy base mesh, but it will still be present if the displacement map is exported before switching back to the original geometry.

09-04-2008, 04:54 PM
Intuition - Thanks for the chime in! Your advice is much appreciated. I agree fully, the tests I've been putting up here were sloppy balls and boxes to just test imports/exports...the real models I'm trying to get working have been fully UVed and are all quads.

Do you have any good resources for learning retopology? Are you referring to retopologzing (is that a word? :)) in ZBrush, or in an external modeler?

Also - did you have these issues with needing to store morph targets (or reimporting the original mesh, or using Cage)?

09-04-2008, 05:03 PM
I use an app called Topogun because Zbrush retopo is a little slow and cumbersome to do.

But you will still need to learn how to move the data from the original mesh to the retopo mesh. You can bake in Topogun or Zbrush. I create the retopo mesh in Topogun and then append the details back in Zbrush.


Request the beta....

With topogun you could start with a sphere or anything and then retopo when your happy.


This is a quick tut on moving detail from one mesh to another. Note that you will need to set up your UV maps in the retopoed mesh once its finished as well then you can do this step. Topogun does not do the UV maps yet.

http://www.veoh.com/videos/v1107274r38q3GFB?rank=6&jsonParams=%7B%22numResults%22%3A20%2C%22rlmin%22% 3A0%2C%22query%22%3A%22zbrush+retopology%22%2C%22r lmax%22%3Anull%2C%22veohOnly%22%3Atrue%2C%22order% 22%3A%22default%22%2C%22range%22%3A%22a%22%2C%22sI d%22%3A%22315670877715404914%22%7D&searchId=315670877715404914&rank=7

09-04-2008, 05:08 PM
Thanks Intuition, topogun looks sweet.

In your workflow, do you store and restore morph targets before exporting your displacement maps?

09-04-2008, 05:22 PM
Well I store the morph target mesh upon import so that I have the original shape as reference. Sometimes I will not switch back to the target merely due to the fact that the new low res mesh lines up better then the morph target but in this case I use retopo anyways so I end up forcing the details onto the new mesh.

I would recommend storing a morph target as a habit so that you can get back to your original but I can't say I have "re-stored" my mesh target unless you mean simply switching back to the morph target.

Often I will try to export the original stored morph target and the new base mesh that is the non-morph target mesh and see which one gets a better result.

First thing I check when loading up these OBJ files in any app is to make sure the UV map is not ruined. Sometimes with discontinuous UVs you will get random vertices attaching through your UV map layout and this ruins everything.

09-08-2008, 12:13 PM
Just thought I'd wrap up this conversation with some info I got straight from aurick over on the ZBC forum.


I asked: "...is it an incorrect practice to simply go back to level 1, make a displacement map, and export an obj without either swapping a morph target, reimporting the original mesh, or using a cage?"

He responded: "That is correct. You need a cage mesh in order to have the best results from displacements. So you need to use one of those three methods [switch morph target, reimport original mesh to level 1, or make a cage] to get a cage before the map is calculated."

So there's our answer, right from Pixo. Anybody having issues with displacement maps not being generated appropriately out of ZBrush, it may be because of this.

Thanks to everybody who helped me out!

09-08-2008, 03:26 PM
Glad you got there in the end. But I did recommend the cage solution in post 3!

If you save out your mesh from ZB after sculpting, without resorting to saving out a cage, you'll notice points have been moved around subtly - but enough to alter the appearance of your original mesh.

09-08-2008, 03:31 PM
That you did bob...I actually didn't know what a cage was before all this...I thought you simply meant exporting the level 1 obj of the sculpt...that's where my problem was.

Jim M
09-08-2008, 04:38 PM
1. switch morph target
2. reimport original mesh to level 1

So these to are the same thing effectively as far as I understand...

For the avoidance of doubt, what is the cage method?


09-08-2008, 05:00 PM
That you did bob...I actually didn't know what a cage was before all this...I thought you simply meant exporting the level 1 obj of the sculpt...that's where my problem was.

It's much better to click the 'Cage' button after you've taken your model down to Level 1 so you end up with a mesh resembling your original model you can then use in Lightwave.

When you subdivide a model in ZB it moves points about in such a way that when you take it back down to Level 1 and import straight into Lightwave it seems excessively smoothed (at least in my experience).

11-17-2009, 07:49 AM
14. Check the multiply node - This controls the amount of displacement. I've seen discrepancies as to the correct value for this node. Some have it as high as 16. I usually have it really low - anywhere between 0.01 to 0.05. Just try to match what you had in ZBrush.

eh eh i know the secret, but if i tell you, later i must kill you eh eh

ok, it's a joke.

the value of multiply is not a secret, but it cannot be fixed value.
the value is related to the scale of object.
with displacement you blow a mesh, but you work with % value of.... of scale of obj.
sometimes you need an higher value sometimes lower value. all depends of original scale of obj.

have a nice day