The Appearance Editor


Table of Contents
The Basics
How To...
The Interface
Menus

File Menu
Flipbook Menu
Edit Menu
Appearance Menu
Commands Menu

Rendering Previews
Appearance Information / Navigation

Special Case Names

Editing Properties

Classes of Properties
Collections
Value Editors
The Property Menu
Value Provider
Connections

Working with Textures

Texture Settings Editor
Conversion Mapping Modes
Reference Texture Menu
Animated Textures

Bundle View

The Basics

A Slim appearance is a container of properties. The Appearance Editor is a user interface for manipulating a Slim appearance and its properties. Using the appearance editor you can:

Also when using Slim as an appearance server (e.g.: for MTOR) you can:

top

How To...

Create a Custom Shader
In the Palette Editor, invoke the Create Appearance menu, then select the type of shader you'd like to create. Now, invoke the Appearance Editor on the new appearance. Rendering causes the creation of a custom shader. Of course, this is just the beginning of the design process in which you build up an interconnected network of functions all of which together make an industrial strength custom shader.
Rename an Appearance
Just type the new name into the Appearance Name entry. Remember that if the appearance is a custom shader, or function, that it's important to name appearances uniquely.
Connect a Function to a Parameter
Open the Property Menu on the right side of the parameter. If your parameter can be connected, the bottom of the menu will contain a list of new and existing appearances to which you can connect.
Copy Values from one Parameter to Another
Use the middle mouse button to drag a value from one place to another.
Copy Connections from one Parameter to Another
Place your mouse over the property menu at the far right of your parameter. Now use the middle mouse button to drag the connection. Drop the connection on the property menu associated with a parameter of the same type. If the parameter types differ, the drop will fail.
View/Edit Property Descriptions
Simply click on the i within the icon of most properties. To edit a description, Alt-Shift-Double-Click the i.
Control how an Image is Converted to Pixar's Texture file format
First select your image via the file picker icon. After selecting your texture you must specify whether and how it should be converted to Pixar's texture file format. You can use the Texture Settings editor described below.
Pick an Image Sequence
This involves specifying a TCL procedure to both choose the mapping between input frames and output frames as well as the necessary conversion steps. More on this below.
top

The Interface

The Appearance Editor interface can be divided into four main sections:

  1. Menus
  2. Preview Rendering
  3. Appearance Information / Navigation
  4. Property Editing
top

Menus

File Menu

The File Menu contains functions related to reading and writing files.

Export...
saves the current appearance to disk in .slim file format.
Refresh
refreshes the Appearance Editor user interface. This is sometimes necessary after a reload or upgrade.
Reload (Master / Template)
causes the current appearance to be updated from its master or template. Use this when you've either modified a template or recompiled a shader.
Upgrade Template
upgrades the current appearance to the newest version of its template. This is only enabled when a newer version of the template is available.
View SL Source (not shown)
shows you the shading language source generated by the current appearance. Only available if the appearance is a function and you've enabled expert menus in the Preferences Editor.
Flipbook Menu

This menu contains options for creating flipbooks. A flipbook is a sequence of rendered frames that form an animation whose purpose is to help visualize or debug your appearance. The frame count and renderer for flipbooks is controlled in the Preferences Editor.

Shading Rate...
vary the Shading Rate from either 1 to 100 or 1 to 10 over the flipbook duration. This is useful to analyze aliasing characteristics of your appearance.
Rotation...
vary the rotation of the simple shape either from 1 to 100 degrees or from 1 to 360 degrees. This is used to analyze projection and aliasing characteristics or to simply see your appearance at work under various geometric conditions.
Frame
varies the frame according to the number of frames in you flipbook. This is useful to evaluate animated appearances. Appearances are animated either via TCL expressions or by referring to RenderMan's time variable.
Edit Menu
Undo / Redo
These commands manage the undo state. The undo and redo items are updated according to the state of the undo stack for the appearance.
Edit Bundle View
This command (only active when a bundle is displayed in the Appearance Editor) allows you to edit the hierarchy of a bundle.
Revert Values
Reverts parameter values to their defaults.
Preserve Values
Marks all values as set, preventing any changes to default values from affecting your shader.
Appearance Menu
Render Swatch
initiates a preview rendering. Pushing on the swatch itself has the same effect.
Render Scene
initiates a scene rendering. Only available when running Slim in server mode. Note that this is equivalent to pushing the Render button within the client - all Render Global settings are in effect.
Instance/Package
These submenus are similar to the Instance and Package submenus presented in the palette editor.
Export As Texture...
initiates a special rendering in which the shader is evaluated on a flat plane. This is a handy way to generate texture maps for use elsewhere. The resolution and renderer used during texture rendering is control via the Preferences Editor.
Commands Menu
Your Commands Here ...
This is where any custom commands that you've defined for the Appearance Editor will appear. More information about commands is available in the Slim Scripting documentation.
Reload Commands
reloads the commands from their definition files. This is useful when developing custom commands.
top

