INF443 Amphi 5: Animation Descriptive
1.Introduction
- 为了得到动画,需要25-30帧/秒。
- 在关键帧之间插入不同的帧得到动画。
Animation Descriptive
- Interpoler automatiquement des images-clés.
- mouvement依旧受到animateur的控制[人为控制位置和朝向]
Modèles générateurs
- Le mouvement est engendré par une procédure.
2. Interpolation des positions
- Courbe spline 体现了物体重心的变化。
3. Interpolation d’orientation
因为一个物体的Orientation有多种表示方法,如
- Matrices de rotation
- Andles d’Euler
- Quaternions
所以有一个问题:应该用哪个Orientation来做Interpolation?
3.1 Matrice de rotation
用 Matrice orthonormale (
A
−
1
=
A
T
A^{-1}=A^T
A−1=AT)
如下面的矩阵就表示绕着x轴旋转
(
1
0
0
0
c
o
s
(
α
)
−
s
i
n
(
α
)
0
s
i
n
(
α
)
c
o
s
(
α
)
)
\begin{pmatrix} 1 & 0 & 0\\ 0 & cos(\alpha) & -sin(\alpha)\\ 0 & sin(\alpha) & cos(\alpha) \end{pmatrix}
⎝⎛1000cos(α)sin(α)0−sin(α)cos(α)⎠⎞
问题:
- 我们需要两两进行插值,但 θ A + ( 1 − θ ) A \theta A+(1-\theta)A θA+(1−θ)A得到的矩阵不一定是orthonormal的,因此需要利用如Méthode Gram-Schmidt的方法Reorthogonaliser再Renormaliser
- 因为比较费时间,所以平常一般不太用
3.2 Angles d’Euler
例如,我们可以取z-x’-z’’,第二次沿着第一次旋转之后得到的x’轴进行旋转。
优点:
- 我们只利用了3个角度(3个数字)来描述。
问题:
3.3 Quaternions
直觉:用一个Sphere上的点来表示。
- N是物体旋转轴的方向 ( N x , N y , N z ) (N_x,N_y,N_z) (Nx,Ny,Nz),模长为1。
q = ( c o s ( α / 2 ) , s i n ( α / 2 ) N x , s i n ( α / 2 ) N y , s i n ( α / 2 ) N z ) q=(cos(\alpha/2),sin(\alpha/2)N_x,sin(\alpha/2)N_y,sin(\alpha/2)N_z) q=(cos(α/2),sin(α/2)Nx,sin(α/2)Ny,sin(α/2)Nz)
在下图中我们可以看到如果采用Interpolation Linéaire + Projection会导致速度不均衡,因为此时在t=1/4和t=3/4之间,物体走过了大部分的距离。
鉴于Interpolation Linéaire + Projection会导致速度不均衡,我们采用Linéaire Sphérique的方式。
四元数有2部分组成: q = ( q r , q p ) , q r ∈ R , q p ∈ R 3 q=(q_r,q_p),q_r\in \mathbb{R},q_p \in \mathbb{R}^3 q=(qr,qp),qr∈R,qp∈R3
4. Animation de solides articulés
- Hiérarchie de repères
- Racine 在世界坐标系中
- Rotation relatives par rapport aux parents
- Rotations relatives par rapport aux parents
Coordonnées généralisées
C
(
t
)
=
(
x
0
,
y
0
,
z
0
,
q
0
,
⋯
,
α
i
,
⋯
)
C(t)=(x_0,y_0,z_0,q_0,\cdots,\alpha_i,\cdots)
C(t)=(x0,y0,z0,q0,⋯,αi,⋯)
方法:
- Donner des positions clés pour les coordonées
- 每一个Paramètre sera interpolé au cours du temps
问题:
当涉及两个物体相互接触的时候,问题变得麻烦了。
如以前的动画人物脚会打滑,因此在早期的动画中人的脚的部分是被模糊处理的。
Sol1: 逐帧调整
Sol2: Cinématique inverse
5. Interpolation des formes
Effets Disney
例子:人物压缩再冲刺再恢复正常
Method 1: Spline sur quelques paramètres
Method 2: Interpolation des formes clés définies au cours du temps
Method 3: Interpolation multi-cibles
用不同情绪进行叠加。