Slim, Part I

What is Slim?

Slim is the shader sub-component of MTOR.

Slim is used for creating and assigning RenderMan shader networks and assigning them to Maya scene elements (geometry, lights).

Basic idea - 'appearances'

Appearances

Networks - 'connections'

Connections

Palettes

Palettes

Animating a parameter

Parameter animation


[clientcmd "getAttr locator1.tx"] etc.

RIBBoxes

RIB boxes

Slim templates vs .slo RSL shaders

Cannot make connections from/to .slo shaders!

Ensembles

Ensembles


Useful for grouping shaders together as a 'bundle'.

Texture mapping

Texture mapping


MayaUV manifold


STMatrix0 attr: [st0 place2dTexture1]


STMatrix1 attr: [st1 place2dTexture1]

Shadows, reflections

Shadows and reflections

Scripting

All of Slim can be 'done' via MEL commands - no need to bring up the palette UI, etc.
// Execute the following in a fresh copy of Maya
global proc slimCmdsSampler()
{

    file -f -new;
    setAttr "persp.tx" 4.7;
    setAttr "persp.ty" 3.5;
    setAttr "persp.tz" 4.7;
    setAttr "persp.ry" 45.0;


    cylinder;
    directionalLight;

    string $newPal = `slimcmd slim CreatePalette -new -edit`;      
    slimcmd $newPal SetLabel "FunPalette";
    // slimcmd slim ReadSlimFile "/soft/apps/rat/4.5.1m40/lib/slim/shadingmodels.slim";
    string $shdrHandle = `slimcmd $newPal CreateInstance -template "pixar,Constant"`;
    $shdrID = `slimcmd $shdrHandle GetID`;
    select -ne -replace nurbsCylinderShape1;
    mtor control attach "surface" $shdrID; 
    mtor control renderspool;
}// slimCmdsSampler()
See docs for details..

Parameter expressions

See docs.

Writing your own templates

See samples that come with PRMan.