collision detection
play

Collision Detection Part 2. Narrow Phase Collision Detection The - PowerPoint PPT Presentation

Collision Detection Part 2. Narrow Phase Collision Detection The Narrow Phase Exact collision detection: Where precisely have objects touched, where to apply forces, torques? Collision Response The following is an equation for Rigid Body


  1. Collision Detection Part 2. Narrow Phase Collision Detection

  2. The Narrow Phase Exact collision detection: Where precisely have objects touched, where to apply forces, torques?

  3. Collision Response The following is an equation for Rigid Body Impulsive collision response (see Baraff et al, we will discuss in detail next week) Constants RB State variables Derived values Contact variables p is the contact point Associated with a See collision response notes for details. contact direction n

  4. Modelling Contact At point of contact two smooth surfaces will have coinciding tangent planes – plane of contact The normal of this plane is defined on each object is the contact normal The point on an each object that we need to apply the appropriate force is the point of collision

  5. Contact Manifolds We won’t always have one idealised point of collision Simulation often leads to more than just a point of contact – more like a surface or contact manifold

  6. Inexact contact p In ideal situations a single contact point usually where distance between objects is zero i.e. p = p A = p B In practice, the distance is slightly non zero due to numerical (floating point) imprecision and timestep limitations. Normally consider a collision envelope e +/- 10-7 or 10-15 We can take the mean of the closest points as the point of collision  p p  A B p 2

  7. Point of Contact Let us assume that we are usually dealing with polygonal models Contacts are represented in terms of features – one from each polyhedra A principal Contact a.k.a. Point of contact p is computed based on the closest points between the two colliding features On each of the features we want to evaluate a closest point to the colliding feature on the opposite object

  8. Types of contact Three features V, E, F (vertex, edge face) leads to six types of contacts V-V, V-E, V-F, E-E, E-F, F-F N.B. Unique contact point is not always defined

  9. Closest Points Determination V-V Collision Take vertices as closest points Q: What is the collision plane/normal?

  10. Closest Points Determination V-E Collision Project V onto edge E Say E defined as start point o and direction u (a normal vector)     p E o ((v o) u)u If projection is outside the endpoints, then take closest endpoint of E

  11. Closest Points Determination V-F Collision Project V onto edge F Say F defined as normal n and arbitrary point f on face, then     p F v ((v f) n)n If projection is outside the polygon, then use VE case to find closest point

  12. Closest Points Determination E-E Collision For E 1 defined as start point o 1 and direction u 1 and E 2 defined as start point o 2 and direction u 2      ( ) ( k )  u  o o u u     where k 2 1 1 2 1 u p o u 2  E 1 1   2 1 1 k p E 2 determined as in V-E case ( p E 1 - E 2 )

  13. Quick Aside: Proof of E-E case Assume we know closest point p E 1 and p E 2 Then they would have to satisfy Similar to V-E case Substituting gives Or  u  where k 1 u 2

  14. Closest Points Determination Remaining cases can be solved by decomposing into a set of the previously defined cases E-F Collision: If O and D are endpoints of E and boundary edges of F are given by { E0, E1, E2... }       ( E F ) {( O F ), ( D F ), ( E E ), ( E E ), ...} Then 0 1 F-F Collision:     1 1 1 2 2 2 E , E , E , ... E , E , E , ... If boundary edges of F1 are given by and F2 given by 0 1 2 0 1 2       1 1 2 2 ( F F ) {( E F ), ( E F ), ... , ( E F ), ( E F ), ...} Then 1 2 0 2 1 2 0 1 1 1 In fact only three cases are really required : (V-E), (E-E), (V-F) Exercise: Why?

  15. Contact Regions Intersection of two objects For polyhedra, this is a polygonal area consisting of: Single points Line segments or Closed polygons (possibly with holes if non-convex)

  16. Contact Formation We should be able to represent the contact region by the vertices of the intersecting polygonal regions

  17. Contact Regions Concave objects

  18. Contact Normal In real-life we expect a common contact plane and normal This is not always the case with polyhedral objects (normal not defined on an infinitesimal point) Solution: Choose normal of feature with higher dimension or if the same then pick a random one of the two Take a line between closest points Average Possible stability issues

  19. Applying the Contact Model Now that we have a contact region what do we do with it? -> Ready for collision response Net or component forces can be calculated based on the contact manifold

  20. Multiple contacts Suggestions Use net force (possibly ok for convex-only collisions) Use earliest impact Integrate force over collision manifold Solve simultaneous contacts (e.g. LCP)

  21. Contact Tracking Mirtich , B. “Rigid Body Contact: Collision Detection to Force Computation”. MERl TR-98-01. 1998 Back-tracking time control Track closest features, determine closest points – apply forces If interpenetrating – indicates missing contact point Identify potential contact features – backtrack till they are disjoint and add these to contact formulation CF

  22. Narrow Phase Optimisation

  23. Narrow Phase Key Types Techniques: Bounding Volume Hierarchies + Spatial Partitioning Feature-based Simplex-based Volume-based

  24. Contact Levels of Detail Otaduy & Lin Siggraph 2003 For haptic rendering requirement of >kHz framerates Hierarchical multiresolution based on filtered edge collapse perception of geometric features depends on ratio between contact area and feature – not absolute size of the feature

  25. Contact Levels of Detail Similar to Multiresolution for display Simplification must preserver local convexity

  26. Contact Manifolds Pauly et al: Quasi-rigid objects in contact, SCA 2004 Contact model is essentially Inside-outside test with Point cloud representation of object Also store degree of penetration -> deformation requires some measure of this

  27. Contact Manifolds Galoppo et al, SCA 2006: Dynamic Deformation Textures GPU extraction of contact manifold for deformable objects

  28. Volumetric Models & BVH

  29. Volumetric Models Some Problems (particularly in non-regular BVH) Ok case Bad case Solution: cache normals on BV node related to the underlying geometry

  30. CULLIDE Set up a potentially colliding set (PCS) of objects or sub-objects S Object O is are removed from PCS if it is not fully visible with respect to S Govindaraju et. al. “CULLIDE: Interactive Collision Detection Between Complex Models in Large Environments using Graphics Hardware”, Graphics Hardware 2003

  31. Feature-based Algorithms Lin-Canny V-Clip Basic Principles Based on features: vertex (V), edge(E), face(F) Closest Features Tracking Proximity Query Based on Voronoi Regions

  32. Lin-Canny Pairwise Collision Detection for Convex Polytopes Tracks closest points between pairs of convex polytopes Gives closest features even if objects do not intersect References: Ming C. Lin. “ Efficient Collision Detection for Animation and Robotics ”. PhD thesis, University of California, Berkeley, December 1993. Available as I-COLLIDE (along with a dimension reduction broad-phase and methods for managing hierarchies of convex objects)

  33. Closest Features • Find the shortest distance between two convex objects by first finding the closest features • Based on the following theorem: – Let A and B be two convex polyhedra and let P be a feature from A and Q be a feature from B. – Now let the points p Є P and q Є Q be the closest points between P and Q. – If p belongs to the voronoi region of Q and q belongs to the voronoi region of P then no other points from A and B lie closer to each other than p and q. – In which case we say that P and Q are the closest features between A and B.

  34. Voronoi Regions Vert 2 A Voronoi region, associated with each feature of an object, is the set of points that are Edge 2 closer to that feature than any Edge 1 other Face http://www.personal.kent.edu/ Vert 1 Vert 3 Edge 3 ~rmuhamma/Compgeometry/ MyCG/CG- Applets/VoroDiagram/vorocli.ht m Feature Voronoi region examples (2D Case)

  35. Voronoi Regions

  36. Voronoi Regions of 3D Features A convex 3D object Vertex Edge Face Regions are bounded by planes in 3D

  37. Lin-Canny Iterative procedure: Start with previous closest features (exploit coherence) Test each feature against other ’ s Voronoi region If an error, walk to neighboring feature and repeat (Greedy Search: locally optimal solution) Voronoi regions are built as a pre-process, but this is not an expensive task, so could be done in real time

  38. Lin-Canny Voronoi regions and closest point Find the closest point by finding out which Voronoi region the test point lies in Closest features algorithm finds the shortest distance between two convex objects by first finding the closest features The objects must be convex for the closest point to be uniquely defined Convexity also makes greedy search sure to succeed Closest features may be vertex-vertex, vertex-edge, vertex-face, edge-edge; other cases are degenerate

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend