Saturday, August 18, 2012

RenderMan Basics




I recently put my old graduation animation online (which you can watch on youtube: A Plug's Life). It was made back in 2001 and it was my first big project working with Maya and Pixar's RenderMan.

The other day I was asked in the video comments if I could write some tutorials on the use of RenderMan. That sounds like a great idea but before I want to come up with some hands on tutorials it is important to learn something about the RenderMan architecture.

I often hear that RenderMan is not suitable for small studios as it is too complex and is for tech heads and not artists. I beg to differ. RenderMan is a very efficient render engine and small studios which do not have a lot of render capacity can really benefit here by lowering render times. The shading tools are quite extensive and can give superb results without the need of any programming.


What is RenderMan?

First I like to define RenderMan. RenderMan is actually an API (application programming interface) and not a render engine. For a long time Pixar was the only one having RenderMan compliant renderer (as they invented the standard) called Photorealistic RenderMan or in short PRMan. People quickly started to call it RenderMan though and it has stuck ever since. Today there are more commercial render engines available which are RenderMan compliant like 3Delight.

Since Pixar's RenderMan is the industry standard (they say so themselves and honestly it is true), I will use their software to explain my examples.


RIB or RenderMan Interface Bytestream

Since PRMan is a renderer and Maya an animation package, there is need of a common language between the two. The API mentioned before is this language. Have a look at the following schematic.

The scene translator converts Maya data into a RIB file which the render engine understands.

The scene information from Maya is translated into a RIB file. This RIB file contains everything from geometry and information on which shaders are used to render resolution and certain render settings like shading rate. Since a RIB file is written in the common RenderMan language every RenderMan compliant renderer can interpret it and render it.

The RIB file can be displayed as an ASCII file, looks a bit like a programming language and is actually quite readable. We often opened up the RIB file to see where things went wrong when the renderer didn't give us the expected results.

In larger studios this RIB file is usually hacked to add in extra elements before the the final render is made.


RSL or RenderMan Shading Language

Shaders are render engine dependent. This means that when you go from one render engine to another you need to redo the shading. To tackle this problem between RenderMan compliant renderers, the standard provides a common shading language called RenderMan Shading Language. This is a simplified programming language to code shaders. These shaders are then compiled and used by the render engine.

Coding shaders is not what most artists want to do but since RenderMan Studio has a visual tool to create shaders called Slim, artists don't have to feel left behind. Understanding how to code shaders can give you a better insight in how shading works in CGI though.


RenderMan Studio

Pixar's RenderMan is available as a package called RenderMan Studio. It contains:
  • RenderMan for Maya (Pro)
  • Slim
  • it
  • Tractor
RenderMan for Maya is the core plug-in. It deals with the scene settings and takes care of translating the scene information into a RIB file. It comes with its own Maya menu and custom shelf.

Slim is the shading management tool. It is an external running program but can be connected to your Maya scene. Custom shading networks can be generated visually as well as trough coding in RSL.

"It" is the image tool. When rendering out your images you can do so to the Maya renderview but also to "it". "It" is much more flexible and allows even simple compositing trough scripting. It also allows the use of Look Up Tables and displays actual pixel values, something the Maya renderview is lacking.

Tractor is the render farm tool which queues and manages your renders. Not only can you manage your RenderMan renders but also other jobs like Nuke composites which you want to be calculated on the render farm.

RenderMan Studio comes with an embedded render license so even small VFX studios can get started straight away.


Links:

2 comments:

master blaster said...

Brilliant your explanation is so good .....

Frederic said...

Thanks, I'll keep doing my best to write good blog posts.