Rendering Previews

These controls affect rendering of a preview of the shader into the image swatch in the top left corner of the editor. You invoke a preview rendering via the menubar command "Render Swatch" or by pressing directly on the swatch itself.
Shading Rate
the basic quality / speed tradeoff control. Higher numbers render faster but at a lower quality level.
Object Size
the approximate size of the preview shape. The camera is automatically repositioned so that the apparent size of the geometry on screen is the same. Use this control to get a sense of the scale of various patterns inherent in your appearance.
Object Shape
the shape used during preview rendering. Choose from among: Sphere, Cylinder, Torus, Plane, Cube, Teapot.
Frame
the current frame for the purposes of preview rendering. This value will only affect the preview rendering if a parameter of your appearance either contains a TCL expression referencing one of the various time variables or it refers to the RenderMan variable, time.

top

Appearance Information / Navigation

This section of the Appearance Editor gives you information about the appearance you are editing and allows you to navigate to other ones.
1. Type Icon
An icon for the type of appearance being edited is displayed here. In this case, we see the icon for color functions.
2. Appearance Name
Use this entry to name your appearance. Because this name is often used to name shaders that are generated, Slim may make minor changes to the name to ensure that the name is unique and produces a valid filename.
3. Navigation
The back and forward buttons work like your favorite web browser, moving you back and forth through the history of appearances you've edited with the appearance editor.

The up arrow is a menu button that presents a menu of functions that have parameters directly connected to the edited appearance, that is, one level up in the call graph.

4. Description
A description of the appearance can be viewed by clicking on the small information icon.
5. Appearance Template
Appearances created from templates will display the Appearance Template here. Users who have turned on Expert Menus will also see the version of the template used. When the template used is an old version that requires upgrading, this field will appear in red.
5. Appearance Master (not shown)
Appearances created from imported shaders will display the name of the shader (or master) here. The Appearance Master is the string used to refer to your shader in the RenderMan interface. Depending on your studio's requirements, it may be useful to refer to shaders and textures via either an absolute or a relative pathname. Moreover it may be useful to refer to them using abstractions that are resolved at RIB generation time. Here are some common forms:
  • relative reference: rmanshader/myshader
  • absolute reference: /home/slimuser/project1/rmanshader/myshader
  • relative abstract reference: $torShaders/myshader
  • another relative abstract reference: $torShaders/$INSTANCENAME
  • absolute abstract reference: $WSRoot/$torShaders/$INSTANCENAME

When using relative references and abstractions, the settings and search paths associated with the current workspace control the interpretation or resolution of an external resource. The Workspace Editor is used to establish these settings.

5. Appearance Master Reference Toggle (not shown)
This control attempts to automatically convert between an absolute and a relative reference for the shader. The current workspace's search paths are used to either strip or add pathname components.
Special Case Names

By default, there are a few appearance names that have special significance to MTOR. These names are often used in conjunction with special shaders and RIB boxes to create special effects and scene optimizations. When you prefix the name of your appearance with one of these special names, you tell MTOR to attach your appearance to an abstract RenderMan concept as opposed to a specific object in your scene.

Simply prefix your appearance with one of the following:

backplane
Use this to change the background color, or to apply procedural shaders and textures as a background. "Backplane" signals MTOR that an appearance should be attached to the special backplane geometry. Note that this will only have an effect if the backplane option is enabled in MTOR's RenderMan Globals window.
frontplane
With this, special appearances can create effects like light glows. "Frontplane" signals MTOR that an appearance should be attached to the special frontplane geometry. Note that this will only have an effect if the frontplane option is enabled in MTOR's RenderMan Globals window.
world
Appearances like RIB boxes, atmospheric fog, and environment lights, should be prefixed with "world" when effecting the whole scene. "World" signals MTOR that an appearance should be output after lights have been defined in the RIB stream. This allows you to override any world-wide defaults, while inheriting the appropriate global lighting.
declare
Useful with RIB boxes. "Declare" signals MTOR that an appearance should be output in the Declaration part of the RIB file. This allows you to declare arbitrary RenderMan variable types.
frame
Useful with RIB boxes with time specific contents. "Frame" signals MTOR that an appearance should be output immediately prior to the RiWorldBegin directive. This allows you to override any frame-wide options or attributes.
top

