Some time ago I wrote a little script to automate adding rim-lighting ramps to materials. I recently added some defaults so thought I'd share it.
Download and place it in your scripts folder:
Mac: User/Library/Prefrences/Autodesk/Maya/Maya-20xx/scripts
PC: My Documents/maya/20xx/scripts
Select a material (Lambert, VrayMtl, Phong etc.), or a texture node (Ramp, File, Checker etc., etc.).
Then in the commands bar or script editor type the following:
In MEL:
python "import AddRimLight"; python "AddRimLight.addRimRamp()";
Or Python:
import AddRimLight
AddRimLight.addRimRamp()
This will add a ramp and a sampler info node and hook them both up.
Adjust the colours on the ramp to taste, and render away.
Here's a before:
And after:
Not bad for the press of a button.
The clever thing we're doing here is adding a sampler info node and using it to power a ramp based on the angle between the camera and the object. The more acute the angle, the more the bottom colours on the ramp will be used.
If you select a material node, the ramp is added to the colour slot (and decent defaults are automagically set for you), if you select a texture node, the ramp is added to the Colour Offset attribute (in the Colour Balance roll down) - defaults are also created for this mode, but they will almost certainly need tweeking.
Enjoy!
Please use the Feature Requests to give me ideas.
Please use the Support Forum if you have any questions or problems.
Please rate and review in the Review section.