Renderman Academy Circa 2003 -2007


This web page has been restored from the original website's content and archived as part of the required reading for Matt Ho's Code Warriors course for second year computer sciences majors. Dr. Ho comes to us from the world of digital marketing, where he was responsible for some hugely popular viral campaigns including last year's 1st place winner of the Mountain Top Award for a Medical Waste Disposal client. The campaign used anime and live action to demonstrate the critical services provided to hospitals and research laboratories in safely removing biohazards. As featured in Shutter Mag, Ho created the humorous campaign to make people aware of the very serious plague of disposable plastics, currently contaminating our oceans and even our bodies. This campaign was primarily cgi and used classic Japanese art to contrast with the problem. Students can obtain the complete syllabus and reading list from Dr. Ho's office or download from the university's website.

 


 

This website was in no way affiliated or sponsored by Pixar
RenderMan™ is a registered trademark of Pixar Animation Studios

Content is from the site's 2003-2007 archived pages providing just a glimpse of what this site offered its readership/ followers.
And a shout out of Thanks to Rudy Cortes, the "faculty," and everyone else who made this site so great.

 

Letter from the "Principal"

RenderMan™ for everyone! Were the words that kept pounding my brain for hours on-end. I have met so many people who want to learn RenderMan™ but turn away from it after a couple of attempts. They spend long hours searching through the Internet to find only a handful of reference places, three books and a whole lot of “tech talk” that is not aimed at the everyday artist. Why? How many great shader writers and rendering td’s we have lost due to the lack of free available didactic material on RenderMan™? This question usually came hand in hand with another one. How much easier could it have been for me if I had access to more material that was not aimed at those who have a vast experience in programming? And how come no one has created such a place?

Among all this questions came a simple, direct, in-your-face answer: “STOP WHINING AND DO IT YOURSELF STUPID!”. Yeah! What a bright idea, but there is one slight little problem, I’m not a RenderMan™ expert. There are plenty of more qualified individuals out there. Most of them work in production, which is very time consuming and drains a lot of your energy. I published a couple of tutorials on the net about a month ago and the response was overwhelming. My site went from 200 hits a day to 43000! I made it to the front page of several major 3D news sites. I guess there are plenty of people out there who are interested in the things I already know.

So here it is. I saved up some money, spent a good number of hours typing and opened the doors of “The RenderMan™ Academy”. This is your website, it is for your use and benefit. My plans are to make out of The RenderMan™ Academy the premier RenderMan™ learning center on the web. I don’t know whether it will make it or not, but we are here and we will keep on being as long as you drop by to read and chat with your peers.

The days in which RenderMan™ was only available to td’s at big studios are behind. There are several good free RenderMan™ implementations out there, and know you have this site. If you want to learn it, you can. Be persistent and be involved, ask questions and give answers. Come, learn, play and join us in this movement as we claim from the top of our lungs.

RENDERMAN FOR EVERYONE!

Cheers

 



Intro to RenderMan™

by Rudy Cortes
What is RenderMan™?
RenderMan™ is a 3D scene description language initially published by Pixar and owned by them until now. It subdivides into two areas: The Ri API or RIB, and the RenderMan™ Shading Language.

The Ri API or the RenderMan™ Interface Bitestream (RIB) is a language that tells a rendering engine WHAT needs to be rendered, not HOW it needs to be rendered. For instance a RenderMan™ command might tell the renderer “Hey! You need to put two lights here and a sphere there”; one renderer might use raytracing, another REYES and another scanline algorithms. One renderer might position all the objects in relation to a 3D world and another on relation to the camera. The Ri API is a C based language that interfaces directly with the renderer. The RIB is a more compact (syntax-wise) ASCII text file that’s easier to read and manipulate to connect to the renderer. For a more in-depth look please go to RenderMan™ Interface Bitestream 101 (RIB)(coming soon)

The RSL is the other key part of RenderMan™. It is a language who’s purpose is to define the appearance of objects, lights and atmospheric events. In laymen’s terms, RIB tells the renderer “Render a sphere that has a radius of 2 units and it place it here”, while RSL tells the renderer “ That sphere will be red and reflective with small dings on it”. For a better explanation of RSL go to RenderMan™ Shading Language 101 (RSL)

