In the previous movie, we finished assembling our alien minion
by controlling two rigs using animation keys in conjunction with parent constraints.
In this movie, we’ll use a couple of different types of animation to round out our scene’s finer details.
Open the scene “assembly_line_part3_start.mb”.
If you scrub to the end of the animation timeline,
you’ll notice that our assembled alien’s blast shield is the only one still closed.
Scrub back to frame 230.
Similar to how we controlled the mechanical arm and claw in the previous movie,
we’ll interact with this blast shield using the minion’s control rig.
Open the Layer Editor and turn on the visibility of “Minion_Top_Controls_LYR”.
If you rotate these rings, the shutters open and close.
To start, we’ll animate just one shutter
using manual keyframing techniques you learned in the previous movies.
At frame 230, set a key on the minion’s upper-right shutter’s rotation.
At frame 250, rotate it 50 degrees and set another key.
We could animate the other three shutters this way,
but then if we wanted to modify the shutter animation we’d have to do it for each one.
That’s four potential alterations for one small change in the animation.
Instead, we’re going to create a “driven key” animation.
A driven key animation drives the attribute value of one object with the attribute value of another.
In this case, we’ll drive the rotation of the remaining shutters
with the animation of the upper-right shutter.
Return to frame 230.
Deselect all objects and select the Animate > Set Driven Key > Set command.
Maya displays the Set Driven Key editor.
Select the upper-right control curve in the workspace
and click the “Load Driver” button in the editor.
Select the Rotate Z attribute to indicate to Maya that it will be your driving attribute.
Now select any of the other control curves and click the “Load Driven” button.
Once you select the Rotate Z attribute in the Driven section,
the “Key” button becomes enabled.
Click this to connect the two attributes on the current frame.
Now scrub to frame 250 and set the Rotate Z value of the driven shutter to 50 degrees.
Set another driven key.
Scrub back and forth and you can see the driven shutter opens as the keyframed one does.
You’ll notice a slight discrepancy in their timing though.
This is due to the animation curve tapers we talked about previously in this series.
To fix this, select the driven control curve and open the Graph Editor.
Select both points and use the Tangents > Linear command to remove the tapers.
The shutters now open and close completely in synch.
Go back to frame 230 and animate the other two shutters the same way.
Once you’ve set all the driven keys, the alien’s shutters open in the last leg of the conveyor belt.
If you use the Rotate Tool on the upper-right blast shield control,
notice that you can control all the shutters at once.
From now on, any time this shutter’s rotation is between 0 and 50,
the others will be as well. This is all handled independently from the Time Slider,
which only stores animation keys.
Let’s use this technique to animate the cargo bay doors as well.
At frame 250, set both the left and right door’s Translate X attribute to 0.
You’ll notice we’ve already published the right door’s Translate X value
to the environment_AST object. This is just to make it easier to find later,
if you add more elements to your scene.
This time let’s set the driven keys first.
Load the right door as the Driver and the left door as the Driven.
Then select both their Translate X attributes and set a key.
Now translate the right door to 735 and the left door to -735.
Set another key.
You can open and close the doors by translating just the right door now.
This time the motion of the driven door is actually opposite of the one from the driver door.
You can use driven keys to link attributes of matching and non-matching values alike,
as well as link non-matching attributes altogether.
As before, use the Graph Editor to set the animation curve tangents to linear,
so the doors stay in synch.
To actually open the doors, set a keyframe in the closed position at frame 250.
And in the open position at frame 380.
Notice that the keyframe also appears on the attribute in the environment_AST.
In the future, you can also use this attribute to animate the doors.
The animation is almost complete now.
The only thing conspicuously missing is some animation on the conveyor belt.
Go to the Layer Editor and switch the “Conveyor_LYR” ’s display type
from Reference to Normal.
If you select the conveyor belt you can see that it’s really just one solid polygon object
without any moving parts.
In order to animate it, we’re going to use an image sequence.
Rewind the animation and open the Attribute Editor and navigate to the "Conveyor_MAT" tab.
Click the Color Input Connection button and you can see the current texture file
being sourced by this material’s color: “conveyor_texture.png”
We’re going to change this single texture
to a sequence of images we created in an external image editor.
When the images are run in sequence, the result is a moving conveyor belt animation.
Click the folder icon and navigate to the Conveyor folder.
Change the file type to "All Files" to display the conveyor sequence files in sequence, 0 to 23.
Open the first file, conveyor_texture.000
Now turn on the “Use Image Sequence” option.
Scrub through the scene.
Notice that after frame 23, the texture turns blank.
This is because the sequence only lasts 23 frames.
We’ll need to put this on a continual loop.
Open the Expression Editor from the Animation Editors section of the Window menu.
Select Filter by Expression Name and select expression1.
This is the expression Maya has automatically created to manage our animated texture.
In order to loop it, simply add “%24” to the end and click the “Edit” button.
Rewind and play the animation. The image sequence loops every 24 frames.
Now the main portion of our animation is finished.
For some added character, let’s animate the minions' glass from a
“calm neutral green” to a “ready to invade red”.
If you select any of the minions, notice that the glass color is already published to the asset.
However, it appears as three different attributes in the Channel Box,
but just a single attribute in the Attribute Editor.
In this case, the Attribute Editor would be easier to work with.
Scrub to frame 350 and set a keyframe here
by right-clicking the attribute label and selecting “Set Key”.
Now scrub to frame 370 and use the Color Chooser to pick a shade of red.
Set another keyframe.
Now repeat this process for the other minions.
In this case, you probably want to set keyframes for each minion instead of driven keys,
since all the aliens may behave independently at other points in the scene.
It is important to consider factors like this when choosing one type of animation over the others.
Now that you have the basics of animation down you can add all kinds of flourishes.
Once you’re finished, you can adjust the Render Settings to output a sequence,
then perform a Batch Render to generate a sequence of rendered images for your animation.
These images constitute your final rendered animation.