next up previous contents
Next: A Constant Surface Shader Up: Shader Writing Previous: Exercise   Contents


Quick Start

As you can see there are so many options and it's hard to get started. I would consider starting with a RenderMan compatible renderer first to be easier but once you got the basics there is a lot more to do and the concepts behind mental ray are quite powerful.

The most frustrating experience when you start to work with renderers and try to write customs shaders is to end up with an empty (black) picture. I would encourage you to try to understand at least the human readable versions of scene descriptions for several renderers. You might never have to write them yourself in a text editor but it certainly helps if you know about RIB9 or MI10 files. A lot of production pipelines still export scene description files in ASCII format once and then modify them with little shell (Perl, Python, etc.) scripts to render for example in several passes (beauty, shadow, light, ...). So it's good to know where the shaders are specified (or called) in the resulting scene description files.

Most of the RenderMan compatible renderers allow you to render without any lights defined in the scene. The default behaviour is ``faking'' a light source by rendering the scene as there would be a light source defined. To be more specific: If you do not specify any surface shader then a RenderMan compatible renderer uses a surface shader called defaultsurface. This surface shader is able to render the scene without any lights defined because it does take only the normal and the incident vector into account without asking the lights for their contribution. Mental ray will render without any lights defined but the result will be a ``black'' image. First thing you should learn is to use the alpha channel for the resulting images. You could at least check if something is in ``front'' of your camera by looking at the alpha channel of the resulting image. In a RIB file you will find a similar line to the one below:

Display "imageFilename.tiff" "file" "rgba"

You can check the syntax and possible parameters in Pixar's document The RenderMan Interface. Here just a quick reminder what this line specifies: The name imageFilename.tiff could be the name of a frame-buffer or (in this case) the filename of the resulting image. The type file has to be supported by all RenderMan compatible renderers and stands for the default file format. The mode rgba specifies red, green, blue, and alpha channels in the resulting output picture. For mental ray you should look for a line like this in the MI file:

output ["type"] "format" [opt] "filename"

See chapter 11 in the book [4] for an explanation. If you choose for example rgb for the format and do not specify the optional parameters type and opt the resulting image with the name filename will have an alpha channel as well because the not specified type will default to rgba.



Subsections
next up previous contents
Next: A Constant Surface Shader Up: Shader Writing Previous: Exercise   Contents
Jan Walter 2004-02-09