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" } 

0 comments:

Post a Comment