Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
zhehaoli1999 committed May 18, 2024
1 parent af3a1f0 commit 70a8a5a
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 10 deletions.
44 changes: 34 additions & 10 deletions Homeworks/10_character_animation/documents/README-part2.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,50 @@
# Part 2: 骨骼动画 + 布料仿真

在这一部分,我们将尝试结合HW10和HW8,实现一个如下的裙子随着人体一起运动的结果
在这一部分,我们将尝试结合基于数据方法的骨骼动画技术(本次作业)和基于物理的仿真技术(HW8 弹簧质点仿真),实现裙子随着人体一起运动并尝试考虑简单的碰撞处理。

<div align="center">
<img src="../images/girl-with-cloth-intersect.gif" style="zoom:70%" />
</div>
本部分为HW10选做内容。

## 1. 布料与物体的连接

在HW8中,我们为布料设置了静止不动的Dirichlet边界点(固定点),为了让布料跟随被骨骼驱动的蒙皮运动,我们可以直接让这些边界点跟随蒙皮上的一些控制点一起运动。

为此,我们可以通过Blender中的“顶点组”功能,分别在蒙皮上与布料上指定一些控制顶点,然后在每个时间步读取这些控制点并控制它们的位置相同(具体实现可见[`node_mass_spring_with_control_points.cpp`](../../../Framework3D/source/nodes/nodes/geometry/node_mass_spring_with_control_points.cpp)

那么一个简单的示例如下,我们可以在Arm模型上附着一个布料,并使用HW8我们已经实现的弹簧质点系统仿真这个布料,新增的节点为[`Mass Spring with Control Points`](../../../Framework3D/source/nodes/nodes/geometry/node_mass_spring_with_control_points.cpp)

<div align="center">
<img src="../images/arm-with-cloth.gif" style="zoom:70%" />
</div>

在Blender中编辑顶点组。
运行上图的节点图已经提供在了[`../data/GeoNodeSystem-arm-with-cloth.json`](../data/GeoNodeSystem-arm-with-cloth.json) (替换可执行文件`engine_test.exe`所在文件夹的`GeoNodeSystem.json`)。


<div align="center">
<img src="../images/node-arm-with-cloth.png" style="zoom:70%" />
</div>



## 2. 布料与人体碰撞的处理

`init_dirichlet_bc_vertices_control_pair`
布料与人体上指定的控制点如下所示:

<div align="center">
<img src="../images/skirt-fixed-points.png" style="zoom:40%" />
</div>

## 2. 布料自碰撞 & 布料与人体碰撞的处理
<div align="center">
<img src="../images/girl-fixed-points.png" style="zoom:40%" />
</div>

布料自碰撞可以参考HW8的优秀作业分享。

为了处理布料与人体的碰撞,一种简单的做法是为人体创建一些由简单几何体组合而成的简化模型(proxy model) 用于进行碰撞检测与处理,如下图所示。

<div align="center">
<img src="../images/collider.png" style="zoom:40%" />
</div>

在本次作业中,你可以通过girl模型上的固定点大致计算模型腰部所在位置,假设在该位置存在一个球体,然后通过HW8中的选做内容-布料与球体的碰撞来进行一个简单的碰撞处理。

## 3. 提供的初始结果

Expand All @@ -35,10 +57,12 @@
需要连接的节点图为(已经提供在了[`../data/GeoNodeSystem-girl-with-skirt.json`](../data/GeoNodeSystem-girl-with-skirt.json)):

<div align="center">
<img src="../images/node2.png" style="zoom:70%" />
<img src="../images/node-girl-with-skirt.png" style="zoom:70%" />
</div>

可以自行实现第2节中介绍的布料自碰撞处理方法 & 布料与人体碰撞的处理方法。并在报告中介绍你采取的方法以及处理前后的结果对比动图/视频。
可以自行实现上文介绍的布料与人体碰撞的处理方法,甚至进一步考虑布料自碰撞的处理。

**请在报告中介绍你采取的方法以及处理前后的结果对比动图/视频。**

## 参考资料
[GAMES103]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 70a8a5a

Please sign in to comment.