« Clockstoppers / Cinefex Magazine | Main | Real Time Lighting in Shake »

November 06, 2005

Dripping Blood Maya Mel Script

dripDemo.jpg

Oozing blood? Scary swamp moss? Maybe just some festive icicles?

This MEL Script maps a particle's position along a curve to a noise function and uses it to control its initial velocity to creepy effect.

dripSetup.jpg

Step 1) Design a NURBS curve.

Step 2) Drop in a particle omni emitter.

Step 3) Into the particleShape's creation expression to the following:

float $tVal = rand(0,1);
vector $tVal3D = <<0, $tVal, 0>>;

vector $birthPos = eval("pointOnCurve -top 1 -pr "+$tVal+" curve1");

vector $velocityVal = <<0.0, -1.0, 0.0>>;

particleShape1.position = $birthPos;

float $tVal3D_x, $tVal3D_y, $tVal3D_z;
$tVal3D_x = 0.0;
$tVal3D_y = $tVal * 100;
$tVal3D_z = time * 0.1;
$tVal3D = <<$tVal3D_x, $tVal3D_y, $tVal3D_z>>;

float $noiseDrag = -1 * (pow(abs(noise($tVal3D)),4)) * 0.25;
$velocityVal = <<$velocityVal.x, $noiseDrag, $velocityVal.z>>;

particleShape1.velocity = $velocityVal;

Be forewarned: Maya gets quirky whenever you try and do anything too different from the standard workflow. Sometimes I need to rebuild this from scratch to get Maya to behave properly.

Posted by digital artform at November 6, 2005 03:40 PM

Comments

Neato. You're working towards something which is the opposite of some recent explorations I've been on. I am working to put curves on to particle positions: http://www.lizardlounge.com/files/curveFlow1b.mov

Posted by: Chris at November 7, 2005 12:23 PM

I looked at your flowCurve movie. Pretty cool! I haven't played around too much with dynamic hair, but I wonder if attaching dynamic hair to particles is (a) possible and (b) something that would apply to what you're doing there.

Posted by: Joseph Francis at November 7, 2005 01:00 PM

Dynamic hair off particles sounds like something that would be worth exploring. As might softbody curves being attached as well. Lot's to look into. I'll let you know if anything cool comes of it. There was a nice example of something along those lines in the Kolektiv Particles DVD from a few years ago.

Posted by: Chris at November 16, 2005 02:44 AM

Chris, I've developed script drawing curves from particles too: http://ndhaussy.free.fr/melScript/drawParticleCurveScripts.mel It was for a stylish smoke design

Posted by: Nicolas d'Haussy at May 26, 2006 09:40 AM

Post a comment




Remember Me?

(you may use HTML tags for style)