ZBrushCentral

displacement mapping in maya

Hi, I have only had the pleasure of playing with the ple version but have found a huge amount of support in the learning process.

so I would ask have you checked out their forums for perhaps some info regarding this? Since it is more a maya related issue than a zbrush one at this point? Also did you check out the practical guide…I thought there was a tute for zb to maya in there but of course can’t testify to any accuracy there in but perhaps you will find the missing link you are looking for?

Hey fanmap529,

I have experimentd a lot since that last post so here is a breakdown of what you need to do

In photoshop make absolutely sure that color managment is turned off it is under Edit>Color Otherwise when you open your maps to flip them or converty to RGB it will shift your gay values causing the displacments to “bloat” wven if the rest of the render settings are correct.

Open the map in photoshop, flip vertical and convert to RGM. Make sure your color managment was turned off before you open the map.

Save this map and open Maya.

in maya create a displacement material ( I use Lambert but it is a matter of preference). Load your converted map in the file node and set the alpha gain to 12 and your alpha offset to -6 or what is preferable an expression. In maya you can enter expressions into any feild you can type as long as you start with the = sign so in the alpha offset type
= -file1.alphaGain /2;

the file1.alphaGain refers to the node file1 which should be the name of the file node attached to your displacement shader. Not to complicate matters but if you see no displacement at all make sure that your file node in the hypershade is indeed file1 and not file2 or file3.

that way you can just change alpha gain and the offset will update accordingly.

In the attribute editor on your shape node make sure “featuee displacement” is turned off. This disables Maya’s settings so they dont interfere with Mental Ray’s approximation editors which are, essentially doing the same thing but better.

now with your mesh selected go to the Approcimation editor. Here is where things can get tricky expecially if you dont happen to be a Mental Ray guru (which I am most certianly not). In Mental ray subdivision at render time is called approcimation where in other renderers it is called tesselation. The subdivision apprioximation editor subdivides the entire mesh based on the settings you supply whereas the displacement approximation editor selectively subdivides based on what is required by the map. The two can work in tandem very well except for high frequency details which will seem a little more subtle in MR than in Z but in a lot of cases this is because the lighting in Z the shader which has specularity and other factors including cameras. You can smooth the model instead of using the subdiv approximation but frankly it dosent really make for the best looking surface as it can result in strange edges and faceting.

I add a subdivision approximation and a displacement approximation to the mesh. Keep the default settings for now just make sure both are set to Spatial and fine view high quality. make sure view dependent is off for both editors.

Now do a render.

You should start to see displacements coming across immidately. Now if the model isnt smooth enoughor you are getting the gross forms but not enough details try increading the subdiv approximation editor to 4 min 6 max with .01 length.

the length tells the renderer how small the largest triangle edge can be when it subdivides. Thhe smaller this is the longer the render will take and the better it will look.

I set length to at the very most .1 on displacement usually .01 in subdiv I will often go to .001 for really fine details.

I bounce back and forth here between the subdiv and the displacement approximation editors gently increasing the settings until it looks good. You should not need a bump map at all in mental ray all that detail is in your displacement map and should come across with the proper settings. The editor that have the most effect on the qualoty of the displacemetn and the details is the subdivision approximation. The model will only displace as much as the geometry supports. So if it subdivides to little the render wont be able to suppor tthe details you want.

try this out. I am not at school at the moment so I dont have my scene file with me where I rendered this model. I will upload a copy of it for you to look at later today. And I will post the specific numbers I used for each setting.

For you own models keep this in mind SCALE MATTERS!!! Notice that when you import the Pixolator head it is huge compared to the maya grid at the defaut settings. It actually measures a couple feet in Maya space but if your own models areonly a gfew inches across Mental ray seems to care about this and will require far smaller settings in the alpha gain and not look nearly as nice. Mental Ray also figures scale into it’s lighting model so consider that as well.

I hope this helps somewhat. Please feel free to post back with any more questions concerning rendering these maps.

Scott Spencer

PS a neat thing to help troubloeshoot is to go into the render globals and under translation in the mental ray tab set messages to progress. This way you can see (in the maya output window) how high the mesh was subdivided. If this number is far below the poly count of your highest subdivision level in Z then you need more subdivision.

very, very informative Scott, I shall try everything you’ve just said and get back to you to let you know my progress. Thanks

One more thing, how many different displacement maps do I really need? i see tutorials saying (one mid, one negative, one postive), some saying 2(saying mid, negative), and some saying just 1. All these variances I just dont know, so really, how much?

