Monday, October 24, 2011

Displaced

Well, im back.... again (yeah..again...)
So im trying to keep this as up to date as possible, i dont have heaps of time.. but ill try...
With work this past year ive had to learn a lot of vray for maya...
Im gonna start kinda documenting what i discover...should be "fun"...

This last week or so ive been batteling the displacement demon... and i tell you something.... its a trickybitch sometimes... not so much the standard displacement... But vector displacement. With Maya 2012, standrd mentalray shaders have a vector displacement input... but for me that wasnt going to work (damn you vray). Then again, vray 2.0 has the advantage of 2 vector displacement modes.  Absolute and Relative, this is handy because Mudbox can export to Absoulte that can be converted within maya to relative. Normally it wouldnt make much sense seing as both work equally well, but its handy to understand the difference between the two because then you can always revert them either way or convert displacments you are supplied

Heres how its done in the Maya Hypershade:
Connect your Absolute image into a Multiply node with the following connections.
R to Input 1
B to Input 2
G to Input 3
Then youll need to multiple the following Values
Input 1 x 0.5
Input 2 x 0.5
Input 3 x 1

Following this step will use a Average +/- node, Connect that to the  3D [0] connection, then from within the atribute editor you can add the following values.

Input 1 + 0.5
Input 2 + 0.5
Input 3 + 0

Lastly everywhere where i read explained to connect it through a blender node (conneting it to color 1 and setting the blend value to 1) the only reason i could think this was for was so the XYZ values were convered to RGB (this wouldnt normlly matter but at a guess i susspect because of the vray vector displacement it naturally looks for a RGB value)

The next step isnt tricky but easy to miss. You need to drag your original image into the displacement slot of your shader, this will auto create a displacement node for you (sue me im lazy), you then need to set a manual connection from the R value of the Blend node to the Displacement value of the Displacement node (Do not worry about the vector displacement attribute thats for mentalray)

Within the geo you'll need to create a displacement attribute and set it to Vector (with the steps ive just run through it will not work with "vector absolute")

Note:
From what i could tell the vray process, detects there is a displacement and then uses the attributes from the displacement attribute overide to select the R+G+B Channells as required an displace the mesh.

Over its a trick process and there is a bunch of advanced parts that will help your displacments along but for the time being this will begin to help yu understand the basics.

As per usual i apologise for any confusing Grammer + Spelling

~Macky

No comments: