Tuesday, January 18, 2011

Custom TOR.ini

Instead of editing original TOR.ini (located in $RATTREE/etc), its better to keep custom version of this file in location, defined in RAT_SCRIPT_PATHS environment variable. Here you can override MTOR default values and add your own options and extensions.


At start of the file, I define some variables and load custom .tcl extensions (example)
#
# Use RAT_SCRIPT_PATHS to locate this TOR.ini
#
set userCmdDir [file join [GetEnv RAT_SCRIPT_PATHS] mesh//(cmd)] 

LoadExtension tcl [file join $userCmdDir meCommon.tcl]
LoadExtension tcl [file join $userCmdDir FlatShader.tcl]
LoadExtension tcl [file join $userCmdDir GetAppInfo.tcl]
LoadExtension tcl [file join $userCmdDir EnsTools.tcl]
LoadExtension tcl [file join $userCmdDir slimParamManager.tcl]
LoadExtension tcl [file join $userCmdDir slimPaletteManager.tcl]
LoadExtension tcl [file join $userCmdDir NodesTools.tcl]
I prefer to keep just few standard Display Channels:
SetPref RMCDspyChannels {
{DisplayChannel "float _area" "quantize" "0 0 0 0"}
{DisplayChannel "color _albedo" "quantize" "0 0 0 0"}
{DisplayChannel "color _diffusemeanfreepath" "quantize" "0 0 0 0"}
{DisplayChannel "color _color" "quantize" "0 0 0 0"}
{DisplayChannel "float _float" "quantize" "0 0 0 0"}
As I'm using my own templates with AOV, here is my default list:
{DisplayChannel "color __color" "quantize" "0 255 0 255" }
{DisplayChannel "color __diff" "quantize" "0 255 0 255" }
{DisplayChannel "color __diff_ibi" "quantize" "0 255 0 255" }
{DisplayChannel "color __diff_indirect" "quantize" "0 255 0 255"}
{DisplayChannel "color __spec" "quantize" "0 255 0 255" }
{DisplayChannel "color __spec_ibi" "quantize" "0 255 0 255" }
{DisplayChannel "color __sss" "quantize" "0 255 0 255" }
{DisplayChannel "color __reflect" "quantize" "0 255 0 255" }
{DisplayChannel "color __pstrace" "quantize" "0 255 0 255" }
{DisplayChannel "float __occ" "quantize" "0 255 0 255" }
{DisplayChannel "color __occ_C" "quantize" "0 255 0 255" }
{DisplayChannel "float __shadow" "quantize" "0 255 0 255" }
{DisplayChannel "color __shadow_C" "quantize" "0 255 0 255" }
{DisplayChannel "float __ffwd" "quantize" "0 255 0 255" }
{DisplayChannel "color __ffwd_C" "quantize" "0 255 0 255" }
{DisplayChannel "float __mask" "quantize" "0 255 0 255" }
{DisplayChannel "color __mask_C" "quantize" "0 255 0 255" }
}
Sometimes it's useful to define different grid size option for baking (for example, while baking Ambient Occlusion), so I have several extra bake settings:
SetPref RMCCustomPassSettings {
    none {}
    bake {
     -tcl {}
     -riopts {}
     -riattrs {
         Attribute "cull" "hidden" 0 "backfacing" 0
         Attribute "dice" "rasterorient" 0
     }
    }
    bake_grid_16 {
     -tcl {}
     -riopts {
         Option "limits" "gridsize" [16]
     }
     -riattrs {
         Attribute "cull" "hidden" 0 "backfacing" 0
         Attribute "dice" "rasterorient" 0
     }
    }
    bake_grid_32 {
     -tcl {}
     -riopts {
         Option "limits" "gridsize" [32]
     }
     -riattrs {
         Attribute "cull" "hidden" 0 "backfacing" 0
         Attribute "dice" "rasterorient" 0
     }
    }
}
And here, I'm adding "null" for primary and secondary display:
SetPref RMCDspyServers {it framebuffer combiner file tiff openexr alias mayaiff targa sgif picio softimage cineon null}

SetPref RMCDspy2Types {tiff openexr alias file null}

RAT::LogMsg COPIOUS "custom TOR.ini loaded..."

No comments:

Post a Comment