Tuesday, June 21, 2011

An Introduction to the Facing Ratio Property.

This is probably an old trick, but it can be a bit confusing how to hook it up, so I thought I'd pop a brief outline on here.

The Facing Ratio trick is a great way to simulate lots of things where a lighter colour is required around edges. It's good for making glass, velvet, car paint and fake subsurface scattering out of standard Maya shaders, and I'm sure there are other uses for it too.

I'm just going to give you the basics of how to hook this up.

You need a sampler info node from the Utilities rollout in your hypershade, and a ramp texture.

It's all really simple, middle mouse drag the sampler info node in your work area to the ramp texture node.

A menu will appear, asking how you want to connect the nodes, just click other. The connection editor will pop up, and you want to click facingRatio on the left and connect it to uCoord or vCoord (expand the uvCoord rollout) depending on how your ramp is set up (vCoord for a V Ramp, uCoord for a U Ramp, doesn't matter which way you do it).

This will now place the top colour of your ramp facing the camera, and the bottom colour just around the edges facing sideways from the camera.



From here you can plug it into anything you like, Incandescence and colour works well for velvet, but play around with it and see how you go. It can probably be used in conjunction with mia shaders for some cool effects too.

Don't forget you can map each selected colour in your ramp with other nodes!

No comments:

Post a Comment