Games104 Modern Game Engine Study Notes 09

Animation Blending
to connect two animations

Math of blending: LERP: Linear interpolation.
Take keyframe interpolation between two animations.
Weight1+weight2 is equal to 1.
Insert image description here
Both animations must be cyclic. After normalization, they can be consistent with all animations in Insert image description here
the Blend Space
(clips) in the adopted space. , must maintain consistent cyclicity, either all loops or none.
Insert image description here
The distribution of sampling points in the mixed space is uneven. If a more delicate expression is needed somewhere, you can add a clip in the corresponding place
Insert image description here
instead of using all clips. According to the divided triangle. Interpolate between three adjacent vertices through the center of gravity coordinates.
Insert image description here
Some animations only apply to the upper body, and some animations only apply to the lower body. Such a free combination of various upper and lower body animated poses

Insert image description here
Only the change amount of the animation is stored, not the absolute amount. No matter how you change the skeleton, apply the delta based on the change.

Three types of blending:
Linear Lerp Blending: Whole body
Mask Blending: Partial
Additive Blending: After blending is completed, the difference amount of modification added

State machine:
Insert image description here
frozen mode will first stop animation 1, and then let animation 2 come in.
Insert image description here
Multi-layer state machine, different state machines control different parts of the model.
Insert image description here
Animation Blend Tree: Animation tree.
Insert image description here
Linear interpolation node: input weight
Insert image description here
animation individually for each clip. The core of the tree: defines control variables and exposes them to the gameplay system. (Such as speed, direction, whether under attack...)
Control variables will change the blending behavior of the animation tree

Control: 1. Various environmental parameters (speed, blood volume...) 2. Events. When an event occurs, some markers (private variables of the class) inside the animation tree will be modified (switching weapons).
Insert image description here
General animations pass the driver layer by layer from the root node to the previous layer.

Inverse dynamics: Inverse solution with constraints, such as a hand grasping a point.
End-effector: end effector.
Insert image description here
For example: when moving, you step on uneven ground with various bumps and ridges, and you want to keep your feet on the ground. There will be two Bones IK, the calf and thigh of the model, the two sides of the triangle are determined, the position of the target point to step on is determined, and the distance from the root node (the third side) can be calculated. Identify the only triangle. Calculate the angle of the thigh and calf.
Insert image description here
Finally, a reference vector is needed to determine the direction. Otherwise, the 360-degree rotation of the triangle is the correct solution.
Insert image description here
Different IK
Insert image description here
long chain IK has multiple solutions
Insert image description here
to determine whether the bone can reach the target point. 1: All bones are elongated, and the target is judged outward. 2: The longest bone is selected, and the rest are inward, and the target is judged inward. The
Insert image description here
range of activity of each bone is also limited.
Insert image description here
CCD algorithm
Insert image description here
CCD optimization
Insert image description here
Insert image description here
FABRIK
Insert image description here
Retarget
source character and target character, source Animation and target animation
bones correspond one to one.
Transfer the relative amount of bone change
. Translation and scaling change in proportion to the bone length.
Insert image description here

Guess you like

Origin blog.csdn.net/Mhypnos/article/details/130736262