XM Magdalena 3D print, GGeorgy (3D)
LC #42 Pipers Alley

View Full Version : Help Creating a Lightning Fx

05-30-2005, 06:41 PM
Hi im working on a Vfx, i must create some lightnings coming out of a Machine, im using Maya 'couse must be in 3D. Im writing a Mel (down) that Create a base. But i think im going on the hard way.

The Maya pre maded Fx (effects >> Create Lightning) dont work for me, i need the lightning to have childs (split in other lightnings).

Here its the Mel, its BETA, and dont have an Interface (sorry)

//Declarar Variables
int $jointNumber=1,$cant=10,$i;
string $jointName="",$cilName="",$jointAnt2="joint1",$inst="";
vector $startJoint=<<0,0,0>>;
vector $antJoint=<<0,0,0>>;
float $randomX=0.0,$randomY=0.0,$randomZ=0.0;

//Creo el Joint Inicial [Starting Joint]
joint -p ($startJoint.x) ($startJoint.y) ($startJoint.z);
joint -e -zso -oj xyz -sao yup $jointName;

//Creo los siguientes joints [Next Joints]
joint -p $randomX $randomY $randomZ;
joint -e -zso -oj xyz -sao yup $jointName;
$cilName = "Cilindro"+($jointNumber-1);

//Se crea los cilindrios [Create Cilinders, Lightning geometry]
cylinder -p 0 0 0 -ax 0 1 0 -ssw 0 -esw 360 -r 1 -hr 2 -d 3 -ut 0 -tol 0.01 -s 8 -nsp 1 -ch 1 -n $cilName;
select -r $jointAnt2;
select -tgl $cilName;
pointConstraint -offset 0 0 0 -weight 1;
select -cl;
select -r $jointAnt2;
$inst= $jointAnt2 + ".translate";
$antJoint = `getAttr $inst`;

//[Move the endles Hull CV's to fit joint Sizes.]
for ($i=0; $i<8; $i++){
setAttr $inst ($antJoint.x);
for ($i=0; $i<8; $i++){
setAttr $inst ($antJoint.y);
for ($i=0; $i<8; $i++){
setAttr $inst ($antJoint.z);

select -cl;

//End Of Mel

CGTalk Moderation
05-30-2005, 06:41 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.