Maya 2013 is nearly upon us and, if you have the Maya 2012 SAP, you already have its sweet new Node Editor. The Node Editor makes procedural animation a lot easier and I’m using it today to add randomness to the motion of an object. There are a lot of jitter scripts out there but the last thing I want is a ton of keyframes that will be annoying to manage on top of the object’s base motion. The advantage to doing jitter procedurally is that you don’t have to bother with a lot of expressions or animation layers and you can hone values separately from your your keyframes.
The workflow is really easy. Create your base animation and then open up the Node Editor and graph the object connections. From there, you can then insert a Noise texture, animate its “time” parameter (so its values change over time) and then use a Plus/Minus/Average node to add your noise to the animated channels (here I’m adding it to rotation):
As you can see at the end of the video, the point of the Multiply/Divide node is to allow you to scale the effect of the animated noise – it’s not essential. Some people use a Multiply/Divide instead of a Plus/Minus/Average node but this has certain drawbacks – if your object has 0 rotation and you want to jitter it, 0 times anything is still 0, where 0 + jitterValue = jitterValue. If you want to increase the effect of jitter as your space ship enters the ozone later, keyframe the increasing/decreasing multiply values and you’ve got a simple and flexible “OMG WTF ATMOSPHERE” animation.
If you want to avoid keyframing the noise time, you can create an expression for the time slot to have the current frame time change the value:
t_noise1.time = time
The only thing you should be careful of is that, if you have two or more noise textures driving different translation jitters, you need to offset them or they will make your translations too uniform. Notice how the rotation and translation of this floating meteorite look wrong until I offset the time expression: