Friday, October 28, 2011

Animaton input

Hello again...
So here we are... Back... Again...

Down to business, input connection on animation nodes...
Sounds kinda interesting right? (nope probably not).. Basically not to long ago i had to time remap a series of shots and i couldnt alter the original animation, i needed a method of re-timing mutilple shots at different rates... With a bit of reading around i discovered the input attribute within animation curves, this is pretty easy to manipulate.  I just used a locator with a custom attrbute called "Time" that i could animate each shot... this was then connected into the input connection of each object (this was easier to do with a little piece of script).

Ok so thats pretty interesting right... No youre right... still boring
Next step

I was next looking into some shellac type material attributes for vray, this material needs a similar fall off to the facing ratio and ramp trick but with an exponential curve as opposed to linear. I tried a few different methods with adding curves with multiple points but the result wasnt as smooth as id like. So i started by keying the reflectivity of my shader i then opened the graph edtor and changed my curve to be 0 at frame 0 and 1 at frame 1 (this can be highed but because im in vray, 1 is fine). i then made my curve to be exponential...

This really isnt enough and probably makes no sense ("Why would i want to animate this specular"). What we need next is a samplerinfo node with will read out information about the surface of an object, so the attribute we need is the facing ratio.
Facing Ratio:
The facing ratio will sample each face of an object and return a value based on its angle to the camera. The value is between 0 and 1 this is why our keys were between 0 and 1.

So we connect the facing ratio to the input attribute of the animation curve. Escentially the value is remapping the value of the facing ratio from linar to exponential, and connecting it to the reflection.

So that pretty much covers it. Off the top of my head i cant think of any other amazing uses for these methods yet but if anything comes to me ill be sure to post it.

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