PDA

View Full Version : Displacement map Zbrush 3.5 - fine details lost when exported


Stormf
12-30-2009, 05:49 PM
Hey,
My problem is, as the title says, that I loose all fine details when I export my displacement map from zbrush, or at least it seems that any other program than zbrush, can't read the details (zbrush reads all the fine details in the map when I apply the map to a newly imported OBJ).
Some pictures to illustrate:
This is my model rendered in zbrush, at subd 6. (satanic cyclops nudity warning)
http://www.frederikstorm.dk/images/doodles/kykloptextured10.jpg

And this is what a friend of mine gets when he tries to apply it to an imported OBJ in max:
http://henrikbclausen.com/kyklop_12_disp.jpg
http://henrikbclausen.com/kyklop_13_disp.jpg
I think the images speaks for themselves.

And just to compare the two maps:
http://www.frederikstorm.dk/test/dispnorm.jpg
This shows even more clearly just how poor the map is.

And this is where it gets really funny, 'cause zbrush apparently have no problem reading the fine details in the map, this is a little test I made in zbrush, where I exported the mesh at subd5, closed zbrush, opened it, and then imported the newly exported obj, and then applied the displacement map:
http://www.frederikstorm.dk/test/testdisplacementmapinzbrush.jpg

All the maps used are at 4096*4096

And the "funny" thing is, I get perfect normalmaps, no problem at all, but I must have totally missed some setting when exporting the displacement map, but I have tried for around 4-5 hours playing with the settings, and searching for some help on the web, but no luck.

I really hope some one out there know what we are doing wrong, and how to fix it.

On a total side note, my friend who did the max renderes, would like to know, why the normal map works so good as displacement map, this is the model with normal map applied as displacement map:
http://henrikbclausen.com/kyklop_12.jpg
http://henrikbclausen.com/kyklop_13.jpg
Obviously the shape is not quite right, but its still a lot better than the results with the displacement map applied as displacement map.

EDIT:
Solution to this problem found, see bottom of the page.

spaz8
12-31-2009, 03:36 PM
Your issue is in max it looks like. Your diplacement distance is possibly too much/strong and the mesh is inflating too much washing out the details. Or you haven't dailed in the plus and minus range since zb displacement maps do zero displacement at 50% gray, push outwards towards white and push the geometry innwards towards black. Depending on your settings you may only be getting one half of the map ( gray and brighter) affecting the geometry. Usually you want a min/max setting on your displacent image of -100 and +100 so 50% gray equal no effect on your mesh. Look on the pixologic site for a 3ds max specific "rendering in other apps" info guide. Cheers Ken

Stormf
01-01-2010, 02:29 PM
Thanks! That sure sounds like that could be it, I'll try it out as soon as possible ;)

Stormf
01-05-2010, 09:38 PM
Update,
We've been messing around with this for god knows how long, and we are now a lot closer to solving this mystery.
Spaz8, while your info did not solve the problem it definitely helped me get a better understanding of how displacement maps works, so thank you ;)

Okay just to let you guys get in on the progress, I generate a 32bit 3 channel thingy map, whit the mid set at 0.5 and the scale set at 0.25, I then took this map into PS, and brought it down to 16 bit, making sure the mid gray was the same as on an exported 16 bit map.

Now this is the result we get, when my friend here render it out in vray:
http://www.henrikbclausen.com/kyklop_16.jpg
http://www.henrikbclausen.com/kyklop_17.jpg

As you can see the details are all there (lets look away from the fact that the UV could use some work), and the shape is there. However, these strange lines have started showing up, I am sure you can see what I mean. So my question is, how do I get rid of these, so I'll get my smooth mesh out?


But, to make matters worse, especially because I am such a huge fan of zbrush, he took the high ress model and low ress model and generated a displacement map in mudbox, and this is what came out:
http://www.henrikbclausen.com/kyklop_14.jpg
http://www.henrikbclausen.com/kyklop_15.jpg