Editing Properties

Every appearance contains a number of properties. These are the elements of how a typical property is displayed:

1. Property Icon / Description
This icon indicates the class of property displayed and its provider. The presence of an i indicates that a description of that property can be accessed by clicking the icon.
2. Property Label
This is the name of the property that is being edited. Double-click this text to change it. The label will change color when a value is set for a parameter.
3. Value Editor
This is an editor specific to the property's type.
4. Property Menu
This menu displays a list of actions and options for your the property. The menu is specific to the class of property displayed.
Classes of Properties

The class of a property is indicated by the icon to left of a property's name. These are the classes of properties with values that can be edited:

Parameter
By far the most common class of property, parameters of appearances correspond to parameters of shaders and/or shader functions.
Slim Attribute
Slim Attributes are guaranteed to be constant, and will not be visible within a shader. It is for these reasons that they are useful for controlling the code generation within a DynamicFunction.
TOR Attribute
TOR Attributes affect jobs created by MTOR. Map Generator templates, for example, contain TOR Attributes to control how and when those maps are generated.
RIB Attribute
RIB Attributes are RenderMan settings that are specific to your shader. These attributes and their values will be represented in the RIB stream when the enclosing appearance is encapsulated into the RIB format. Sample RIB Attributes include:
  • displacementbound
  • shadingrate
  • sides:doubleshaded
Much of RenderMan's ray-tracing functionality is controlled via RIB Attributes (in the Ensemble template, for example).
Collections

Technically another class of property, collections provide a grouping mechanism for other properties. Collections can serve several different purposes:

Grouping Similar Properties
The most common use of collections is simply to simplify a user interface by hiding properties within the collection. Users can open or close the collection using a disclosure widget ( ) and its state is maintained across Slim invocations.
Representing Arrays
Slim uses the collection class to represent arrays. Individual array elements appear as parameters within such a collection.
Representing Composite Function Types
The fundamental types for parameters are described below. Using a collection, these types can be combined into a composite type to provide a single connection point. The "shadingmodel" type, which contains a color and an opacity value, is represented by a collection. When a collection is used in this manner, it will appear to the user as a parameter.
Defining Custom Interfaces
A template may override the standard interface for a set of parameters, and instead declare a custom user interface or Custom UI. A collection is used to define the Custom UI that should be used and the set of properties that should be represented.
Value Editors

Properties come in several different types. The Appearance Editor presents a different editor for each of these types. The most common types and the editors displayed are presented below:
float
A single floating-point value, floats are edited using a widget which features both a numerical entry (or "VSlider") and a graphical slider.
color
An RGB color, colors are edited using Slim's Color Editor, which is raised by clicking the color chip. Additionally, the intensity of a color can be quickly adjusted using the accompanying slider.
point / vector / normal
These three types represent geometric entities in three dimensional space. The X, Y, and Z components are each represented with a VSlider.
string
Plain old strings are generally not that interesting, though should you want to edit one, an editor is provided. Far more interesting are string subtypes (below).
Some properties may request an alternative editor for a given type using a subtype. Here are some common property types (and subtypes):
float (selector)
an option menu for choosing among a defined list of values
float (switch)
a check box for setting an on/off value
string (bigstring)
A string too long to be edited in one line, the bigstring subtype relies on an external text editor to edit its value.
string (texture)
A string which is the name of a texturemap, the texture subtype (as well as similar subtypes for reflection, environment, shadow, etc.) specifies that the string is the name of a texture file on disk. This editor includes access to texture conversion tools.

The Property Menu

The property menu combines several settings and commands for your property. There are three main sections of the property menu. Depending on the traits of the property, the menu may display some or all of these sections.
1. Value Provider
This section controls the Value Provider for your property. If the value provider cannot be changed for your property (because, for example, it is a Slim Attribute, or because it must be connected), this menu will not be displayed.
2. Commands
This section displays a set of commands that are relevant to the property and to its Value Provider.
3. Connections
Some properties can have their value provided by another function. For these properties, a list of possible connections to make is displayed.

Value Provider

The default widget associated with each parameter is only one way to set its value. The value of a parameter can actually come from a number of different places and the Value Provider section allows you to choose this.

Different properties have different combinations of provider options available. The color of the property icon indicates a property's provider.

