ZBrushCentral

Fast Displacement MAYA->Mental Ray

Okay, the impossible, or so it would seem reading these forums.

I'll start with the standard pixolator head - imported as an obj and rendered. Here are my mental ray settings: ![mraySettings.jpg|401x499](upload://iPaMNN0RvR4mLqdanEg8tvwfY5d.jpeg)

There’s more below on displacement approx. this method utilizes the default mentalray displacement approximation, but adjusting the approximation manually can increase your render times, without sacrificing too much detail.

sunit

Attachments

DefaultHead.jpg

AllSoft.jpg

SoftHead.jpg

AlphaOffset.jpg

DisplacedHead_noSmooth.jpg

PolySmooth.jpg

DisplacedHead_Smooth_1.jpg

DisplacedHead_Smooth_2.jpg

LizardCreature.jpg

DisplacedHead_Smooth_2a.jpg

Hi sunit,
Thanks a miiiiiiiiiiiiillion, you are my favorite MONSTERRRRR!!!:smiley:

great work Sunit , I was waiting to seeyour workflow for a while now :wink:

howver , I tried following it but i didnt get eh same result . the obj looked as if it was bloaded
01.jpg

can u put both your maya file and the texture on the web
thank in advance

Attachments

02.jpg

the texture you can get here:

[http://www.zbrushcentral.com/zbc/showthread.php?t=20310](http://www.zbrushcentral.com/zbc/showthread.php?t=20310) download and extract the zip, and you will find a file called DispTestHead_Disp16.tif

Load it into photoshop (or something similar like gimp) and convert it to an rgb file and save. Also remember to flip vertically.

Then open a command prompt (Start->Run…->cmd) and navigate to the directory. use the following command to convert the file to a map file:

imf_copy -p DispTestHead_Disp16.tif DispTestHead_Disp16.map this creates a pyramid tiled texture format that works with mental ray. My maya file is attached to this post - replace the file texture with the .map file you've created.

You’ll see in the alphaOffset, there is an expression. This shifts the texture values darker, exactly one half of the alphaGain value, so that whatever is 50% grey in your texture always sits at a value of zero. this way, your displacement pushes both in (negative values) and out (positive values).

regards, -sunit

Thanks Sunit for hte speedy eply
here are my test , as you can see they still the same result like i had before
01.jpg

as you can see the head looks inflatd or something , and in my opinion that due to the displacment map and the fact that the difrance between balck and white is very low
thats why I go to PS to make it AUt contrast
here is your file with the displacmetn map as you discribed
http://pixelcg.com/tutorials/zbrush_head.zip

I already wrote a tutorial on Zbrush and MAya

http://www.pixelcg.com/tutorials/Maya_Zbrush.html
and im hoping now t oeither write a good mEL or even a plugin butthat still in the future :slight_smile:

Attachments

02.jpg

Hi ashaiad,

Your texture file does not match mine. I compared it with the original, and somewhere along the way, your image file has become lighter.

Download the original again here,

http://www.zbrushcentral.com/zbc/showthread.php?t=20310

And see if this doesn’t solve your problem.

Here’s another test for you. Change you color balance (in your file texture) to these settings:

AlphaOffset_Pushed.jpg

As you can see, with a negative alphaOffset that is equal to the alphaGain, the displacement only pushes in. This is because the value range of the file is shifted in the negatve. Here, it’s shifted the same value (-12) as the gain (12), so you end up with value only in the negative range. If you shift half the amount of the gain (-6) then you will end up with values on both sides, where zero is the midpoint.

regards,
sunit

Attachments

DisplacedHead_Pushed.jpg

I tracked things down and I realzied that my Photoshop setting was under
setting color managmant was set to something else I done lately
so if anyone have the same isuue change your photoshop setting to

color mangment off and should do the trick
thanks again sunit

Ash

Okay, some more words about displacement.

The default displacement approx. uses spatial/fine displacement. Something like this: ![DisplaceApprox_Default.jpg|393x382](upload://6EBzDIf2DHnvz5iEisl7EYrmFFh.jpeg)

This is accessed through mental ray’s approximation editor - Window -> Rendering Editors -> mental ray -> Approximation Editor…

I’ve relied on this default setting for most of my tests. Increasing the Length Value will decrease your detail and the render times -> it’s adjusting the minimum edge length that MR will subdivide to. A setting of one, means that MR can subdivide down to edges that are one pixel long (and view dependent means precisely that -> dependent on the view). The greater the value, the longer the edges.

I’ve yet to discover a way to use subdivision approx. and displace approx. together. This is mainly why I’m polysmoothing, rather than subdividing,

-sunit

Did you by chance put the displacement map in the bump channel of the shader or did you put it in the shading group displacement mat. channel, or where did you put it?

sorry… could you please hold my hand?

… loving it.!. first time zbrush user… and i still have alot to learn… had a hard time understanding how displacment works… this helps alot!

Thanks, much apricated!!! :+1:

to better understand the approximation node
refer to this page
http://www.lamrug.org/presentations/oct2004/mentalrayforMaya.htm

also if you going to animate your camera , you wil need to turn View Depended OFF… otherwise will get some flickers in your model displacment

your explanation helped a lot

I guess this a good place to mention this. If you have a lot of tiny details, you can delete the first few sub-divisions and generate another Disp map, and use that in your bump map node. This way you dont need to crank up Disp settings to get all your wrinkles to show up on a low poly mesh. You can also generate a cavity map in Z mapper for a extra level of control in photoshop of your bump map. In my experience, this method gives really good results, and in a lot less time then using high Displacement settings.

hi i tried whith the head and works prefect but then i tried with my model whith a displacement of 32 bit and stop working i use maya 7 can you help me please ?
:frowning:

Nice Post. Keep up the good work.