July 1, 2008



this is a simple renderman shader that creates AOV's for passes from lcUtil.h functions

id pass, depth pass, motion vector pass, and a mask01 pass that is an arbitrary texture map mask, usefull for compositing

- tested only with 3Delight renderman



a bunch of utilites for renderman rendering passes

lcID - 15 distinct colors for custom compositing masks.
lcMotion - export motion vectors for use in ReelSmart Motion blur plug-in.
lcDepth - a z-depth pass.

- there is probably a "real" way to implement id-pass output colors, but i just needed a quick solution to make some distinct masks.



incudes a bunch of illumination models and useful shading tools, mostly form 'The Renderman Shading Language Guide' by Rudy Cortes

shadingnormal - pixars faceforward util
lcSchlickFresnel - a fresnel approximation
lcFresnel - a full on fresnel function
lcOrenNayar - a nice diffuse shading model
lcSpecGlossy - glossy ceramic like model
lcGather - raytracing using 'gather', also supports a env map where ray is null
lcEnv - environment mapping



This is a basic Renderman shader with alot of AOV's exposed. Writen with 3Delight in mind but should work with other renderman compliant renderers.

has aov's for diffuse, ambient, specular, reflection, occlusion, opacity (alpha), subsurface, fresnel, and id.

you can map many of the attributes with a texture file as well.

most of the operations are done via functions from lcIllumination.h or lcUtil.h and can be easily swapped out.

- tested only with 3Delight renderman

yet another Fake IBL


This one is very 'beta', use at your own risk

Creates a dome of lights who's color is based on the texture sampled from a sphere

Set the number of lights - more are neccessary for more detailed lighting, for example if you use a file texture.

Create the Sphere first, adjust its shader/texture to your liking as well as scale.

With the sphere selected, create the lights with 'Add Lights/Remake Lights'. if you change the spheres shader or texture you have to remake the lights.

adjust the 'Intensity Multipyer' to increase or decrease the intensity of all the lights.

A helper node called IBL:HelperNode is created by the script, with all the adjustable attributes, so the script interface is not neccessary to adjust the lights.
This node can be selected by unchecking 'show DAG objects only' in the Outliner.

PS: the code for the mental ray vertex color baking is probably the most interesting part of this mel script and exploring that was one of the main reasons for writing this script

Source Script - a mini dev utility


type the name of a script - must be located in one of the maya script paths, such as 'my documents/maya/scripts/'
You can source it, or source and run it. This is useful when writing scripts with an external application and lets you update and test your changes.


3 new mel scripts


Use this script to transfer uv infromation from one object to any number of duplicates. objects must have the same point order. Select the targets first, select the source object last. Type lcTransferAttr to run.


This script performs an important cleanup operation on geometry that is mirrored using -1 scaling. After scaling an object, if you freeze the transforms, a funny thing happens, the 'opposite' attribute will be activated so that even though the surface normals are flipped, the object displays correctly. It would be better to set the display attributes correctly and flip the normals to their proper orientation. This script flips the normals and adjusts the attributes of objects with the 'opposite' attribute activated. Select your geometry, type lcFixNormals to run.


Select an object, enter a name and press 'Make it' to run. creates a shader and corresponding shading network on the selected object setup for displacement mapping. also creates and assigns corresponding Approximation Nodes.

Mental Ray Batch Bake

Updated Here

This utility gives an easy to use interface for mental rays texture baking abilites - bake shaders, lighting, shadows to a texture file.

You can create a bake set with a custom name, and it will be assigned to the currently selected objects.

bake sets from the current scene will be listed in the 'Sets' list. You can assign more objects to the set or select the objects currently in the set.

to view the set and its objects in more detail open the Outliner, select a set and check its attributes in the Attribute Editor to set resolution and file type.

Bake Camera is only neccessary in certain situations and can be left alone or set to the rendering camera

Bake Shadows is neccessary for shadows or Ambient Occlussion

File Output Directory: by default goes to the current project in 'Project'/renderData/mentalray/lightMap

specify your own directory such as D:/textures
(make sure you use forward slashes '/')
this directory must have a folder 'lightMap' already created. So the full path would be D:/textures/lightMap

Big Bake It button executes the render, be aware it can take some time.

If there is a problem with the interface, sets dont show up in the list, Reset the interface with the 'Reset' button.