MEL Scripting: Studio Lighting (3 point) WIP

/*

///STUDIO LIGHTING//
Description: this script creates three point lights with attributes mirroring those of real world lighting.

Author: Elizabeth Poole – http://www.elizabethpooleart.wordpress.com

Usage:
1. Open script editor and load ElizabethPoole.mel
2. Highlight code; execute

Reason:
1. To create efficiant lighting that simulates real world lights
2. Basic set up for three point lighting
3.Ready to be placed and easily adjustable for custom three point lighting
*/

//Create Spot Light (KEY LIGHT)

string $StudioLightingKeyLight = `spotLight`; // Creates String Keylight
move 0 10 0.65; //Moves light
rotate 180 0 0; //rotates light
scale 2; //Sets Light Scale
setAttr ($StudioLightingKeyLight + “.emitSpecular”) 0; //Sets Light Specilar
setAttr ($StudioLightingKeyLight + “.coneAngle”) 105; //Sets Cone angle of Light
setAttr ($StudioLightingKeyLight + “.penumbraAngle”) 10; //Sets PrenumbraAngle
setAttr ($StudioLightingKeyLight + “.dropoff”) 6; //sets drop off of Prenumbra
setAttr ($StudioLightingKeyLight + “.useRayTraceShadows”) 1; //Sets type of shadow and distance
setAttr ($StudioLightingKeyLight + “.lightRadius”) 10; ///Sets shadow attribues. Light radius
setAttr ($StudioLightingKeyLight + “.shadowRays”) 20; //Sets shadow rays of light
setAttr ($StudioLightingKeyLight + “.intensity”) 0.2; //sets the intensity of light
setAttr “spotLightShape1.decayRate” 2; //sets the decay rate of the light (quadratic)
//Create Area Light (FILL LIGHT)
defaultAreaLight(0.2685, 1,1,1, 2, 0, 0,0,0, 1, 0);
setAttr “areaLightShape1.intensity” 0.15; //Changes Lights intensity to 150
rotate -r -oa 0rad 0rad 0rad -ws -fo 0 -136.62156 0 ; //Changes the location and rotation of light
move -r -os -wd 0 11.383348 0 ;
move -r -os -wd 9.358634 0 0 ;

//Create Spot Light (RIM LIGHT)
defaultAreaLight(1, 1,1,1, 0, 0, 0,0,0, 1, 0); //creates new area light with custom attributes
rotate -r -oa 0rad 0rad 0rad -ws -fo 0 -268.117515 0 ; //Changes the rotation and location of light
move -r -os -wd 0 10.029594 0 ;
move -r -os -wd -6.590119 0 0 ;
move -r -os -wd 0 0 2.690824 ;
//Rename Lights
rename spotLight1 KeyLight;
rename areaLight1 FillLight;
rename areaLight2 RimLight;

Leave a comment