Class 2: MTOR..

RenderMan Globals GUI overview

THE place to specify a variety of settings related camera, image, quality, raytracing, job setup, etc. Do RenderMan->Render Globals to access the tabbed panes.

Runtime Tcl interpreter inside MTOR

MTOR's embedded Tcl interpreter can be accessed in a variety of ways:

MEL MTOR commands:


Standalone mtor executable:


MEL Slim cmds:


Slim parameter expressions (to animate shader attrs):

One of the most useful expressions simply provides a hook into MEL:

[mel "getAttr -size curve1.controlPoints"]

A couple more examples:

[expr 5 * [mattr "sphere.translateX" $f]]
$f < 10 ? [mattr "s.translateX" $f] : 0

As an example of running command line mtor, try this:

mtor -scene yourscene.ma
% rg camName perspShape
% genRib 5
% render 7
% quit
[or]
mtor -scene river_water.ma -cmd "rg camName perspShape; render 1"

Simple mtor MEL command:

 mtor control setvalue -rg pixelSamples -value "4 4";

MEL proc to create appearances, 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()

What in Maya gets translated by MTOR

Maya's attrs that automatically get translated:


ST prim. variables, _Pref ref. geometry:

To associate ST values with CVs, do:

RenderMan->Vertex Variables->st: chord length 
or
RenderMan->Vertex Variables->st: random
To associate reference geometry (a frozen copy of your deforming geometry which gets associated with each deformed version, to enable you to 'pin' patterns and textures over a deforming surface), do:
RenderMan-> Vertex Variables-> _Pref:freeze 
Once you have such ref. geometry traveling with your animating surface, here is a shader to make use of the reference:
surface mySurf (float Sticky = 0;
	        varying point __Pref = point "object" 0;
	       )
{
if( Sticky == 0 )
  Ci = color noise( P );
else
  Ci = color noise( __Pref );
}


Arbitrary prim. variables (mostly useful for per-particle attrs transfer):

What gets translated automatically

What else gets translated/created