## 2012年3月10日 星期六

### A Different Approach for Continuous Physics

"Motion" : physics engine of Ubisoft

Existing approach
linear convex cast
- occur : detecting this collision != handling it.

while(TOI found)
- move at earliest line of impact
- compute
- solve

costs lots of CPU

speculative contact points
:  ghost bug, stop the dynamic rigid body even if if it shouldn't.
: doesn't prevent tunneling issues
: can occur with rag doll

Robust:
: few solver
: handling variance frame rate
: handling fast rotating bodies

Our method:  broad phrase, narrow phrase, constraint creation, solver

: body's linear velocity  compute to the trajectory
detect the potential colliding bodies
- consider trajectory
- use the bodies AABB
Transfer volume and compute a segment intersection, add AABB to other AABB

Narrow phase:  Incremental manifold, provides one new contact point at each frame.
full manifold: provides all contact points in one frame
Distance -based full manifold: potential contact points in fill manifold
support shapes
- shapes should on all rigid bodies
- sphere
- capsule
- box

Distance-based full manifold with a sphere:  can use GJK

distance-based full manifold bw capsule and box: project capsule extremities on the box's plane.

If the capsule is in the Voronoi edge region , use GJK

distance-based full manifold bw a capsule and a triangle
- Generalizing three triangle

distance-based full manifold bw a box and a triangle
Use edges that face he reference plane
distance-based full manifold bw two convex

Handle potential and real contact points at the same time
- real contact points can generate fast rotation
- potential one avoid tunneling in same frame
- reuse geometry info.
-  maximum  cache size
Restituion
- potential contact points
-  at next frame the body reaches obstacle with reduce velocities
- do not use the current velocities
- use previous frame

Solver: with Gauss Seidal solver, each constraint changes the velocity of buddy

Limitation on the second impact

Handling server gasset bodies

Handling several fast bodies

Performance:  broad segment intersection with AABB
- more body pairs are

Continuous physics cost
- constraint create

CPU benchmark

memory cost
other : 14mb
continuous :150kb

- solver

Restitution handle correctly

Robust: no tunneling issue with fast rotate

limit:
- server fast bodies
- second impact