• 沒有找到結果。

Phase 1: Collision Avoidance and Alleviation

Chapter 5 Collision Detection and Response

5.1.1 Phase 1: Collision Avoidance and Alleviation

The main purpose of phase 1 is to partially avoid some collision and moreover prevent drastic collision before penetration. Usually a repulsive region around the cloth is used in this phase and repulsive force occurs while particles move within the region. A force-based repulsion method is very useful to prevent a number of particle collisions with moderate time interval and dedicate particle velocity. However, this kind of method can be over/under-reacted when objects collide with high speed.

Moreover, the force can not easily simulate an inelastic and smooth contact, for example, an interaction between rigid object and cloth.

The basic concept for the repulsion region is to assume that the object is covered

with a soft thick shell. When two objects move closer, the soft shell will produce a repulsive force to keep objects in distance. The repulsive force is usually modeled as a spring force. This is absolutely reasonable since the stiffness of this soft shell can tuned by spring constant Ks. That is, a high Ks id for a stiff shell and a low Ks is for a soft one. The elasticity can be tuned by spring constant while approaching and leaving such as kleavekapproach, while ε is 1 for perfect elastic collision and 0 for completely inelastic. For a continuous time domain case in real world, contact problem can illustrate as following Fig 5.1.

Figure 5.1: Collision sequences for real case.

In Fig 5.1(a), two particles start to move forward each other. Then approach and start to compress the spring in Fig 5.1(b) until two particles have the same velocity (system velocity) and spring is maximized compressed in Fig 5.1(c). Afterward, spring pushes two particles away in Fig 5.1(d)(e). However, this is a case in

over-pressed situation may occur as following Fig 5.2 shows

Figure 5.2: Problems for discrete time step

In the case in Fig 5.2(a), spring between particles is over compressed over a time interval. If the spring constant is high, the spring may produce a over-reacted response for each object. Or even, with an insufficient spring constant, particle may still collide to each other. These problems happen related to the time interval and the velocity of each object.

Force-based repulsion is usually used in simulation with dynamic deformable object like cloth and a static or pre-animated rigid object that the position and velocity cannot be changed by forces during simulation. However, the reaction is sensitive to time interval, spring constant and even the relative velocity of each particle.

Since force cannot completely avoid collision, this region can be used to avoid drastic collision. Drastic collision can be situations which objects approaches in high velocity or time interval is not small enough to prevent large penetration from happening. Large penetration may cause problems while resolving contact. One of the problems is shown in Fig 5.3 which the object completely moves though the cloths in the next time step. So rather than applying force, it is better directly using a simple

velocity constraint to alleviate collision. To simplify the velocity constraint, two assumptions are made in this thesis. First, a smooth collision between cloth and rigid body is completely inelastic. Second, mass of particles on cloth is much lesser than that of rigid body. These assumptions make sense in real cases and collision can be simplified as Fig 5.4.

Figure 5.3: Problem for drastic collision

Figure 5.4: Inelastic collision between objects with asymmetric mass

A rigid body (orange rectangle) collides into the repulsion region (blue circle

rigid object enters into the repulsion region of a particle, the velocity of the particle is modified closer to the system velocity when the rigid object moves nearer. System velocity can calculated as following formula.

⎟⎟ assumption. Therefore, the velocity of particle is constraint to the distance to rigid object and velocity of the contact point on rigid object when rigid object enters into the repulsion region.

Figure 5.5: Rigid object entered repulsion region of a particle

As figured in Fig 5.5, a rigid object with velocity of vr and angular velocity of ω enters the repulsion region of particle. And the closest point from particle to the rigid object is pc with distance of d. If we regard repulsive force as a spring, the post-velocity of particle is a function of d, vp, vr,

vp = f(d,vp,vr), (5.2) which can be derived from momentum conservation and energy conservation equation,

For a given a constant repulsion region radius R, spring constant k should be a function of vp and vr. Because it will be complicated and inefficient to solve v′ , we p simple formulate the velocity of the particle in an interpolation term,

vpvp +(1−α)vc (5.4)

while vc is the velocity of the contact point.

vc =vr +ω×(pcpr)

α is a function of distance d and the value is limited within 0 to 1, 0 for d=0 and 1 for d=R. It can be formulated as a linear function

R

= d

α , (5.5)

or a polynomial term

And the information pc and d of can be easily gained from distance map for the rigid object.

This method partially avoids collision, stabilizes the system and prevents drastic collision efficiently. Moreover, the effect is similar to air floating between cloth and rigid object and produces a visual plausible interaction. This method can apply for not only a dynamic rigid object but also an animated one such as a character.

相關文件