Cutter Setup
RenderMan Shader Writing


main index



Introduction

Editing rib and rsl files with Cutter offers many advantages compared to using a general purpose text editor. Cutter applies syntax coloration to both types of scripts. Rendering a rib file and compiling a shading language document is conveniently accomplished using the keyboard shortcuts Alt + e, Control + e or Apple + e. If Pixar's documentation is installed on the users computer Alt + double clicking on a keyword in a rib or rsl file will trigger Cutter to display the relevant html document in its internal browser. Being able to quickly refer to Pixar's documentation in an excellent aid to learning about their unique rendering and shading technology.

For those intending to use their custom shaders with either RenderMan Artist Tools (RAT) or RenderMan Studio (RMS), Cutter can automatically write a slim appearance file for each shader it compiles. In addition, for users of RAT or RMS, Cutter can also convert shading language source code into a Pixar Slim template, thus enabling artists to add custom shading nodes to Slim. For detailed information about Cutter and Slim refer to the tutorial "Cutter: Automatic Conversion of Shaders and RSL Functions to Slim Files" For users who wish to use their custom shaders with Houdini, Cutter can automatically invoke "rmands" (a utility application that is part of the Side Effects installation) in order to create and update an artists OTL file.

This tutorial outlines how Cutter should be set up. The tutorial assumes the reader has installed a RenderMan complient renderer.


Using Cutter for Shader Writing

First, the reader should check their RenderMan (Rman) preference settings in Cutter. Open the preferences window ie.
    Edit->Show Preferences->Rman->User

Setting the User Paths

Set these paths to the directories that will store your shader source code, shaders, textures and rendered frames of animation. The paths can be specified as full or relative. Relative paths "begin" at the directory in which the cutter.jar file is located.



Figure 1
Setting the directories for the shader source files, shaders, textures and rendered frames.


Figure 2
Setting the location of the shaders and the bin directory of the renderer.


Setting up for Houdini

If your shaders will be used with Side Effects Houdini, "Output to Houdini OTL" should be activated and a path should be set to a shared OTL file.
    Edit->Show Preferences->Rman->User->Output to Houdini OTL
If the path is left empty Cutter will create a OTL file for each shader it compiles. Initially, Cutter will indicate the file does not exist ie.



Figure 3
Activating OTL output.

Ignore the warning. The path will change from red to black once the OTL is created.


Setting the Preferred Renderer and Pixar's Slim Output

By default Cutter expects to compile shaders and render rib files using Pixar's rendering environment ie. RenderMan Pro-Server. As shown below if you are using a different system it must be set using the drop-down menu.


 
Figure 4
Setting the rendering system and controlling the auto-generation of slim files.


By default, Cutter writes a slim file for each shader it compiles. As shown above (emit slim doc) auto-generation of slim files can be turned off. Slim files are only relevent if you intend to use your shaders with Pixar's RenderMan Artist Tools or RenderMan Studio.


Cutter's Shader Development Work Flow

The process of developing and testing a shader consists of repeatedly cycling through the following five steps. Once a shader yields visual results that look promising, then and only then, should it be tested in an application such as Maya or Houdini. Confining the developmental shader writing process entirely to Cutter ensures a very fast work flow.

1

Open a copy of a "constant_test" shader ie.
    Rman Tool->Docs->Shader Docs->Constant

2

Save the file as "contant_test.sl" in your "shader_src" directory

3

Compile the shader - keyboard shortcuts Alt+e, Control+e or Apple+e.

Cutter will ensure the compiler will save the shader to the users "shaders" directory.

4

Open a rib file to test the shader ie.
    Rman Tools->Docs->Single Frame Rib
Cutter will generated a rib file that references the compiled shader and lists its default parameter values. It will also add a number of Option "path" statements that will ensure your shaders, textures and rib archive directories will be searched by the renderer.

5

Save the rib file and render it - keyboard shortcut Alt+e, Control+e or Apple+e.


Cutter's Keyframing Facility

It is often very useful to animate the parameters of a shader in order to see how surface opacity, color and displacements interact. Importing a shader into Maya or Houdini is a time consuming process although, of course, such applications enable an artist to fully assess a shader. Cutter offers a simple keyframing facility that enables animations to be directly and quickly created. For information about this topic refer to the tutorial "Cutter: KeyFraming".


Cutter's Open Shader Source Facility

The reader should check they have set the shaders path in Cutter's preferences - figure 5.



Figure 5


The path should "point" to the directory in which their selected rendering system stores its shaders. This will enable Cutter to find the .sl file that implements a specific shader. For example, figure 6 shows the "distantlight" shader selected from Cutter's Rman Tool's Shaders menu.



Figure 6


If the source code for a specific shader exists, and either the ALT or CONTROL key is depressed when a shader is chosen, Cutter will find the corresponding .sl file and display a copy of it's text on its desktop - figure 7.



Figure 7


Cutter's ability to open the source code for the standard shaders that accompany a rendering system is a very convenient way of answering those "I wonder how shader XXX does that" type of enquiries. However, it should be noted that some RenderMan compliant renderers may not supply the source code for all their shaders.


Cutter's Open Doc Facility

The reader should check they have set the RPS index path in Cutter's preferences (figure 8) so that it points to the index page of Pixar's RenderManProServer documentation.



Figure 8


This will enable Cutter to open its internal browser at the correct documentation when the user CONTROL + double clicks on the name of a datatype or RSL function. For example, figure 9 shows the browser opened after the word "vector" was double clicked. On MacOSX the keyboard shortcut is APPLE + double click. If the SHIFT key is also pressed, Cutter will open the doc in an external browser. Generally, the internal browser works well enough for most purposes.



Figure 9


Rman Tools also provides quick links to selected RenderMan topics - figure 10.



Figure 10


If the appropriate Doc Location fields (figure 8) are set correctly the Help menu will also provide quick links to the users documentation. For example, figure 11 shows the link to the 3delight docs is inactive because the path had not been specified in the prefs - figure 12.



Figure 11



Figure 12



© 2002- Malcolm Kesson. All rights reserved.