View Full Version : mental ray and displacments
04-18-2004, 08:48 AM
I am in a jam here and I have exhausted my own means of figuring this out. I have checked the mental ray online manual but I didnt find a good general description of settings in the approximation editor so...
I have generated some displacments in Zbrush and exported a 16 bit rgb tiff displacment map with 50% for no displacment.
In Maya I added this map, set the alpha gain to the alpha depth listed in zbrush (.150) then divided by two and added this value as a negative for offset (to account for the 50% midrange discrepancy).
Problem is my displacments are VERY weak. I tried cranking my displaceapprox as well as subdivision approx settings as high as I could and still render with little luck. If I pump alpha gain too much my model swells. What settins directly effect the fidelity of displacments in Maya/mental ray? My model is pretty heavy in the first place so I dont know where I am going wrong.
here are my screenshots
zbrush sculpted displacment test:
and the Mental Ray render
alpha gain .150
subdiv approximation settings for mental ray
spatial min 9
sorry for the lengthy post : ) I have been at this almost a week now so any help would be greatly appriciated.
Things to try:
1) Turn off filtering in the file node of the texture. By default, maya does texture filtering. This will tend to blur your texture and thus kill your displacements. This is sometimes desirable to avoid flickering in animations, but for displacements, there really is no good answer, as there's still no good algorithm anywhere to filter displacements properly. Sometimes is better to turn off filtering completely for displacements, albeit be aware that this can sometimes introduce some minor pops in animations when using very fine displacements. This is a problem in general inherent to displacement mapping in most renders.
You can determine if texture filtering may be your main issue if you render a closeup of the creature and the displacement looks okay there.
2) In your view displacement approximation, use length as the main criteria. Set it to a value of 1 or even less, memory permitting. As you did not write what values you are using, it makes it hard to know whether your displacement settings are totally okay. Since you will also be potentially using a lot of memory, make sure to set a memory limit in the render globals, to force mray to cache the geometry in/out and not just crash. Usually something like 700-800 (megabytes) is good for 32-bit machines, but if your scene is heavy, you may want to lower it even more. The lower the value, the longer your render will take, but the less memory it will end up using.
3) If you are going to always be using a displacement map in your whole creature overall, you may want to also consider NOT using a displacement approximation, but set fine/view/length approximation as your surface or subdivision approximation directly. This has the advantage that in many cases the tesselation may end up being done faster, as mray does not need to evaluate the displacement for measuring its tesselation, as it does with displacement approximations.
4) If possible, set mray to render "front" faces instead of "both" in the render globals. This will also cut your virtual polygon count by half (just make sure you have all normals pointing the right way), improving render times.
5) Make sure your max displace setting is good. In maya, this is done by using the calculate bbox button in the shape. If your max displace value is too small, mray will clamp your displacement to that maximum value and thus kill some displacements. This will usually result in a warning to that effect if verbose messages are on.
04-18-2004, 05:12 PM
his prob is not so much the filtering thats ok, its the fact that alpha gain and alpha offset go from 0 to 1 wich is mayas default behavior...
so he needs to counter the 0 to 1 deal to get proper disp i haven`t figured out how to do it yet but hey...
04-19-2004, 10:44 AM
you should probably download the zbrush pratical guide off pixologics site, there's two workflows listed for using mr4maya and zbrush generated displacement maps (you need to register though, its free)
04-19-2004, 04:35 PM
Yeah, I have the practical guide but the workflows reccomended there still seem to yeild inconsistent results. : / Sometimes the alpha factor I get from zbrush works sometimes I have to raise or lower it , etc etc. Nothing seems to behave in a predictable maner when going between the two applications.
Now I am getting banding in my maps : P
Thanks tho. : )
04-19-2004, 05:42 PM
banding is an issue for me aswell, despite using the highest quality settings in a 4K map..seriously so...i wonder if i start out to lowrez or what could be the cause of it...its annoying:) seem to be most pronounced when NOT using adaptive mode when creating the disp. map, however using adaptive mode seems to kill detail..
01-18-2006, 02:00 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.