Winning the Race —Multifaceted Animations in Timeline
--
Making multifaceted character animations often requires more than just multiple animation clips spliced together into one sequence.
For more context, “multifaceted animation” is a term I like to use to refer to animations that require more than one track or Timeline combined into a single finalized animation. Previously, we discussed character animations with multiple clips spliced into one track.
Objective: Learn how to create a multifaceted character animation sequence in Timeline.
Table of Contents
· A Word on Imported Animations
· Adding Animations
· Overriding an Animation
· Using Avatar Masks
· Finishing Touches
· The Result
Be sure to check out the Character Animations if you’re new to animating characters in Timeline.
A Word on Imported Animations
Note: Before we get started, if you’re working with Imported Animations, you might get a message like the one below when you try to add them to your Timeline.
If so then, check out this quick 3-minute guide on how to fix it.
Adding Animations
The animation I will be demonstrating is a “Winning the Race” sequence. This will include the following:
- Character running and crossing the finish line
- Celebration Poses + “Confetti” particle effects
- Character Limping away
Note: All animations are from Mixamo.
- Create an Empty Game Object, this will be your Timeline.
Then add a Director Component, make sure to save this in a “Directors” folder that you create for your project.
2. Drag and drop an animation of your choice into Timeline, and make sure to select Animation Track when prompted. Here I have added my “Fast Run” animation clip.
Since the clip is very short, I selected the clip and went into the Inspector → Animation Playable Asset → set Loop to “On”.
Then I stretched out the clip. This combination of settings will make the clip loop for the duration of the clip without resetting the position so it looks like one continuous animation.
Now we want the character to start celebrating their victory as they cross the finish line, but some animations can’t just be added onto the same track, this brings us to the Override Track.
Overriding an Animation
Sometimes splicing animations together doesn’t give us the desired result even when we add ease in/out transition. In situations like these, we can use an Override Track to merge or cancel the previous animation and transition to the next.
- Add an Override Track, this will always be conjoined to the Animation Track from which you created it — this is because it needs to have a connection to the animation it’s canceling out.
2. Drag and drop the animation you want to use as an override, and this alone should cancel the animation in the Animation Track and initiate the override.
You might notice that the overridden animation starts at a different position, usually we just match the offsets, but Overrides need to be manually adjusted.
3. Go to the Inspector and click on the Clip Transform Offset
Then position your character where it should be in the overridden animation. You can simply copy and paste values from the previous clip’s Transform Offsets in the Inspector, but you can manage manually.
Now it should be fixed:
That takes care of our override! But what if I didn’t want to override the entire run animation? This can be achieved with Avatar Masks.
Using Avatar Masks
By using masking, you may remove some of the animation data from a clip, allowing it to only animate specific areas of an object or character instead of the entire thing. Let’s see this in action!
- Create an Avatar Mask by right-clicking in the same folder where you keep the character animations →Create → Avatar Mask
2. Click on the Override Track then drag and drop the mask into the Avatar Mask slot.
3. Select your Avatar Mask and open the “Humanoid” section. Here you can select individual body parts to exclude from the override. I selected the legs, and anything to do with lower body rotation and position changes — anything selected will not be overridden, meaning the behavior of these body parts will retain the animation in the Animation Track.
So now, the character executes the Victory animation while running.
I added one final victory pose in the Animation Track so that the running comes to a halt smoothly.
Finishing Touches
The confetti Particle Effects will be controlled by a second Timeline with an Activation Track. The first Timeline makes use of Control Track to activate the second Timeline as the character wins the race.
The final addition to the sequence is the “limping away” animation, this is added in the same way as the running animation.