Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
zhehaoli1999 authored May 16, 2024
1 parent b0165ca commit 5b03060
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Homeworks/10_character_animation/documents/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,11 @@ void JointTree::compute_world_transforms_for_each_joint()
最后,mesh顶点位置的更新公式如下:

$$
\~{\mathbf{x}} = \sum_i w_i \mathbf{T}_i * \mathbf{B}_i^{-1} \~{\mathbf{x}}^0
\~{\mathbf{x}} = \sum_i^n w_i \mathbf{T}_i * \mathbf{B}_i^{-1} \~{\mathbf{x}}^0
$$

其中 $\mathbf{T}_i$ 和 $\mathbf{B}_i$ 分别为第 $i$ 个关节的 `worldTransform``bindTransform`,
$n$ 为对顶点 $\mathbf{x}$ 产生影响的关节数 (需要通过`jointIndices`的长度除以顶点数得到)

$\~{\mathbf{x}} = [\vec{\mathbf{x}}, 1] \in \mathbb{R}^{4 \times 1}$ , 可以使用`GfMatrix4f::TransformAffine` 函数实现。

Expand Down Expand Up @@ -135,4 +136,4 @@ void Animator::update_mesh_vertices()

## 参考资料 & 扩展阅读材料
1. [GAMES 105:计算机角色动画基础](https://games-105.github.io/)
2. [Game Engine Blog: How I Implemented Skeletal Animation](https://vladh.net/game-engine-skeletal-animation/)
2. [Game Engine Blog: How I Implemented Skeletal Animation](https://vladh.net/game-engine-skeletal-animation/)

0 comments on commit 5b03060

Please sign in to comment.