As you can see, this looks fine (could use a little tweaking, but besides that).. I really hope someone out there has got an answer for this, would be much appreciated ;)

spaz8
01-05-2010, 11:25 PM
There is a bunch of potential problems here. 1. If you want a 16 bit map, export a 16 bit map from zbrush, don't take a 32 bit map into PS and knock it down to 16. Your Photoshop may have bad color management settings that will damage the map, or you may introduce clipping issues. That is all besides the point though.

16 bit and 32 bit displacement maps are quite different. The token 16 bit grayscale map you get from Zbrush is Normalized, a 32 bit map is not. This is more of an issue with multi-displacement where you are using multiple displacement maps, they will all have different "sweet spots" if your using normalized maps.

My question would be what kind of map you are generating from Mudbox, 16bit, 32, gray, clr?

The lines you are seeing are most likely along the UV seams, often Zbrush makes garbage around your UV boarders. I don't have any immediate solutions, but I'd make sure max, or whatever your 3d app is, is not smoothing the UV's of your model so the uV's on the borders are identical to the ones your baking the map to. Ken

Stormf
01-06-2010, 07:30 PM
Thank you Ken! That did it, the problem was caused by Zbrush when it smoothed the UV, I turned it off and went trough the same procedure as before when generating the map. This is what I got:

http://henrikbclausen.com/kyklop_20.jpg
http://henrikbclausen.com/kyklop_21.jpg

No weird lines, the shape looks right and all the details are there!

So just to sum up the progress, in case anyone else should find themselves having similar problems, I've made this little pseudo tut step by step for getting the map right:

1. Go to lowest SDiv
2. Go to set the size of the UV-map
3. Set the Displacement menu like this:
http://www.frederikstorm.dk/zbrushdisplacement/displacementsetting01.jpg

4. Press Create and Export Map

4. Before we open the dokument in Photoshop, make sure colormanagement is turned off. to do this go to, Edit --> Color settings

5. Open the doc in photoshop, and just press ok to this dialog:
http://www.frederikstorm.dk/zbrushdisplacement/displacementsetting02.jpg

6. To convert the image to 16bit go to Image --> mode -->16Bits/Channel...
Set the dialog that pops up like this:
http://www.frederikstorm.dk/zbrushdisplacement/displacementsetting03.jpg

The gamma is corrected to make sure we get the right 50% gray, 127.
And that's it.

Now what I don't get is why I can't play with the scale bar (under displacement in zbrush) unless I use 32bit, because the scale was really what made the difference.

And just to point it out, the first post shows what happens when I just exported the map as 16bit without changing any settings in zbrush.
And the next what happens if you set the scale, mid etc right, but leave smoothUV on.

And once again thank you for taking some time to help out a fellow zbrusher Kenneth, much appreciated!

Edit:
And I know you said that whole converting the map to 16 bit was a no go, but it seemed to be the only way I could get the results :\

Edit Edit:
And to answer you question about the mudbox map, it was 16 bit.

Edit edit edit:
I would really like to know, why the mid gray when I set the bar to 0.5 is no 127, 127, 127, but 149,149,149?

plunq
01-06-2010, 11:30 PM
Hi Stormf,

You could always turn off "32bit" in Zbrush before generating your displacement map. This saves you from going into photoshop and trying to convert a 32 bit map correctly into a 16bit map.

Stormf
01-07-2010, 10:42 AM
Hi plunq,
I would have thought that to be the easiest solution as well, but the results of doing just that can be seen in my first post:hmm:
The details were totally blurred out, and the mid gray for some reason was 149 instead of 127. Really strange.

artquest
07-01-2010, 02:49 AM
Now what I don't get is why I can't play with the scale bar (under displacement in zbrush) unless I use 32bit, because the scale was really what made the difference.

I believe it's because the data required for scale can't be stored in a 16 bit map.

CGTalk Moderation
07-01-2010, 02:49 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.