(模拟)Collision, Contact and Friction for Cloth Animation
本文禁止转载
B站:Heskey0
Robust Treatment of Collision, Contact and Friction for Cloth Animation (2002 Stanford)
rest contact: 慢慢接触
high speed impact: 高速碰撞
triangle corners: 三角形的角
barycentric coordinate: 重心坐标
1. Abstract
刚体,柔体和布料碰撞的难度:
- rigid body simulations often have relatively few collisions per object (apart from resting contact)
- deformable bodies naturally give rise to large numbers of collisions varying in strength from resting contact to high speed impact.
- Two-dimensional manifolds like cloth are the worst case.
Paper Overview:
-
This paper presents a collision handling algorithm that works with any method for simulating the internal dynamics. The key idea is to combine a fail-safe geometric collision method with a fast (non-stiff) repulsion force method that models cloth thickness as well as both static and kinetic friction.
-
Since our repulsion forces handle most of the self-interaction, it is desirable to make them computationally efficient to apply. Therefore we propose using a repulsion spring model that is not stiff.
A key ingredient of our new algorithm is that we do not work directly with positions but only obtain positions by integrating velocities. Thus, given a current non-interfering state for our cloth, the collision handling problem can be reduced to finding velocities that guarantee a non-interfering state at the end of the time step.
2. Cloth Model
For the purposes of demonstrating our collision handling, we use a simple mass-spring model for the internal cloth dynamics
3. Limiting the Strain and Strain Rate
Limiting the Strain:
- A rule of thumb in computational mechanics is that a triangle edge should not change length by more than 10% in a single time step.
Limit的方法:we adjust velocities instead of positions.
- At each time step, we calculate the candidate new spring lengths using the current velocities.
- Then we apply momentum-conserving corrective impulses to the velocities to ensure that all springs are deformed by a maximum of 10% from their rest length at the end of the time step (ignoring bending springs)
- These impulses influence the future strains of surrounding springs, and thus an iterative procedure is needed to guarantee that no spring deforms to over 10% of its rest length during the time step. (类似PBD中约束投影步骤的iteration)
- 迭代法的Trade-off:
- We apply this deformation limiting procedure using a Jacobi iterative approach. (for efficiency: parallel)
- We use a Gauss-Seidel iterative approach. (for accuracy)
4. Time Discretization
We cleanly separate the time evolution of the internal cloth dynamics (and the environment around the cloth) from the collision processing algorithm.
5. Proximity and Collision Detection
怎样做Collision Detection
AABB:
- To accelerate the detection of proximities for repulsions and of intersections for collisions, we use an axis-aligned bounding box hierarchy.
- The AABB hierarchy is built bottom-up once at the beginning of the simulation.
- At each time step, we calculate the axis-aligned boxes for the repulsion calculation by taking a box around each triangle enlarged by the thickness of the cloth, and then taking the union of the extents in each axis direction as we move up the hierarchy. (discussed in section 6.2)
- We also recalculate the hierarchy for each iteration of the collision algorithm. (section 6.4)
下文中:.
point-triangle Collision Detection:
-
To check if a point is closer than some thickness h to a triangle with normal , we first check if the point is close to the plane containing the triangle: . If so, we project the point onto the plane and compute the barycentric coordinates with respect to the triangle:
-
These are the normal equations for the least-squares problem of finding the point (in the plane) closest to . If the barycentric coordinates are all within the interval where is divided by a characteristic length of the triangle, the point is close.
edge-edge Collision Detection:
-
To check if an edge is close to another edge , we find the pair of points, one on each edge, that are closest and check their distance. The search for the two closest points begins by checking for the degenerate case of parallel edges, i.e. if is smaller than a round-off tolerance. If so, it reduces to a simple one-dimensional problem. Otherwise, we find the points on the infinite lines that are closest via the normal equations:
-
We also save their relative positions along the edges, i.e. the weights so that the points are and .
6. Contact and Collision Response
6.1 Interpolating within the cloth
怎样将冲量施加到点
To compute the velocity of a point interior to a triangle or edge we use linear interpolation
- triangle : 使用该点的barycentric coordinate 做插值计算velocity
- edge : 使用 作插值公式计算velocity( 为点在edge中的位置)
If an impulse of magnitude in direction needs to be applied to two points in the cloth
-
we instead apply impulses to the triangle corners or edge endpoints
-
For the point-triangle case:
- the adjusted impulses: (assuming all nodes have mass )
- the adjusted impulses: (assuming all nodes have mass )
-
For the edge-edge case:
- the adjusted impulses:
- the adjusted impulses:
6.2 Repulsions
上一个subsection中 的形式是什么?
If a pair is close enough, then two kinds of repulsion forces are applied:
-
an inelastic collision based force.
- apply an inelastic impulse of magnitude in the normal direction
-
a spring based force.
-
modeled with a spring of stiffness .
-
giving a spring force of in the direction . Multiplying by gives the impulse.
-
we limit this so that the relative velocity change will reduce the overlap by at most some fixed fraction (e.g. .1h) in one time step . If the normal component of relative velocity already we apply no repulsion, otherwise we compute the impulse magnitude:
-
we incorporate a completely inelastic collision into our repulsion force
6.3 Frictions
We use Coulomb’s model for friction, both static and kinetic, with a single friction parameter .
Notation:
- the pre-friction relative tangential velocity: .
- normal force (pressure): .
- friction force: .
- impulse of friction force: .
- change in the relative tangential velocity velocity: .
- If this is larger than , then either the cloth was slipping and stopped due to kinetic friction,
the final tangential velocity:
We apply impulses to achieve this for both point-face proximities and edge-edge proximities
6.4 Geometric Collisions
Continuous collision handling: For robust collision handling, the path of the cloth between time steps must be considered.
the next subsection for more details.
6.5 Rigid Impact Zone
[Provot 1997]Collision and self-collision handling in cloth model dedicated to design garment:
- proposed collecting the nodes involved in multiple collisions into “impact zones” which are treated as rigid bodies.
Notation:
-
Center of Mass (质心):
-
-
Its average velocity:
-
-
-
angular momentum (角动量):
-
-
inertia tensor: (using to represent the identity tensor)
-
-
the rigid body angular velocity (角速度):
-
-
the fixed and rotating components of the position:
-
the final position:
the new average velocity:
6.6 Updating the Final Velocity
见[Baraff 1998]Large step in cloth Simulation
7. Post-Processing with Subdivision
Sharp folds and wrinkles in the cloth mesh give undesirable angular features when rendered as plain triangles
这里不做展开
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南