Just generate one. Set the res to 4096 Adaptive mode and turn off smooth UV.

Glad it helped, let us know hjow it turns out.

Scott

Ok here are some screenshots that may help out. Note that I went ahead and addded a smooth node on the head. You may also notice “banding” in the textures. To fix this set the filter type on the file node to Gaussian.
Lemme know if you need anything else.

Ciao!
Scott

head.jpg

thank you ever so much mr Scott Spencer, i finally got a render like the rest of you guys. Im glad i can stop pulling my hair out now DispTestHead.jpg

Now to get started on my real projects which were put on hold due to this problem. Once again, thanks to Scott and everybody else for the help. Bye for now

one thing, do you ever have to play around with the texture palette at all when generating the displacement map from zbrush?

As a general rule, no you dont. All your displacement map needs are fufilled by the alpha menu. There are occasions when you would use the texture menu to help generate masks or diffuse maps but those are specialized and unnessacary to creating the displacement map itself

Scott

Ok, this is what im seeing now, and i dont quite understand whats going on. I dont know whats casuing these mesh artifacts, when they are nowhere present on my zbrush mesh… here is the zbrush version:

Picture 1.jpg

Anybody know whats going on?

Attachments

Gorilla2--WorkingDispla--.jpg

Gorilla2--WorkingDisplace-.jp.jpg

Gorilla2--WorkingDisplacemnt.jp.jpg

Picture 2.jpg

Picture 3.jpg

Picture 4.jpg

I have seen these before and I have yet to determine exactly what causes them. Hopefully someone can chime in with specifics. I hve fixed these problems before by one or more of the following approaches:

recreate dispalcement map with smooth UV on

Make sure you exported a 16bit TIFF from Z then convert to RGB in PS. I doont export PSD from Z

Increase your subdivision approximation settings

Check the UV texture ediotor and makle sure that none of these artifacts are falling on the UV borders on the model, if so you may have a problem with the smooth node causein issues with the UVs Alias has a new tutorial on their site on how to fix this.

Any other ideas anyone? I have a spike like this on my elephant I cant determine what is causing it.

Scott

Also make sure that your texture rendering settings have MIP mapping or texture antialiasing turned off.

this is the latest with ur latest suggestions scott, im starting to loase all hope and might soon give up

Gorilla2--WorkingDispla-.jp.jpg

Attachments

Gorilla2--WorkingDisplacemnt.jp.jpg

that is strange… I get trhe same kind of spikes in my own renders sometimes I usually find them at border edges of “holes” in the geometry (like open eyesockets) or the edges of where I used projection master… Do you see these in your map?

I find these are more pronounced the higher your settings become so it seems as though they are coming from the map.

Hopefully someone else has an idea of what they are exactly.

Scott

This is truly annoying, ive been messing witht this displacement crap for like 2 months now and still cant get it right. I emphasize that this MUST be remedied to be much easier, like a one button press, for the future. Have some option in the zbrush interface that says:

create displacement for maya
create displacement for lightwave
create displacement for max
create displacement for cinema 4d
create displacement for xsi

or whatever, then whenever u bring it into ur animation app, u dont have to do anything other than press one button or whatever.

I have some major projects that id like to get moving on, but they will have to be put on hold until this issue can be figured out, which does not make me happy in the least. Theres no way i can count on zbrush for production if i cant figure this thing out which i why i bought the app in the first place. If there are any other experts that use maya besides Scott who have conquered these problems with the displacement, please share your knowledge so that we can move forward. Thank you all. Good day for now

im trying adaptive instead of dsubpix now and this is how its looking:

im trying adaptive instead of dsubpix now and this is how its looking:

im trying adaptive instead of dsubpix now and this is how its looking:
this is the best result yet, now all i have to do is figure out how to get rid of those 2 holes in the nose. Wish me luck

Your images are gone. Always use adaptive, it is superior to dpsubpix in most cases.

Dont loose hope. It took me a year of working to get it to work and I started before the practical manual and now we are at a point most of the maya tutorials in the manual are seriously outdated in approach. You are in a good spot, there is a lot more info on these boards now and a lot of people using this package with Maya. Take heart it will work and you will start getting the renders you want : )

Also, the problem isnt in the map it is the settings in Maya and Mental Ray. Zbrush does what it does pretty darn well… it is the plethora of settings and issues in other renderers where the bottleneck is.

Good luck!

Scott

I am looking for this head (and its displacement map). None of the links work any longer (serves me right for not saving it at the time that the discussion was current). Does anyone know where I can download the head and the map.

Grateful for any replies.

All the best – TL