RenderMan™ is a standard that was designed to help bridge the gap between animation/modeling packages and rendering engines. Why was there a gap since as you might now most animation packages have a rendering engine? Well, most rendering engines that ship with animation packages are not as capable, extensible or controllable as standalone renderers. For a long time Pixar’s own PhotoRealistic RenderMan™ was the only implementation of the standard available to the public (It is for this reason that many people refer to PRman as RenderMan™, please avoid doing this, remember RenderMan™ is the standard, not the renderer). Things have changed over the last years and now there are plenty renderers available to choose from. Some of them are free and others are very affordable so there is no reason why you can’t learn how to use the rendering technology that the big effects houses use.

Why RenderMan™?
In one word? CONTROL! In more words? Efficiency, adaptability, extensibility, reliability.
What do I mean by these words? Well, as you have read, most RenderMan™ renderers support programmable shading though RSL. This means that you have complete control over the kind of materials you want to create. You don’t get this with renderers that are included in animation packages, unless you are willing to write a plugin with the SDK wich its usually a LOT harder than writing an RSL shader. RenderMan™ renderers are usually designed to be able to render very large amounts of data using very little memory, especially PRMan. They are very adaptable to any production pipeline through a good amount of programming or with the use of a plugin.
Not convinced yet? Well think about this for a second. Everyday more and more people want to get into 3D graphics, tools are more accessible than ever and you can see all over the web many very talented artists. Learning RenderMan™ is a big differentiator; it opens up more doors for you. The industry is going through an explosion right now, but most studios have a hard time filling positions that require BOTH, artistic and technical skills. Learning RenderMan™ is a great investment on your career, even if you don’t want to be a rendering TD, it will help you to understand how images are rendered. So are you in? Good!

What you will need
- A RenderMan™ renderer
- A good text editor
- A modeling program capable of outputting RIB files
- A lot of dedication and patience

What I assume you know about 3D
You should have a very strong knowledge of 3D graphics and rendering. If you don’t know what I’m referring to when I speak any of the following words: Blinn, Phong, surface normal, displacement/bump map, raytracing, motion blur,depth of field. Then you need to go back and learn a little more about 3D graphics and rendering, just enough to be familiar with most of the terms and how you use them.

What I assume you know about RenderMan™ or Programming
Nada, zero, zip, nothing; I pretty much assume you have never typed a line of code in your life. If you have then you can skip the basic programming concepts tutorial. And go straight into RIB 101 or RSL 101.

Am I qualified to be "teaching" RenderMan™?
I'm pretty sure im not the most qualified person in the world to be doing this, but i have learned enough about RenderMan™ that I can do certain things that im sure plenty of people out there are wanting to learn. I just keep thinking how much faster I would have learned it if someone took the time to share what they knew, so here I am.For this reason if you read something that is outlandishly wrong, just write me an email and I shall correct it. As I continue to learn things I will continue writing tutorials. I believe the days when RenderMan™ was an "obscure cult" that only the td's at the big studios where members of are over, if we all work together we can help expand the frontiers of this rendering technology and bring it to anyone who wants to learn it.

I guess this is all I can fit into an Introduction to RenderMan™ article without going into any specific details. So, considered yourself introduced and buckle up! We are going for a ride!

 



The Very Basics

by Rudy Cortes
Learning RenderMan will be a long, arduous but extremely satisfying road for most people. You must learn to understand the basics and latter the advanced features of the RIB and RSL. But as all long and significant journeys, ours begins with a very small step. If you have never used a RenderMan renderer before then read this tutorial before anything else.

Most RenderMan renderers are command line renderers, which means that after you finish your installation and you navigate full of excitement through your folders you will reach a folder called bin with several executable files. No GUI, buttons, sliders, checkboxes, nothing, just some executables. As simple and insignificant as those files might look compared to a Maya, Max or any other 3D applications, they are extremely powerful since the authors could concentrate on just the renderer without worrying about a GUI.
There are several advantages to implementing a renderer as a command line, the most important I believe is that every studio or user can adapt the renderer to work with their pipeline. Since its just a system command you can call it using a batch script or one of the high level languages available like Perl or Python. As useful as this is for big studios it can still be a bit daunting for many users who don't have a programming background.

