Cutter
Shader Writing


return to 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. As an added bonus for those who wish to use their custom shaders with either RenderMan Artist Tools (RAT) or RenderMan Studio (RMS), Cutter automatically writes 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.



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


Cutter 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.



Cutter 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.



Cutter 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.


Cutters 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.


Cutters Keyframing Facilities

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".




© 2002- Malcolm Kesson. All rights reserved.