Baking GI with Vray by Mauricio Ricaldi

One way to reduce to the minimum the noise in our renders is baking the GI.

When rendering environments with GI, ambient occlusion is very good idea to bake the GI specially if the camera is moving.


There are certain things that don't work with this method, first if any object in your scene is animated will break the GI, making ghosting in your rendering. To solve this problem you can render those elements separated in a different layer and comp it later.

First in Maya we go to the environment layer, and enable GI, here are the basic settings:

Select the Engine as Irradiance map, also set the Mode to Incremental add to current map in Irradiance map and in Lightcache to Fly-through

We need to render a few frames where the camera is moving, think about doing a panoramic landscape but instead of photos we are photographing GI and stitching in one big file, so we can render different frames as example: if our range is 1-50, we can render each 10 frames, take all of them and save it as a GI that is called irradiance map. (if you are rendering using a farm or a network you need to save this file in an accessible place)

One tip: render the image as 100% or 50%, but not less than that, otherwise your Irradiance map will be useless.

To do this we can write a MEL script to automate the render of the GI.

float $lastFrame= `getAttr ("defaultRenderGlobals.endFrame")`;
int $frameskip = 10; // each 10 frames
int $loop = $lastFrame/(int)$frameskip;

for($x=1;$x<$loop+1;$x++) {
 $framerun = ((int)$frameskip*$x);
 currentTime -e $framerun; 
 RenderIntoNewWindow render;// render!!
 print ("Render Frame:"+$framerun+"\n");


Irradiance map

Irradiance map

When all is render, we can check the irradiance map and see  if all the image is complete, is there any holes that the render didn't catch, is possible that the camera movement was to fast, the easier way is to go to that frame and render, it will add to the irradiance map automatically.



Finally we save both files, irradiance and ligthcache and set the Mode to load and locate the files, save the maya file, now you can render normally.  Remember if you are rendering into a farm, place this files where it can be loaded from the network.

Our environment layer is ready to render without any noise.

I coded a more advanced version of this tool for different TV shows, some need some tweaks here and there, if you are using render managers like Deadline you can send all the GI calculations to the farm too.

Current BakeGI tool for KJN

Current BakeGI tool for KJN

For more detailed information you can check Vray documentation:

and Irradiance documentation:

Obj Maya Clipboard by Mauricio Ricaldi

Working with characters and props all the time comes with a problem, don't forget to add all the props to the render layer of the character, mattes, etc.   Saving things in the Maya you can use "Sets", but sometimes you need something faster, just one click and done.

So this little tool made in MEL make the things easier, we have four boxes that we can store geo, lights, shapes, etc.

The tool is very easy to use, just select anything in maya and store it, you can recall it later but also you can add anything in the box and make bigger the selection.

box A has only the pyramid

box A has only the pyramid

we add two objects more with the "Add"

we add two objects more with the "Add"

Box A contains 3 objects now.

Box A contains 3 objects now.

To store from scratch just select anything, store it again using the "Store " and the box will be empty and will only contains the new selection.

Hope this little tool is useful on your projects.

OBJClipboard v1 (Mel code)


Maya to Nuke obj script by Mauricio Ricaldi

One of the things you do in LRC (ligth render and comp) is moving geometry from Maya to Nuke for a number of reasons, like projecting plates, or textures also knowing where are the things on 3d space and tracking them, etc.

Maya 2 Nuke

Maya 2 Nuke

Is very useful to have reference Geo in Nuke in a fast way,  so this script will grab the geometry in Maya save it as obj and generate a Nuke script that is matter of copy and paste into Nuke.



Select your GEO in Maya, you can select multiple objects, press generate Nuke script, maya will ask you for a directory where to store the .obj and will save all the files there, keep in mind that the name of the file is the same of the object in maya, so don't use strange characters.

Once is done, just copy paste the script from maya to nuke and done!.



I hope is usefull,  happy comping!!

Mel Script: Maya2Nuke16m.mel