Most RenderMan renderers ship with at least 3 executable files, a renderer, a shader compiler and a texture converter. We will proceed to explain how the executables are used and how you can fit them into your production style.

The Rendering Program
This is the program responsible for loading up your RIB file, parsing through it, interpreting and executing the calls and generating your final image. This program is executed usually in the following manner:

renderprog [options] file1.rib file2.rib ...

Where renderprog is the name of the rendering executable of your renderer, the most common are

prman PRMan win
render PRMan Unix
rendrib BMRT
renderdl 3Delight
aqsis Aqsis
renderdc RenderdotC
air AIR
rndr Pixie

These command is followed by optional arguments you can pass to the renderer. Among these options are statistics reporting, loading information, image control and several other options. Note that the keyword here is 'options' so you don't need to use any of them if you don't want to. Lets use 3delight as an example. You can read the 3delight's docs and find that it supports the following options (from the 3delight user manual - All rights reserved)

`-v'    Prints 3Delight's version number and name;
`-h'    Prints a short help screen;
`-beep' Beep when all RIBs are rendered;
`-beeps' Beep after each rendered RIBs;
`-d'    Will force a display to the `framebuffer' display driver. Note that a `framebuffer' display driver will be added to the displays declared inside the RIB so those will still be called. If there is already a `framebuffer' display driver declared in the RIB then this options has no effect;
`-D'    Has the same effect as `-d' but will automatically close the framebuffer display driver when finished;
`-frames f1 f2'   Only render the frames between f1 and f2, inclusivly. This options enables you to render some specific frames inside one RIB file. Frames outside the specified interval are skipped;
`-crop l r t b'   Sets a crop window defined by (left right top bottom). The values should be given in screen coordinates, which means that all value are between 0.0 and 1.0 inclusively. This command line option will override any CropWindow command present in the RIB file.
`-noinit'   Do not read the `.renderdl' file. See section 3.1.2 The `.renderdl' File.
`-stats'   Prints "end of frame statistics". Has the same effect as putting the following line in the RIB file: Option "statistics" "endofframe" 3
`-progress'   Prints a progress status after each bucket. Can also be enabled from inside the RIB. See option-statistics-progress.

Based on this info we know what options 3delight supports. For example if you wanted to render an image with 3delight and have the machine output progress information, frame statistics and beep when the file is finished you would use

3delight -stats - progress - beep myfile.rib

Please read your renderers documentation to learn what options are supported by it. Finally at the end of your command you must provide the name of a valid RIB file. Most renderers support a list of names or wildcard substitution. So if you have 100 RIB files named 'myfile.000.rib' to 'myfile.099.rib' you could just use the command

3delight -beep myfile.*.rib

And the program should render all of the files in ascending order. Note that for this commands to work properly you must provide the right path to the RIB files and you must have your renderer's bin folder included in the system PATH. Otherwise you will have to type the whole path for the renderer every time you want to use it (very annoying). To get around typing the whole path for the RIB file you could just 'cd' to the directory and then run the commands.

The Shader Compiler
RenderMan renderers normally require you to compile your shaders from RSL source code *.sl to a proprietary format. When a shader its compiled it gets converted into a more compact piece of code that the renderer can load and execute. The compiled shaders are usually very portable, meaning that if you compiled an RSL shader in Linux you can still use it in Windows, OSX or whatever other platform the renderer is supported on. A shader is compiled with a command similar to the one used for rendering:

compileprog [options] myshader.sl

once again where compileprog is the name of the shader compiler provided by your renderer, here is a list of popular ones:

shader PRMan
slc BMRT
shaderdl 3Delight
aqsl Aqsis
shaderdc RenderdotC
sdtc Pixie

