Saturday, February 6, 2010

overriding displacment

sometimes you don't want the specular or reflection component to be affected by bump/displacement, create a vector slbox and plug into the normal of the component normal nn; displacement("__Norig",nn); result = normalize(nn);

Wednesday, February 3, 2010

set SSS bake shading rate

this is for use with sss bake, it sets the bake shading rate to 1 if its less than 0.1, and multiplies it by 5. In most cases, it just means a shading rate of 5.

[ set bakeLevel 5;
set oriShadingRate [mel "mtor control getvalue -rg shadingRate"]
if { $oriShadingRate < 0.1 } { set oriShadingRate 1.0 }
set newShadingRate [expr $oriShadingRate * $bakeLevel ]
if (\$CONTEXT=="BAKECONTEXT") { return "ShadingRate $newShadingRate" }