By default, the value of a parameter will usually be stored as a constant, Internal Value. This means that the value will be hard-coded into the shader and cannot be changed without regenerating the shader.

A parameter with a green icon indicates that it has an External Value. External parameters are declared as parameters of the shader allowing their values to change without regenerating the shader. When bundling, flattening, or instancing a shader, only parameters with external values will be shown.

Sometimes expressing the value of a parameter via a static value isn't sufficiently powerful. You might want to, for example, request that the value change from frame to frame via a TCL expression. Setting the Value Provider to TCL Expression causes the icon to turn orange and presents a different entry widget where you can enter a numerical expression. The property menu will contain commands to control and test your expression. More details on the TCL expression subsystem are described elsewhere.

The most powerful Value Provider is Connection. Setting the Value Provider to Connection causes the property icon to turn purple and displays the connection type in the property menu. The value of the parameter is provided by the output of another function. Because each function can have parameters with values provided by other functions, you can build up powerful networks of functions interconnected through their parameters.

Note that the name of the connection appearance is displayed within a button. You can use this button to navigate to the connected appearance. Button-1 will edit the appearance in the current editor. Button-2 will edit the appearance in a new editor.

Some parameters may specify that their value must be provided by another function and will specify a default function to connect to. In this case, the Manifold parameter has specified that by default, it should connect to a SurfacePoint function. You can override this default and connect the parameter to a different function, but the parameter must always be connected to something.

Connections
This is how the Property Menu appears when a parameter receives its value from a connection:
1. Value Provider
Note that the Value Provider section indicates that the parameter is receiving its value from a connection to "ReflectionMap."
2. Connection Commands
Because the Value Provider is currently a connection, the commands section changes to present two commands: Disconnect ReflectionMap and Delete ReflectionMap.
3. Connections to New Functions
These cascade menus list templates that can be used to generate a new function. Selecting one of these creates a new function from the selected template and connects the parameter to the function.
4. Connections to Existing Functions
This last list is of existing functions that can be connected to the parameter. So long as you do not create a loop, functions can can connect to any number of parameters in functions. You can also make connections by drag/dropping from one property menu button to another.
top

Working with Textures

Slim accepts both TIFF files and Pixar texture files (*.tex), a format optimized for high quality texture filtering and high performance. (Slim does not accept other file formats.) You can specifiy textures for use in your shaders through various "file" parameters associated with your shaders similar to the image above. You can also convert TIFF textures directly to Pixar's efficient texture format using the texture conversion menu described below. Through the texture conversion menu you can also specify how a texture will repeat.

In the figure above, notice that Slim provides two controls adjacent to the text entry field.& The leftmost "folder" button simply invokes the File Picker, which is the most convenient means of loading in a texture file. (Depending on the Full Paths preference, the File Picker will return either a fully qualified path name or a relative pathname.) With TIFF files we can request that Slim / MTOR transparently convert the images to Pixar's texture file format using the texture conversion menu.

To the right of the File Picker button is the Texture button. This menu button raises this texture menu, which contains a settings for converting textures, a reference menu, and commands to show or edit your image.

The purpose of these menus is to help you to construct a TCL expression that evaluates to the name of a dynamically constructed texture map.

If you prefer to type TCL expressions directly, there's no need to use these menu at all. The same would be true if the canonical expressions manipulated by these menus isn't sufficient for your purposes.

Some string parameters are identified as texture map parameters by their subtype field in their .slim file. In addition to standard color maps, RenderMan supports several different computed texture types: shadow maps, reflection maps and environment maps.

Texture Settings Editor

The Texture Settings Editor is a convenience provided to simplify the task of controlling the details of texture conversion. By selecting entries in this menu you are building up the argument list to the Slim provided TCL procedure: txmake. This procedure is defined in $RATTREE/etc/TORExpression.tcl and loaded via $RATTREE/etc/TOR.ini. You can override this procedure via mechanisms described elsewhere. The TCL proc txmake is merely a cover function for RenderMan's standard texture conversion features and specifically Pixar's txmake utility program. Its purpose is to help track all texture conversion requests and to calculate the mapping between source texture name and destination.

Here are the primary controls:

File
The image file.
Convert
This switch controls whether the file should be converted to a texture. The texture controls appear when this switch is on.
Type

Type of texture to create. Type is one of:
  • texturemap : standard color or grayscale image
  • shadowmap : Pixar's shadowmap format, converted from a depth map.
  • env latlong : environment created from a lat-long projection stored in a two-dimensional image.
Precision
Precision for each channel of each pixel. By default, each channel is represented by eight bits (a byte). Using -short will represent each channel with a 16 bit (signed) integer. Using -float will represent each channel with a 32-bit floating point number. Note that these options will only work if there is at least as much precision in the source file.
Resize
For reasons internal to the texture mapping software, texture files must be an even power of two in width and height (i.e. 256, 512, 1024, 2048, etc). Any input image which is not already a power of two in both dimensions will be resized, as described below:
  • up : the image is resized up to the next higher power of two.
  • down : the image is resized down to the next lower power of two.
  • round : the image is resized to the nearest power of two.
  • none : the image is not resized, the texture map size will be the next higher power of two. Texture file area not covered by the image will be set to black. Texture coordinates will be 0 to 1 across the resulting image.
Access
How textures will be accessed when the image is resized:
  • corrected : the image will retain its aspect ratio when mapped onto a square patch.
  • normalized : texture coordinates will be 0 to 1 across both dimensions.
Extra Args
Extra arguments for the txmake call.
Smode/Tmode Icons
the icons next to the gridded texture determine the repeat mode for your texture in each direction. This applies when accessing the texture outside of the range 0-1. (See examples in diagram below.)
  • black : fill the nether regions with black
  • periodic : tile texture
  • clamp : smear the pixels at the edges indefinitely
Remember that these controls are only meaningful for external, pre-existing textures. You should use the Reference Texture Menu for computed maps.
Conversion Mapping Modes

Original Texture "Black"
smode/tmode
"Periodic"
smode/tmode
"Clamped"
smode/tmode
Reference Texture Menu

The Reference Texture is a convenience provided to simplify the task of controlling the details of texture referencing. Use this menu to refer to a computed map that's calculated from the point of view of an object in the Slim Client's scene.

Most commonly you'll want to compute shadow maps from the point of view of a light source object. You can attach a Slim light appearance to the light source object. Now you can use special TOR Attributes of the appearance to cause the generation of a shadow map via an additional rendering pass. Alternatively you can create a Map Generator Appearance and attach that to an object in your scene.

In the final rendering you can refer to the computed shadowmap with the TCL proc shdmap as follows:

Here we've used $OBJNAME to refer to the object that the light appearance is attached to. In other situations you'll need to manually type the name of the map generator object.

Animated Textures

Another common situation requires the specification of an animated sequence of images for a texture map. Often you'll have a sequence of frames whose duration matches the duration of your shot. In these cases something like the following should suffice:

Here we used the variable F2 to refer to the current frame 0 padded to two digits. If the current frame is 2, then the argument to txmake reduces to sequence/rat.02. You can use $f, $F, $F1, $F2, $F3, $F4 or $F5 to choose other padding options.

A more complicated situations arises when you need to remap a range of images of one duration into another duration. In this case you can write your own custom remapping TCL proc or you can use the fit function we provide.

Here, note that we invoke the fit function by placing it within square brackets. This is replaced the string that fit calculates based its knowledge of the current frame and the arguments provided. In this examples, our output frame numbers serve as the input frame range for the fit function. As the current frame goes from 0 to 100, fit returns a number between 1 and 30 and this number is padded with zeros to two digits resulting in a filename like: sequence/rat.29. The source of the fit function is provided as an example remapping procedure and can be found at $RATTREE/etc/RATExpression.tcl.

top

Bundle View

Appearances that have been collected using the Bundle command will be displayed as a hierarchy in the appearance editor:

This hierarchy presents appearances in your bundle with parameters marked as External. This hierarchy can be edited. Select Edit Bundle View from the Edit menu, and the view will change to edit mode:
In Edit mode, appearances that are marked hidden will be displayed, but in italics. Appearances and collections are hidden if they do not contain any external parameters, or if they only contain another appearance or collection. To override the visibility of an appearance or collection, use the right-mouse menu.
You can also rearrange these parameters using drag and drop. Drag any parameter to wherever in the hierarchy you want it to be displayed:
When you are finished editing, press the "Done Editing" button at the bottom of the editor. If you wish to add more appearances or parameters into your bundle, you can open it using the bundle icon (in any editor). When you close the bundle back up, you should find your new parameters in the bundle. You should also find that any changes that you've made to the hierarchy will be preserved. (Note, though, that this only is the case when opening and closing a bundle. Exploding a bundled node removes all hierarchy information.)
top


Pixar Animation Studios
(510) 752-3000 (voice) (510) 752-3151 (fax)
Copyright © 1996- Pixar. All rights reserved.
RenderMan® is a registered trademark of Pixar.