Making a Christmas Light Generator with MEL Part 3
Here’s Part 3 of a multi-part MEL scripting tutorial that will go through the creation of a procedural christmas light generator from start to finish.
This part continues on with the previous tutorial to extrude a tube from the previous curves.
The next part will walk you through wrapping the existing code into a function so it will be easier to call.
The final MEL script for this part is:
string $tube_curve = “Christmas_Lights_02″;
float $circle_radius = .5;
string $tube1[] = `circle -ch off -o on -nr 0 1 0 -r $circle_radius;
move -r ($circle_radius * .66) 0 0 ;
string $tube2[] = `circle -ch off -o on -nr 0 1 0 -r $circle_radius;
move -r ($circle_radius * -.66) 0 0 ;
select -r $tube1[0] $tube2[0];
string $tube_group = `group`;
select -r $tube_group;
select -add $tube_curve;
string $tube_path = `pathAnimation -fractionMode true -follow true -followAxis x -upAxis y -worldUpType “vector” -worldUpVector 0 1 0 -inverseUp false -inverseFront false -bank false -startTimeU 0 -endTimeU 1`;
cutKey -cl -t “:” -f “:” -at “u” $tube_path;
setAttr ($tube_path + “.frontTwist”) 90;
setAttr ($tube_path + “.upTwist”) 90;
extrude -ch true -rn false -po 0 -et 2 -ucp 0 -fpt 0 -upn 1 -rotation 0 -scale 1 -rsp 1 $tube1[0] $tube_curve;
extrude -ch true -rn false -po 0 -et 2 -ucp 0 -fpt 0 -upn 1 -rotation 0 -scale 1 -rsp 1 $tube2[0] $tube_curve;
WIP Animation, 030_030_030
Here’s a nice WIP shot from Josh that’s in the late stages of animation.
Using his playblast, I did some drawover notes for him. I’ve found that drawing over the original playblast gives you a lot more freedom to actually make new pose adjustments, as well as making it infinitely more clear than a bullet point list because you could literally point out the problem.
Get the Flash Player to see this player.
download
Making a Christmas Light Generator with MEL - Part 2
Here’s Part 2 of a multi-part MEL scripting tutorial that will go through the creation of a procedural christmas light generator from start to finish.
This part continues on with the previous tutorial to group the 2 circles together and attach them to a motionpath as guide curves for the cord of the Christmas lights.
The next part will walk you through extruding the circles to create the Christmas light cord and wrapping it into a function so it can be called externally.
The final MEL script for this part is:
string $tube_curve = “Christmas_Lights_02″;
float $circle_radius = 4.2;
string $tube1[] = `circle -ch off -o on -nr 0 1 0 -r $circle_radius;
move -r ($circle_radius * .66) 0 0 ;
string $tube2[] = `circle -ch off -o on -nr 0 1 0 -r $circle_radius;
move -r ($circle_radius * -.66) 0 0 ;
select -r $tube1[0] $tube2[0];
string $tube_group = `group`;
select -r $tube_group;
select -add $tube_curve;
string $tube_path = `pathAnimation -fractionMode true -follow true -followAxis x -upAxis y -worldUpType “vector” -worldUpVector 0 1 0 -inverseUp false -inverseFront false -bank false -startTimeU 0 -endTimeU 1`;
cutKey -cl -t “:” -f “:” -at “u” $tube_path;
setAttr ($tube_path + “.frontTwist”) 90;
setAttr ($tube_path + “.upTwist”) 90;
Making a Christmas Light Generator with MEL - Part 1
Here’s Part 1 of a multi-part MEL scripting tutorial that will go through the creation of a procedural christmas light generator from start to finish.
This part shows you the absolute basics of MEL, specifically walking you through creating a circle using MEL script and assigning variables to control the circle’s radius.
The next part will walk you through using the created circles as a basis for extruding the Christmas light cord.
The final MEL script for this part is:
float $circle_radius = 4.2;
string $tube1[] = `circle -ch off -o on -nr 0 1 0 -r $circle_radius;
move -r ($circle_radius * .66) 0 0 ;
string $tube2[] = `circle -ch off -o on -nr 0 1 0 -r $circle_radius;
move -r ($circle_radius * -.66) 0 0 ;
Josh’s Workflow from 2D - 3D
Josh has a pretty awesome workflow, where he blocks the whole animation in rough 2D animation and then translates it over in Maya. The results look really great. Here’s a few of the In-Progress steps. I’ll post the final pass when it’s finished.
030_020_020 2d Wip from Josh Burton on Vimeo.
030_020_020 2d Wip #2 from Josh Burton on Vimeo.
030_020_020 2d Wip #3 from Josh Burton on Vimeo.





