RenderMan: Optimization is Everything
By nikos | January 29, 2009
RenderMan (PRMan) can be a very fast and efficient renderer as long as you spend some time optimizing the asset you are developing. Here are a few useful pointers.
- Always pre-bake diffuse occlusion and subsurface scattering into pointclouds/brickmaps whenever possible.
- Always pre-filter your textures to RenderMan’s native format.
- Always use a higher local shading rate for objects that don’t require much detail.
- Always use trace sets when dealing with raytracing.
- Always check the displacement bounding box.
- Always cache your shadow or deep shadow maps to disk.
- Always check the XML stats to identify which parts of the objects are taking the longest time to render.
Topics: RenderMan | No Comments »
The importance of having an efficient pipeline
By nikos | October 25, 2008
Having both worked at small and large production facilities, one can not stress enough the importance of having a well set up pipeline. Earlier this year the company I work for undertook the gigantic task of delivering more than 750 shots for Walt Disney’s latest feature film. See IMDB.
Story telling aside, the more interesting aspect of this production was how extremely well the pipeline was set up. Apart from indecisive directors, producers and clients, who all affect the outcome of a project, the one thing that will decide whether your life will be a walk in the park or a living hell is the All Mighty Pipeline.
For outsiders and people just starting out in the industry the term doesn’t mean much but let me give an example. If you were assigned the task of transporting 100 litres of water from place A to B. Would you happily walk back and forth with a bucket until you filled enough or would you spend a few days first building an irrigation system that could transport the water to place B in a just matter of minutes? In small quantities it would probably be wiser to just use the bucket, but what if you were instead asked to transport 100.000 litres? It would be incredibly stupid to do this by hand and in the 3D world the exact same thing applies.
So what is an efficient pipeline? First of all it should be set up in a way so that the same task can be repeated hundreds of times without much user effort. Everything that is likely to be repeated more than twice should fall into the consideration of being automated.
All major 3D applications support scripting and you don’t have to be an expert at it either because most generic commands are instantly echoed in the command log. By simply running a cut ‘n paste operation on a series of commands you can instantly batch a command to be run hundreds of times!
Another issue that always springs up, when working in an environment with many artists, is naming convention. Everyone has his own great idea on how to name a file and if you combine everyone’s ideas at the same time you will end up with a toxic cocktail that gives you a hangover lasting much longer than the usual weekend.
Fortunately there is a very easy solution to this problem. Don’t allow the user any form of manual intervention. Everything should be handled through custom made tools that, behind the scenes, puts and names files in the correct place. Trust me, when a deadline approaches you will thank your mighty RenderGod that you organised your files in a good and efficient manner.
Topics: Misc | No Comments »
MEL: Find and edit the source of a procedure
By nikos | September 23, 2008
The following script opens a MEL file in a text editor by checking where queried procedure is stored. As an example Notepad is used for Windows and Nedit for Linux.
Usage:
edit “procname”
Limitations:
The script only finds global procedures that have already been sourced
-
string $result = `whatIs $file`;
-
string $buffer[];
-
tokenize( $result, " ", $buffer );
-
-
if (`about -linux`){
-
exec( "nedit " + $buffer[ size($buffer) – 1 ] );
-
}
-
else if (`about -nt`){
-
exec( "notepad " + $buffer[ size($buffer) – 1 ] );
-
}
-
}
Topics: Maya | No Comments »
MEL: Setting the value of a Slim attribute
By nikos | July 11, 2008
Setting the value of a Slim attribute, from MEL, requires a bit more overhead compared to the normal Maya attribute. The following example shows how it can be done.
-
string $all = `slimcmd $palette GetAppearances`;
-
string $shaders[];
-
tokenize( $all, " ", $shaders );
-
-
for ( $s in $shaders ) {
-
string $attr = `slimcmd $s GetProperties -name "MYPROPERTY"`;
-
if ( $attr != "") {
-
slimcmd $attr SetValue "MYVALUE";
-
}
-
}
Topics: Maya, RenderMan | No Comments »
Only in Soho
By nikos | June 23, 2008

I saw this sign the other day when walking through Soho.
Everyone has the right to a little bit of privacy I guess…
Topics: Misc | No Comments »