For our last assignment in the Real-time Animation course we had to develop a complete interactive application with the goal of showcasing principles of animation based on Disney’s Twelve Basic Principles of Animation which is a set of principles introduced by the Disney animators Ollie Johnston and Frank Thomas in their 1981 book “The Illusion of Life: Disney Animation”.
Given my passion for Star Wars, I really wanted to base my work on the famous Lucas franchise. I made up a (very) small story, threw in a few characters and I put them in a nice Star Wars style environment. Luckily I found on the net several models I was able to use for my project.
The main stage is composed by a space station and two main characters: Darth Maul and the droids. The characters have been skinned using Blender and Rigify, a blender tool to create human armature. It took me a while to get confident skinning in Blender but eventually I was faster at rigging than at programming 😀
A different number of motion captures were applied on both models:
- Walk, Walk left, Walk Right, Run and Shoot
The sword movements of Darth Maul were obtained using manual key framing. The game has a 3rd person camera which follows the player and a free-fly one to explore the universe around. A very short story about Darth Maul is given at the start, in typical Star Wars style (but not as fancy). Initially the camera flies around the level using a predetermined spline path and eventually it goes toward the main scene zooming onto the main character.
Principles of Animation
The first three principles of animations used in the introduction, when the camera flies into the main scene, are staging, arc and ease-in/ease-out. If you want to know more about principles of animation please follow this link:
- Player’s attention is focused on the scene and on the main character.
- Camera follows a spline path, cubically interpolated.
- Ease-in Ease Out
- The cubic interpolation between points produces a slow-in/out effect while flying the camera around
The character is in the middle of a fight and must escape using the spaceship in the hangar, but he first needs to kill all the droids. Below the principles of animation used:
- Pose to pose
- Darth Maul and the droids are animated using manual key framing (for fighting) and BVHs (motion captures) for movement.
- Swinging the sword produces an arc path as well as the death animation of the drone.
- Follow Through
- Darth Maul’s animations are blended together. If he is running for example and it stops suddenly it will keep on walking and then he will stop smoothly.
- Ease in Ease out
- There is no cubic interpolation for characters’ animations. Although the formula I came up with gives a fading effect during transitions.
- Animation of droids’ death after they are hit.
- Secondary Action
- Droids get affected by the attack of Darth Maul which produces a fall on the ground
- I love Darth Maul!
- But I know this principle is arguable!
Droids have two animations. One for the upper body, which is for shooting, and another one for legs and feet which is for walking. Darth Maul has several animations, but they can be divided into two groups: walk and fight.
- Swinging sword
- Walk forward
- Walk left
- Walk right
Using a technique called blending is possible to create some sort of realistic animation using some of the existing ones listed above. Walk forward + walk left or right = Walk diagonal. This is not the best effect though, as the steps are not very well synchronized. Notwithstanding blocking and swinging the sword produce a nice and smooth animation effect because they are similar.
Finite State Machine Diagram
Below one of the two finite state machine used to animate the characters. Figure below shows the FSM diagram used for walking and running.
For fighting I implemented the FSM represented in the picture below. It is extremely simple but the number of animations available is limited to three.
For droids I have not implemented any state machines as there is no complex AI in the game that gives complex behavior to them.
- Blending Motions using Time Synchronization
- All the motions are linearly interpolated
- Time Synch obtained with a simple formula I came up with! It uses the ratio of the duration of the two animations. In this matter the time of the first animation is slowed down by a factor Δb. I did not have time to implement a proper time warping mechanism. Although this simple approach worked quite well even using linear interpolation.
- Droids shoot and walk. Two blend masks are applied for torso and for legs.
- Darth Maul has two blend masks as well. One for the upper-right body part, which are controlled to swing his sword, and another for his legs
- By using this approach I was able to blend different animation together and to create new ones based on the combination of the two.
- Complex/scripted camera motion
- Camera has two configurations: Third person and free fly. At the very beginning of the game it follows a spline path to introduce the game.
- When the game is introduced the camera is scripted to fly through a spline path using cubic interpolation