Processing math: 100%

P27

Interior Point Methods and Impact Zone Optimization

✅ 发现碰撞的pairs后如何处理。

P28

Two Continuous Collision Response Approaches

✅ 这是两个大的套路,不是具体的方法。

Given the calculated next state x[1], we want to update it into ˉx[1], such that the path from x[0] to ˉx[1] is intersection-free.

内点法:

内点法Impact Zone 法
✅ 蓝色区域为安全区域
✅ 从x[0]出来,朝x[1]走,并永远保证只在安全区域走,直到不能走为止。✅ 从x[1]出发,反复优化结果(投影),直到回到安全区域为止。
优点Always succeedFast.
1. Close to solution.
2. Only vertices in collision (impact zones).
3. Can take large step sizes.
✅ Impact Zone:x[1]通常离安全区域不太远,且优化时只针对 Impact Zone 优化,因此快。
局限性Slow.
1. Far from solution.
2. All of the vertices.
3. Cautiously by small step sizes.
May not succeed.✅ 内点:为保证每一步安全,步长不能太大,因此慢、哪怕ˉx[1]最终没有到最佳位置,但能保证一定在安全区域,因此一定成功。x[0]x[1]可能比较远,也导致慢。
✅ 内点法慢的原因2没有解释。

P30

Log-Barrier Interior Point Methods

算法过程

For simplicity, let’s consider the Log-barrier repulsion between two vertices.

E(x)=ρ log||xij||

fi(x)=iE=ρxij||xij||2fj(x)=jE=ρxij||xij||2

✅ 用 Log 定义能量、前面某一节课讲过。距离 → 能量 → 斥力

✅ 不需要互斥力一直存在,因此做了一个截断(IPC)

P31

算法实现

We can then formulate the problem as:

ˉx[1]argminx(12||xx[1]||2ρlog||xij||)

✅ 优化目标:点的位置与目标位置(穿模)尽量接近,然后优化。

Gradient Descent:

x(0)x[0]
For k=0K
x(k+1)x(k)+α(x[1]x(k)+ρxij||xij||2) ˉx[1]x(k+1)

The step size α must be adjusted to ensure that no collision happens on the way. To find α, we need collision tests.

✅ 绿色是来自x[1]的引力,黄色是来自边界的斥力、关键是步长α, 每走一小步都需要反复的碰撞检测。

P32

Impact Zone Optimization

The goal of impact zone optimization is to optimize x[1] until it becomes intersection-free. (This potentially suffers from the tunneling issue, but it’s uncommon.)

ˉx[1]argminx12||ˉxx[1]||2

such that{C(x)=(x3b0x0b1x1b2x1)N0 For each detected vertex-triangle pair C(x)=(b2x2+b3x3b0x0b1x1)N0 For each detected edge-edge pair 

✅ 利用 constrain(不是能量)转化成优化问题,具体没讲。

P33

Geometric Impulse

The goal of impact zone optimization is to optimize x[1] until it becomes intersection-free. (This potentially suffers from the tunneling issue, but it’s uncommon.)

Every pair gives new positions to the involved vertices. We can combine them together in a Jacobi, or Gauss-Seidel fashion, just like position-based dynamics.

P34

After-Class Reading (Cont.)

Bridson et al. 2002. Robust Treatment of Collisions, Contact and Friction for Cloth Animation. TOG (SIGGRAPH).

Relative simple explicit integration of cloth dynamics

P35

Augmented Lagrangian

ˉx[1]argminx12||xx[1]||2

such that{C(x)=(x3b0x0b1x1b2x1)N0 For each detected vertex-triangle pair C(x)=(b2x2+b3x3b0x0b1x1)N0 For each detected edge-edge pair 

P36

Augmented Lagrangian

We can then convert it into an unconstrained form:

ˉx[1]argminx,λ(12||xx[1]||2+ρ2||max(˜C(x))||212ρ||λ||2)

˜C(x)=max(C(x)+λ/ρ)

Augmented Lagrangian:

x(0)x[0]
λ0
For k=0K
x(k+1)x(k)α(12||xx[1]||2+ρ2||max(˜C(x))||212ρ||λ||2)
λρ˜C(x)
ˉx[1]x(k+1)

Tang et al. 2018. I-Cloth: Incremental Collision Handling for GPU-Based Interactive Cloth Simulation. TOG. (SIGGRAPH Asia)

P37

About Impact Zone Optimization

  • Fast per iteration

    • Only have to deal with vertices in collision.
  • Convergence sensitive to ||x[0]x[1]||2, or the time step t

    • Can take many iterations to, or never achieve intersection-free.
    • Easy solution is to reduce t, but that increases total costs.

P38

Rigid Impact Zones

The rigid impact zone method simply freezes vertices in collision from moving in their pre-collision state. It’s simple and safe, but has noticeable artifacts.

✅ 检测到碰撞,则把这个区域退回到上一帧。

P39

A Practical System

✅ 有碰撞,先做 Impact Zone. 因为这个快、不能解决再用后面方法、计算量不允许则选择 Rigid Impact.


本文出自CaterpillarStudyGroup,转载请注明出处。

https://caterpillarstudygroup.github.io/GAMES103_mdbook/