Lecture 008

Basic Animation Technology

2D Animation

Ancient animations are expressed by series of frames

Ancient animations are expressed by series of frames

Doom achieves fake 3D using animations from different view points

Doom achieves fake 3D using animations from different view points

Particle system in modern game engine is also consists of sprite playback.

Live2D

Live2D

Live2D

Live2D

Early 3D Animation

Rigid Hierarchy Animation

Rigid Hierarchy Animation

Vertex Animation

Vertex Animation

Vertex Animation

Vertex animation is done by storing translation and rotation "texture" (Vertex Animation Texture or VAT) each frame for every vertex.

Complex Animation using VAT

Complex Animation using VAT

In a VAT, each row is a frame and each column is the animation for a specific vertex. The method is most flexible for complex morphing but requires massive data.

Morph Target Animation

Morph Target Animation is a special kind of vertex animation that interpolates between frames (key frame LERP).

3D Skinned Animation

We need a water tight animation for expressing bonned structure like animals.

The same logic hold for 2D skinned animation.

In animation, we often think about 3 spaces

In animation, we often think about 3 spaces

For easy-reuse of animation, we developed some standard skeleton hierarchy

Standard Skeleton Hierarchy

Standard Skeleton Hierarchy

Joint: has 6 degree of freedom (or sometimes 9 with inclusion of zoom and scale in 3 direction)

Use of Position in Joint

Use of Position in Joint

Use of Scale in Joints

Use of Scale in Joints

Bones: in between two joints

Mount Joint

Mount Joint

In real game development, artists need to define normal joints for humanoid characters. For specific characters, facial or wings might have more joints, but still compatible with basic humanoid definition.

Additional joints are used to attach vehicles and weapons.

Where to put root joint for humanoid?

Where to put root joint for humanoid?

There are two joints that is essential:

root joint for horse

root joint for horse

T-pose vs. A-pose

T-pose vs. A-pose

When artists bind model and bones, they often use a standard "zero-point" pose. Traditionally we use "T" pose. However, "T" pose is rather unnatural and will result lower precision in most standing position. "A" pose is commonly used for better precision in production.

Rotation Representation

Rotation in Euler Angle

Rotation in Euler Angle

Rotation in Euler Angle has many problems:

Gimbal lock can be useful in camera stabilization and gyroscope for localization by integrating over gyroscope output.

Group Theory (SO3) proved that Quaternion will work only in 3D rotation.

Rotation Math by Quaternion

Rotation Math by Quaternion

Affine

Affine

Unlike screen projection, affine transformation has always 0s in the last row because we do not need projection.

We store transformation matrix in local space as it is natural for linear interpolation.

Linear Interpolation in local space vs model space

Linear Interpolation in local space vs model space

Skinning Matrix

Skinning Matrix

Skinning Matrix

Apply Skinning Matrix

Apply Skinning Matrix

Skinning Matrix: a transformation matrix from

In animation, we interpolate the transformation from father vertext to current animated vertex. In binding, we store the same transformation. Therefore, to calculate a frame, we need to first know the product of all transmation from the root to leaf, then apply inverse transformation of binding matrix, then apply inputting matrix that is the result of interpolation. We combine the inverse of binding matrix and the large matrix product into skinning matrix for easier calculation. Every vertex is associated with one sinning matrix. (Often the calculation also involves world position matrix)

This allow us to avoid calculation for every mesh vertex since we have way less joints than mesh vertex in one animation frame.

Weighted Skinning with Multi-joints

Weighted Skinning with Multi-joints

A mesh vertex can follow and joints with some percentage. The interpolation should be in the model space (not local space).

Some AI-based method can generate skinning for artists, although not perfect.

Rotation Interpolation with NLERP

Rotation Interpolation with NLERP

We can also do interpolation between frames. Linear interpolation is enough for scale and translation. But we need to do normalized lerp (NLERP) for rotation.

Shortest Path for Quaternion Interpolation

Shortest Path for Quaternion Interpolation

Since Quaternion Interpolation can be achieved in 2 ways, we need to pick the shortest path.

SLERP: Uniform Quaternion Rotation Interpolation. This fixes the speed in which rotation should interpolate.

SLERP: Uniform Quaternion Rotation Interpolation. This fixes the speed in which rotation should interpolate.

In practice:

Runtime Pipeline for Animation

Runtime Pipeline for Animation

Compressing Animation

Note that Animation Happen More in Rotation Track

Note that Animation Happen More in Rotation Track

Most Joints Have Nearly No Rotation

Most Joints Have Nearly No Rotation

Reducing Animation Size:

Keyframe Removal

Keyframe Removal

Keyframe Removal: removes keyframe that could be accurately represented by some sort of interpolation.

Catmull-Rome Spline: Knowing P0, P1, P2, P3 will result a good smooth curve from P1 to P2

Catmull-Rome Spline: Knowing P0, P1, P2, P3 will result a good smooth curve from P1 to P2

Offline Catmull-Rome Spline for Signal Fitting Process

Offline Catmull-Rome Spline for Signal Fitting Process

Quaternion Quantization

Quaternion Quantization

Float Quantization: You can further compress quaternion matrix. One property of quaternion matrix is that if the largest component is 1, then all other components must be in the range of [-\frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}}]. This means that we can use 2 bits to store the position of the largest component, and then normalize all other components for better floating point precision.

Why Precision is Important: Error Proprogate Through Joints

Why Precision is Important: Error Proprogate Through Joints

Simple Error Calculation: we only care about joints

Visual Error Calculation: we care about vertices that are attached on joints. But since computation is too hard, we make fake vertices to estimate error.

Measuring Visual Error

Measuring Visual Error

Error Compensation: one intuitive way is adjust the orientation of child vertex to compensate for error in parent vertex. However, this will result high frequency signal and shakes in child vertex.

Physics-based Animation

Use case:

Animation Content Creation

Two methods:

Advanced Animation Technology

Table of Content