Games104 Introduction to modern game engines - based on the animation technology of lecture8 game engines
- 1 History of animation
- 2 History of game engine animation
- 3 challenge in game Animation
- 4 Basics of Animation Techniques
-
- 1 2D animation
- 2 3D animation
- 3 Realization of skinning (important)
-
- 1 How to create a mesh
- 2 different spaces
- 3 Creation of bones
- 4 Math of 3D rotation
- 5 Joint Pose - Orientation
- 6 Joint Pose - Positon;
- 7 Joint Pose - Scale
- 8 Joint Pose - Affine Matrix
- 9 Joint Pose -Local Space to Model space
- 10 Joint Pose Interpolation - local space Vs Model space
- 11 Joint Skinning Matirix
- 4 animation pipeline
- 5 animation compression
- 5 Animation DDC
- 5 videos
1 History of animation
The image remains on our retina for 1/24s.
Diorama
Game animation is based on the film industry. Constantly approaching the effect of offline rendering.
Zafari is the first animation made by a game engine.
The basis of animation: it is made by frame by frame. Then use the capture system to do it again.
2 History of game engine animation
Doom is actually made in 2D. It is the originator of game animation.
3 challenge in game Animation
1 interaction
2 real time
Can't figure it out,
the animation data is large
, and the animation compression solves this problem.
3 true
Emoticons are hard.
4 Basics of Animation Techniques
1 2D animation
animation sequence frames.
2 3D animation
1 DoF
6DOF: translation of xyz, rotation of xyz
Make a tree structure for each joint of the character.
2 Vertex animation: write down the position of the vertices of each frame.
Vertex animation:
When the rigid body skeleton is moving, the skin is also moving. It is because each vertex is moving multiple bones.
Cloth simulation is the hardest part of animation.
To create an animation:
3 Realization of skinning (important)
1 How to create a mesh
2 different spaces
world space:
Model space: my own coordinate system
Local space: local coordinate system, the coordinate system of each bone is different, a certain coordinate system in the animation system is calculated from the coordinate system of other bones. Only by calculating its model coordinate system from the root node through local space can it calculate its world coordinate system and then render.
The relationship between the model coordinate system and the world coordinate system
3 Creation of bones
Unified a bone structure
Stored shutdown data
Added some weird bones. Many props are added to the skeleton.
Root Joint: Very important. express his position.
Bind point: Binding animation.
T-pose:
Now use A-pose
bone pose
4 Math of 3D rotation
1 2D rotation
2 3D rotation
Rotate around each axis in turn.
1 Euler angles:
It is often used when editing or placing objects, but Euler angles cannot be used when animating.
The problem with Euler angles: the advantage is that it conforms to human perception
(1) Strict order dependence: the order is different, and the results he calculates are different.
(2) Universal joint: universal lock
Integrating its upward direction along the time axis with its velocity, its trajectory can be calculated.
(3) Difficult
to interpolate (4) Difficult to superimpose rotations
(5) Difficult to rotate along a fixed axis.
2 quaternions
It works in three-dimensional space.
The definition of quaternion is as follows:
the formula for converting Euler angle into quaternion is as follows:
The calculation of quaternion and matrix is very similar;
Convert quaternion to rotation matrix:
The reverse rotation formula, rotation superposition, and the quaternion formula for rotating one vector to another vector are as follows: The
rotation formula for a given axis is as follows:
5 Joint Pose - Orientation
The expression of rotation is the core of animation
6 Joint Pose - Positon;
7 Joint Pose - Scale
8 Joint Pose - Affine Matrix
This matrix is important for Africa.
9 Joint Pose -Local Space to Model space
10 Joint Pose Interpolation - local space Vs Model space
11 Joint Skinning Matirix
animation matrix.
There is an identity: the joint moves, and the relative relationship between any point on the skin and the joint does not change.
This formula is very important.
Find the inverse of the matrix in advance and store it.
Vertex interpolation must be done in model space: (below) do not do it in local space.
Displacement and Scale Interpolation
Rotational interpolation is hard and must be done with quaternions.
Interpolation of the shortest path.
The problem with this is: the speed is not uniform, it starts fast, then slow, and finally fast again, the animation looks unnatural.
If the two angles are small, use NLERP, and if the two angles are large, use SLERP.
4 animation pipeline
5 animation compression
The amount of data is large,
Scaling and displacement are constant, mostly rotation is changing.
1 storage with fewer degrees of freedom
2 keyframes
Always ensure that your error is less than your threshold
CatMull curve
Very smooth, approaching bit by bit.
3 floats
A quaternion has 6 bites. Compressed by 60%.
4 Problems caused by compression
will make this compression error propagate until the error is large.
Different bones have different sensitivity to error.
The quality of visual error
compression is an important research area
error compensation.
The data will definitely be compressed, but there will be some visual errors
5 Animation DDC