Just like the renderer command the compiling program can take a list of options before the name of the shader source file. The most important of this options is the include path option '-I' (check your renderer's docs to make sure its the same). You use this option when you need to provide the shader a path to any included header files that your shader might need. Most compilers by default will search for include files in the same directory where the shader source file is in. To my knowledge most people rather have their header files in separate directory. Here is how you would use the '-I' option (using 3delight as an example):

> shaderdl -Ic:/mypath/myshaders myshader.sl

Please take note that most renderers require you to NOT use a space between the '-I' option and the directory path. Another important option is the output '-o' option which allows you to declare the path and name of the compiled shader. By default compiled shaders get saved in the current directory and use the name declared on the shader after the 'surface' call.
If the shader was compiled you should get a confirmation message. If it failed you should get error messages that lets you know where the compiling failed. Use that info to go back to your shader and kill those errors. Be aware that some compilers report errors better than others and that sometimes the error might read "error on line 52" but the error is actually in a previous line. So take your time and read the whole area where the error is pointing to.

The Texture Converter
RenderMan renderers are designed for efficiency and every aspect of the rendering process has been analyzed to be as efficient as possible. Texture maps have always been used for rendering images so naturally they have a way to optimize their memory consumption. This is done by converting the images into a proprietary image format that stores the images as mipmaps. Mipmaps are stored in a way that within one file there are multiple resolutions of the same image, this way if the object that certain texture is far away, the renderer will load a smaller resolution version from the mipmap image therefore consuming less memory. For this reason is recommended that your image resolution is always a power of 2, like 128 x 128,1024 x 1024 or 1024 x 2048, etc. You should create your maps on an image manipulation or painting program and save the files out as tiffs, then you convert them to the renderer's format by using a command that usually follows the form

textureprog [options] inputfile outputfile

The texture converters programs are very different from renderer to renderer so we wont go into too much detail. There are certain options that are important such as options for making shadow maps from depth images and to make environment maps from either one image (spherical) or from 6 images (cubical). Please read your renderers docs to find out what are the specific options and usage of your texture converter.

 



RenderMan™ Tools

RenderMan™ Compliant Renderers
The last two to three years have being very exciting in the rendering community. The whole “concept” behind the creation of the RenderMan™ scene description language is finally taking off. Where there once was only one implementation of RenderMan™, Pixar’s own PRMan, now there are many renderers to choose from. Time couldn’t be better for those looking to embark on the long, but exciting road of high end rendering. Here is a list of RenderMan™ renderers available. There might be more out there. If you know of one that’s not listed, please drop me a line at rmantuts@RenderMan™academy.com

Photo Realistic RenderMan™ – Pixar – Win, Linux, Irix, Mac OSX - $3500
The granddaddy of RenderMan™ renderers. Production proven, fast, reliable, extensible and very controllable. This is one strong workhorse, capable of rendering scenes with very large amounts of detail (see the door vault in Monsters Inc). Version 11.5 does raytracing and Global Illumination.

RenderDotC – DotC Software – Win, Linux, Irix, HP-UX - $ 595 to $2995
RenderDotC has been shipping since 1996. It has several films credits under its belt and it has a Broadcast edition that is only 595, but only renders up to 768 x 576. Version 3.4 will include raytracing.

Air – Sitex Graphics www.sitexgraphics.com Win –Linux - $450.
This is a newer renderer, but its author Scott Iverson has been writing renderers for a while. Fairly priced and includes a lot of extra little utilities that allow you to work faster (only Win version though).

3Delight – Linux – Mac OsX - Free
A FREE RenderMan™ renderer that runs pretty fast and supports most of the RI Specification. It doesn’t include many of the features supported by PRMan 11 (it does raytrace thought), but hey.... IT"S FREE!!.

Aqsis Open Source -Win – Linux - Mac OSX - Free
Another free RenderMan™ renderer, but this one is open source. So if you ever wanted to get your hands on code to learn how a REYES renderers is put together, this is your renderer to get. Still in development.

Pixie by Okan Arikan -Free
Yet another free RenderMan™ renderer. Its also open source and its slowly becoming boys and girls favorite because of the high end features it supports (almost the same as PRman 11). Still in development.

JRMan - Open Source - Free
Another open source implementation of RenderMan™, but written in java. Still has ways to go, but for those that are into java it should be quite interesting to give it a look.


Shader Writing Tools
Ok. So here you are, anxious to start learning to use the one of the most powerful 3D rendering tools. You get your cold coke, pop in your favorite CD or mp3’s, lay your hands upon the keyboard and you discover one of the ugliest parts of RenderMan™ Shading Language: “Writing shaders can take a long time”.
For us who used to be accustomed to having a nice and shiny GUI's to generate shaders or materials this is a big shock. Many rendering development companies are trying to make this a thing of the past. Pixar created the RenderMan™ Artist Tools to help speed up the development process and to make the process more artist friendly. Here I have put together a list of tools that might be of use for you. Some of these tools require a little time to setup, but once they are up and running you will be writing shaders a lot faster.


Text Editors
Any text editor will do the job, but there are some of them out there that make the job a lot easier. Take a peek and choose one that fits you.

SlEditor by Alexei Puzikov - Win Free
A very simple and user friendly Shader Language Editor. Designed to work with the always remembered BMRT, this editor offers string searching, color coding and line numbering. Very easy to install.


SlcEd by Alexei Pusikov – Win Free
This is SLEditor big brother. It allows you to change material properties and render small previews. It also has a color coded text editor and it can compile you shaders with on click. However it only works with BMRT

Xemacs Win – Linux – Unix Free
Xemacs is a different version of the very popular Unix text editor emacs. It is deceivingly simple but it is extremely powerful. This is a very serious tool that gives you a lot of power to extend the original functionality. To make this editor really worth it for shader writing I have re-written Steve May’s rsl-mode. This will allow you to edit RSL files with auto indentation, color coding, file comparison and also quick compiles and test renders,truly an awesome tool. Its also good for Perl, Python, C/C++, Java and most mayor programming languages.

Emacs / Xemacs rsl-mode Original by Steve May - Updated by Rudy Cortes - Free
This is a modified version of Steve May’s rsl-mode. Its updated to support new syntax highlighting packages and to support 3delight, Aqsis, BMRT and Prman for windows and Unix.
I will eventually update it to support Air and Pixie.

Cutter - by Malcom Kesson - Runs on any platform supported by Java - Free
This is a very nice text editor designed specifically for RenderMan™ Shading Language. It also supports programming languages such as Tcl, Mel, Python, Vfl, Ifd, Html, Shake, C, CPP and Java. Very nice!

Shader Authoring Tools
These tools are designed to develop shaders by visual means. It’s a lot more artist friendly but make no mistake. To use these programs efficiently you NEED to learn RSL. Many TD’s still prefer to write their shaders in a text editor. Call them purists, call them crazy, but hand coded RSL shaders are still very popular. For your convenience here is a list of available utilities.

Slim/RenderMan™ Artist Tools Pixar Win – Linux $2000
Part of the RenderMan™ Artist tools. This is a shader building program that feels like the 3DS Max material editor, underneath works like Maya’s Hypershade, but at the end you get good ol’ RSL shaders. It is tightly integrated with Maya but is also a stand alone. It’s very extensible through the use of Tcl\Tk.


ShadeTree Cinema Graphics Win – Irix $4995
I believe this was one of the first shader authoring tools in the market, I've never used it but is seems really powerful.

Vshade - Sitex Graphics Win
This tool ships with the Windows version of Air.

ShaderManby Alexei Puzikov Win Free
Another great tool by Alexei. Its not quite finished but its very usable and very promising. Extensible through XM, this is a tool that I would keep my eyes on.

Shrimp - Open Source - Linux - Free
Open source shader authoring tool. Development is going very slow, but its open source, so if you are a clever programmer, maybe you can finish this baby and release it for all to use.

Utilities
Perl
A very powerful yet fairly simple scripting/programming language. Very strong for parsing and modifying text files. Ideal for RIB processing or manipulation.

Python
Perl not your thing? Try Python, very powerful and easy to use.

CGkit
The Python Computer Graphics Kit is a collection of Python modules that contain the basic types and functions to be able to create 3D computer graphics images. The kit mainly focuses on Pixar's RenderMan™ interface, but some modules can also be used for OpenGL programs or non-RenderMan™ compliant renderers like POV-Ray, for example.



RendermanAcademy.com