Maya Wiggle Expression

 

Here’s a quick MEL wiggle expression for Maya’s transformation channels.
This is similar to After Effects’ wiggle() expression.

Step 1. Go to Channelbox > Edit > Expressions…

Step 2. Paste the following

Translation
$wiggleF = 3; //Wiggle Frequency
$wiggleA = 3; //Wiggle Amplitude
$wiggleV = 1.1; //Wiggle Per Axis Frequency Variant

translateX = noise(time*$wiggleF)*$wiggleA;
translateY = noise(time*$wiggleF*$wiggleV)*$wiggleA;
translateZ = noise(time*$wiggleF*(1/$wiggleV))*$wiggleA;
Rotation
$wiggleF = 1; //Wiggle Frequency
$wiggleA = 180; //Wiggle Amplitude
$wiggleV = 1.1; //Wiggle Per Axis Frequency Variant

rotateX = noise(time*$wiggleF)*$wiggleA;
rotateY = noise(time*$wiggleF*$wiggleV)*$wiggleA;
rotateZ = noise(time*$wiggleF*(1/$wiggleV))*$wiggleA;
Scale
$wiggleF = 3; //Wiggle Frequency
$wiggleA = 3; //Wiggle Amplitude
$wiggleV = 1.1; //Wiggle Per Axis Frequency Variant

scaleX = noise(time*$wiggleF)*$wiggleA;
scaleY = noise(time*$wiggleF*$wiggleV)*$wiggleA;
scaleZ = noise(time*$wiggleF*(1/$wiggleV))*$wiggleA;

Step 3. Adjust Frequency, Amplitude and per axis frequency Variant to liking

Note: By default, the translate Y and Z frequency has a 1.1 (and ~0.9) multiplication to vary the animation on all 3 axes to avoid spatial linearisation.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *