2009年11月25日 星期三

Melscript for Renderman bake camera

這是一個自動產生一個camera給特定的renderman shader,並且自動把指定的sss traceset 都做好

if (`objExists sss_horse`)
{
select sss_horse;
mtor control attach mapgen "1400_D3VBi4i1000";
}
else
{
string $camera[] = eval("camera -centerOfInterest 5 -focalLength 35 -lensSqueezeRatio 1 -cameraScale 1 -horizontalFilmAperture 1.78 -horizontalFilmOffset 0 -verticalFilmAperture 1 -verticalFilmOffset 0 -filmFit Fill -overscan 1 -motionBlur 0 -shutterAngle 144 -nearClipPlane 0.01 -farClipPlane 1000 -orthographic 0 -orthographicWidth 30");
parent $camera[0] ju_c_horse_rig_h:root_ctl;
setAttr ($camera[0] + ".translateX") 41.524;
setAttr ($camera[0] + ".translateY") 33.507;
setAttr ($camera[0] + ".translateZ") 66.260;
setAttr ($camera[0] + ".rotateX") -12.938;
setAttr ($camera[0] + ".rotateY") 30.200;
setAttr ($camera[0] + ".rotateZ") 0.000;
setAttr -lock true ($camera[0] + ".tx");
setAttr -lock true ($camera[0] + ".ty");
setAttr -lock true ($camera[0] + ".tz");
setAttr -lock true ($camera[0] + ".rx");
setAttr -lock true ($camera[0] + ".ry");
setAttr -lock true ($camera[0] + ".rz");
setAttr -lock true ($camera[0] + ".sx");
setAttr -lock true ($camera[0] + ".sy");
setAttr -lock true ($camera[0] + ".sz");

select -r -ne $camera[0];
mtor control attach mapgen "1400_D3VBi4i1000";
rename $camera[0] "sss_horse";
}
if (`objExists horseSSSSet`==0)
{
select -cl;
select -tgl ju_c_horse_rig_h:hi_res;
MTORCreateTraceSet horseSSSSet;
}

沒有留言: