Monthly Archives: November 2010

Maya: Simple MEL Skript to create Background

createBackgroundScript.zip


//Create Three Sided Rendering Background

//Neal Bürger - 10-12-19

//Create Cube

polyCube -n three_Sides_Background -w 30 -h 30 -d 30 -sx 1 -sy 1 -sz 1 -ax 0 1 0 -cuv 4 -ch 1;

move -r 0 15 0;

//Delete Faces

select -r three_Sides_Background.f[1] three_Sides_Background.f[0] three_Sides_Background.f[5] ;

doDelete;

//Insert Edge Loops

select -r three_Sides_Background.e[4] three_Sides_Background.e[8] three_Sides_Background.e[7] ;

polySplitRing -weight 0.85 -smoothingAngle 30;

select -r three_Sides_Background.e[3] three_Sides_Background.e[11] three_Sides_Background.e[6] three_Sides_Background.e[5] ;

polySplitRing -weight 0.15 -smoothingAngle 30;

select -r three_Sides_Background.e[0] three_Sides_Background.e[13] three_Sides_Background.e[2] three_Sides_Background.e[20] three_Sides_Background.e[1] ;

polySplitRing -weight 0.85 -smoothingAngle 30;

//Smooth

displaySmoothness -divisionsU 3 -divisionsV 3 -pointsWire 16 -pointsShaded 4 -polygonObject 3;

subdivDisplaySmoothness -smoothness 3;

select -r three_Sides_Background ;

//check Mental Ray

if(`getAttr defaultRenderGlobals.currentRenderer` != "mentalRay"){

setAttr defaultRenderGlobals.currentRenderer -type "string" "mentalRay";

}

//cleanup

int $three_Sides_Background_Count;

$three_Sides_Background_Count++;

rename "three_Sides_Background" ("three_Sides_Background" + $three_Sides_Background_Count);

rotate -r -os 0 90 0 ;

makeIdentity -apply true -t 1 -r 1 -s 1 -n 0;

DeleteHistory;

Camera: Vertigo Effect

Um den Vertigo Effect in Maya zu realisieren, muss man  für ‘Position’ und  ‘Focal Length’ von der Kamera Keyframes setzen.

Eine Wegfahrt  realisiert man mit  dolly out, zoom in. D.h. Die Kamera ist beim ersten Frame nah an dem Objekt , und ist dann bei dem Finalen Frame weiter entfernt vom Objekt. Die Focal Length ist am Anfang ein niedriger Wert und im Finalen Frame ein hoher Wert.

Eine Zufahrt  realisiert man mit  dolly in, zoom out. D.h. Die Kamera ist beim ersten Frame weit entfernt von dem Objekt , und ist dann bei dem Finalen Frame nah am Objekt. Die Focal Length ist am Anfang ein hoher Wert und im Finalen Frame ein niedriger Wert.