The core set of functions provided by Slim can be used to generate a wide range of shaders which utilize many different special features of Slim. These core functions generally serve one particular purpose, like creating a simple noise or a pattern. The functions by themselves are not always useful must be connected to other functions to obtain a meaningful result, but the atomic nature of functions affords a great deal of flexibility when it comes to assembling shading networks. |
Special appearances perform unique roles and functions. These are generally MTOR concepts which provide an extra level of functionality for the user. These different special appearance types can provide a meta-level of control over scene management by supporting functionality beyond PRMan itself. MTOR supports these "meta concepts" and translates them for PRMan during RIB generation. For instance, in PRMan a single shader cannot contain surface, bump, and light shader information, but MTOR provides this functionality with the Ensemble, allowing multiple types of shader information to be attached to an object at once, instead of attaching each different shader individually. MTOR breaks down the ensemble into individual connections during RIB generation. Here is a list of the special case appearances:
Adaptor |
Describe different appearance attachments for different rendering conditions. |
AOV |
Use Arbitrary Output Variables in a shader. |
Archiver | Automatically cache and reference portions of your scene graph. This can result in dramatically faster rib gens. Animated cycles can even be archived. |
Ensemble | Attach different shader types simultaneously. |
Map Generator | Map Generators allow the calculation of many kinds of arbitrary maps. |
RIB Box | Insert chunks of RIB to be added into the scene at different point in the RIB stream. |
SL Box | Insert custom shading language code into your shaders. |
TCLBox |
Define chunks of Tcl to be evaluated prior to the per-object RIB encapsulation of other shaders. You can initialize values referred to in parameter expressions of other appearances. |
The Adaptor
Description: There are a variety of adaptors for different appearance types. Adaptors allow you to attach different appearances under different rendering conditions, providing a system for selecting an appearance type based on an evaluation context. You can establish different shader connections under differing conditions. You might, for example, have different shaders for different lighting conditions. Available contexts are described under the Controller parameter.
Adapters are extremely powerful way to manage shader connections. The ordered list of conditions represent a simple program. The list is traversed from top to bottom and the resulting appearance is that associated with the first condition that matches the controller conditions.
Controller: The controlling variable against which Condition strings are compared. You can select from the pull-down menu:
Add Condition: Create a new adaptor connection. The double arrows return selected objects from the Maya scene. The pull-down menu describes the comparison algorithm. You have a choice of:
Using Adaptors: In our example, we have a context sensitive Ensemble Adaptor. Let's see how it works.
First of all, the controller is set to "Context." We can define the context of a scene in the context setting of the RenderMan Globals.
We have several Ensembles connected to this Adaptor, but which ensemble is attached to an object is determined by what is defined as the context in the RenderMan Globals. If the context is defined as "night" then Ensemble_0 will be used. If the context is "day" then Ensemble_1 will be used. If any other context is entered then Ensemble_2 will be used as its field contents, "*", will match anything. Notice that the conditions are evaluated in order, so if the third condition was moved to the top, it would always be attached since its field, "*", matches anything.
Conclusion: Now this adaptor can be attached to an object, and it's simple to assign different shaders for either daytime or night scenes. We don't need to create or delete connections. All that needs to be done is enter a new context. To get even more advanced, we can plug this adaptor into *another* adaptor, perhaps one set to "Object Name." Now imagine this: a single adaptor can be attached to all of the objects in a scene, and it will attach the appropriate appearance to each individual object based on the object name (attaching the hat shader to the hat, the jacket shader to the jacket). With the proper adaptors attached to the objects by name, the appropriate day or night version of a shader is then attached by the context setting.
Example Adaptor Shading
Network |
|
|
|
|
|
|
Pixar Animation Studios
|