![Page 2: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/2.jpg)
Differences in Deformable Models
• Collision and self-collisions– Self collisions are often neglected for rigid
bodies
• Preprocessing– Data structure need to be updated frequently
• Performance– Efficiency is very important
![Page 3: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/3.jpg)
Hybrid Approach [LAM01]
• Goal: adapt BVHs to handle deformable models efficiently
• Some modification in building and updating the tree– Efficiency of updating hierarchies is more imp
ortant than the tightness of BVs• AABBs are preferred
![Page 4: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/4.jpg)
Hybrid Approach [LAM01]
• For a bottom-up update strategy using AABBs [vdB97], 8-ary tree version is 10 to 20 percent faster than binary version– Fewer nodes need to be updated (if using top-
down approach)– Recursion depth during collision tests is lower
![Page 5: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/5.jpg)
Hybrid Approach [LAM01]
• Bounding volume pre-processing– 8-ary AABB tree built in top-down manner– A parent AABB is split along three axis to form
eight child sub-volumes– No significant difference between ways of
choosing split planes• Center of the box or average point of all polygons
![Page 6: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/6.jpg)
Hybrid Approach [LAM01]
• Run-time update– Hybrid of top-down and bottom-up updates– For a tree with depth n, initially update the n/2
first levels bottom-up.– During a collision traversal, update those non-
updated nodes top-down as needed
![Page 7: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/7.jpg)
Hybrid Approach [LAM01]
• Results for hard cases– All intersecting face pairs are reported
![Page 8: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/8.jpg)
Hybrid Approach [LAM01]
• Results for simple cases– Only the first intersecting face pair is reported
![Page 9: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/9.jpg)
Hybrid Approach [LAM01]
• Improved bounding volume hierarchies for deformable models– More efficient update
• Self-collisions are not considered
![Page 10: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/10.jpg)
Lazy Update [MKE03]
• Another improvement to BVHs– Using k-DOPs– Build the tree top-down
• Also reported that 4-ary and 8-ary trees are better
– Lazy update• Re-inserts the vertices into the leaf k-DOPs and bu
ild internal nodes bottom-up
• Also want to detect self-collision
![Page 11: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/11.jpg)
Lazy Update [MKE03]
• Knowing maximum velocity of the vertices, some BVs need not be updated– Parts of the hierarchy where vertices do not tr
avel more than a distance b can be omitted during the hierarchy update for a time t = b / v, if proximities smaller than εclose – 2b is to be detected
• The BVs have been fattened by εclose / 2
![Page 12: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/12.jpg)
Lazy Update [MKE03]
• BVHs are still inappropriate when detecting self-collisions– bounding boxes will always find contacts betw
een adjacent sub-objects
• Test the BVH against itself?– Need to skip some tests between adjacent su
b-surfaces– Previous solutions: [VMT94] and [Pro97]– This paper uses method in [Pro97]
![Page 13: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/13.jpg)
Curvature Criterion [VMT94]
• If: There exists a vector V for which N.V > 0 at every point of S– And: The projection of C on a plane
orthogonal to V along the direction of V has no self-intersections
– Then: There are no self-collisions on the surface S.
![Page 14: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/14.jpg)
Curvature Criterion [VMT94]
• For each sub-surface– Search for V– If V exists, test the projected region for self-
intersection– If both succeeded, there is no self-intersection– Otherwise, check for self intersections in the
sub-surface
![Page 15: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/15.jpg)
Curvature Criterion [VMT94]
• V can be propagated bottom-up in the tree– Divide a sphere into 14 unit vectors– In each node, keep those vectors that have p
ositive dot products with all the normals in the BV
![Page 16: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/16.jpg)
Normal Cones [Pro97]
• In each BV, keep a cone representing a super set of normal directions
• Parent cones are easily computed from child cones– α =β/2 + max(α1, α2)
• If α≧π, check for self-intersection
![Page 17: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/17.jpg)
Lazy Update [MKE03]
• Another way to improve hierarchy update
• Also detects self-intersection using normal cones
• Results– HU=Hierarchy Update, CT=Collision Test
![Page 18: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/18.jpg)
Morphing of Tree [LAM03]
• Accelerate the special case in which models are deformed by mesh morphing– First establish the correspondence between
geometric parts in reference models, assuming all models have the same number of vertices and mesh connectivity
– Interpolate between these parts– The models in each frame are formed by
linear blending the n reference models
![Page 19: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/19.jpg)
Morphing of Tree [LAM03]
• Tree building (top-down)– Add one BV per node in the tree for each refer
ence model– Namely, each node in the tree contain n BVs
• BVs are updated by blending the bounding volumes of corresponding sub-models– using the same weights for linear blending
![Page 20: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/20.jpg)
Morphing of Tree [LAM03]
• Experiment—three reference models
![Page 21: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/21.jpg)
Morphing of Tree [LAM03]
• Compared with hybrid method [LAM01]
![Page 22: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/22.jpg)
Image-Space Techniques
• Work with 2D or 3D discretized representation of objects– Do not perform exact collision detection due t
o discretization error
• Make use of graphics hardware– Have to worry about bandwidth to and from gr
aphics card• Too many read-backs of buffers (depth, color, sten
cil) will make it slower than using only CPU
![Page 23: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/23.jpg)
Layered Depth Image (LDI) Decomposition [HTG03]
• Use discretized 3D representation to accelerate collision detection– Look like this:
![Page 24: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/24.jpg)
Layered Depth Image (LDI) Decomposition [HTG03]
• Stage 1: Compute AABB intersection for a pair of objects (Volume-of-Intersect, VoI)
• Stage 2: Compute the two LDIs restricted to the VoI– like scan-line conversions
![Page 25: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/25.jpg)
Layered Depth Image (LDI) Decomposition [HTG03]
• How to compute LDIs?– Render a 2D projection for each depth value– Like scan-conversions
• Need to read back the rendered image from frame buffer– For simple environment, graphics hardware v
ersion runs slower than CPU version
![Page 26: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/26.jpg)
Layered Depth Image (LDI) Decomposition [HTG03]
• Stage 3: Perform the actual collision detection– (3a) Count the overlapping “pixels”– (3b) Check if vertices of an object are in
another object’s volume
![Page 27: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/27.jpg)
Layered Depth Image (LDI) Decomposition [HTG03]
• Results—using intersection volume (3a)– Depth complexity is the number of layers in
LDI
![Page 28: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/28.jpg)
Layered Depth Image (LDI) Decomposition [HTG03]
• Results—using vertex-in-volume– Times for LDI generation for entire objects
![Page 29: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/29.jpg)
Layered Depth Image (LDI) Decomposition [HTG03]
• Does not need much pre-computation
• Can also detect self-collision– By labeling “entry” & “leaving” points explicitly
• Accuracy is related to the resolution of LDI
• Restricted to water-tight models– Otherwise the “scan-conversion” will fail
• Need buffer read-backs– Use graphics hardware for complex scenes!
![Page 30: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/30.jpg)
CULLIDE [GRLM03]
• A solution to N-body problem
• Does not use 3D discretized representation of the models– Only use visibility queries
• Cull those objects that cannot be colliding– Keep a potentially colliding set (PCS)– For large environment
![Page 31: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/31.jpg)
CULLIDE [GRLM03]
• Given an environment composed of n objects, O1, O2, …, On
– If Oi is fully-visible with respect to all other objects, then Oi cannot collide with any other object, thus is not in PCS
• Choose three axis to perform orthogonal projection
– The second pass tests visibility of sub-objects in a similar manner
• Only test those still in the PCS after first pass
![Page 32: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/32.jpg)
CULLIDE [GRLM03]
• Final step– The primitives remaining in the PCS are
tested with exact collision detection methods
• Results
100 deforming cylinders 100 cylinders * 200 polygons
![Page 33: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/33.jpg)
CULLIDE [GRLM03]
• Visibility query done by graphics hardware– Does not need to read back buffers
• Accuracy governed by image resolution– Errors can be overcome by “fattened” representation
• [GLM04]
• Does not need pre-computation• Suitable for any polygonal mesh, large scene• Cannot be used for self-collision
– Adjacent faces cannot be culled– Need decomposition of the mesh?
![Page 34: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/34.jpg)
Chromatic Decomposition [Govindaraju et al. 05]
• Modify CULLIDE to handle self-collision– transforms self-collision detection into pair-wise N-bod
y CD between non-adjacent primitives– Decompose the mesh into k independent sets S1,…,S
k
– For every pair of independent set, (Si, Sj), ensure each primitive in Si has only one adjacent primitive that is in Sj
• To simplify the adjacency
• Building a corresponding graph G, and decompose it with graph coloring
![Page 35: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/35.jpg)
Graph Coloring [Govindaraju et al. 05]
• Construct a graph G = (V, E)
• Each primitive pi correspond to a vertex V(p
i) in V
• Add an edge (V(pl), V(pm)) to E if
– Primitives pl and pm are vertex-adjacent
– There exists primitive p in the mesh that is adjacent to both pl and pm
• Ensures each primitive in Si has only one adjacent primitive that is in Sj
![Page 36: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/36.jpg)
Graph Coloring [Govindaraju et al. 05]
• Each node is given a color that is different from its neighbors in graph G
• Nodes with the same color forms an independent set
• Each independent set has a PCS
![Page 37: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/37.jpg)
Reordering [Govindaraju et al. 05]
• Consider each pair Si and Sj, compute pairs of adjacent primitives between them– Give the adjacent primitives the same index
![Page 38: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/38.jpg)
Collision Culling [Govindaraju et al. 05]
• Collision culling using AABB tree– Test the tree against itself– Ignore overlaps with adjacent primitives here
• 2.5D test: build PCS for each set– 1st pass: traverse the primitives in Si from last
to first• Test if pi
m is fully-visible against previously rendered primitives in Si and Sj, namely pi
>m& pj>m
– 2nd pass: traverse the primitives from first to last, namely test pi
m against pi<m & pj
<m
![Page 39: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/39.jpg)
GPU Culling [Govindaraju et al. 05]
![Page 40: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/40.jpg)
AABB Culling vs. GPU culling [Govindaraju et al. 05]
• Results of culling
![Page 41: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/41.jpg)
Exact Tests [Govindaraju et al. 05]
• For the primitives left in the PCS, perform exact intersection tests on non-adjacent primitives– Merge the PCS of all independent sets– Use AABB tree to test these primitives first
• For adjacent primitives, perform elementary EE and VF tests, but do not test the shared edge or vertex
![Page 42: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/42.jpg)
Benchmarks [Govindaraju et al. 05]
More than 23K triangles
400-550ms during each step
13K triangles
400-500ms during each step
32,500 triangles each curtain
100ms for each curtain
Path planning for a deformable object
60-90ms
![Page 43: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/43.jpg)
Comparison [Govindaraju et al. 05]
![Page 44: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/44.jpg)
Chromatic Decomposition [Govindaraju et al. 05]
• Transform self-collision detection into N-body collision detection by decomposing the mesh
• Use BVHs and image-space technique to do collision culling– Utilize graphics hardware
![Page 45: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/45.jpg)
Conclusion
• BVHs are still an important tool for collision detection for deformable objects– Need to optimize update procedure
• Self-collision can be culled– Curvature criterion (object space)– Decompose into independent set
• Image-space techniques can be accelerated by graphics hardware– But accuracy is limited by discretization– Can still be powerful for culling, followed by object-sp
ace exact collision detection
![Page 46: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/46.jpg)
Reference• Lin, M. C., and Manocha, D. 2004. Collision and proximity queries. I
n Handbook of Discrete and Computational Geometry, 2nd Ed., J. E. Goodman and J. O'Rourke, Eds. CRC Press LLC, Boca Raton, FL, ch. 35, 787.807.
• Teschner, M., Kimmerle, S., Heidelberger, B., Zachmann, G., Raghupathi, L., Fuhrmann, A., Cani, M.-P., Faure, F., Magnenat-Thalmann, N., Strasser, W., and Volino, P. 2005. Collision detection for deformable objects. Computer Graphics Forum
• Larsson T., Akenine-Möller T. 2001. Collision detection for continuously deforming bodies. In Eurographics, pp. 325–333. short presentation.
• Larsson T., Akenine-Möller T. 2003. Efficient collision detection for models deformed by morphing. The Visual Computer 19, 2 (May2003), 164–174.
![Page 47: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/47.jpg)
Reference
• Mezger J., Kimmerle S., Etzmuss O. 2003. Hierarchical Techniques in Collision Detection for Cloth Animation. Journal of WSCG 11, 2, 322–329.
• Volino P., Magnenat-Thalmann N. 1994. Efficient Self-Collision Detection on Smoothly Discretized Surface Animations using Geometrical Shape Regularity. Computer Graphics Forum 13, 3, 155–166.
• Provot, X. 1997. Collision and Self-Collision Handling in Cloth Model Dedicated to Design Garments. In Graphics Interface ’97 (May 1997), Canadian Information Processing Society, Canadian Human-Computer Communications Society, pp. 177–189.
![Page 48: Collision Detection for Deformable Models Huai-Ping Lee lhp@cs.unc.edu](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649d2b5503460f94a0052e/html5/thumbnails/48.jpg)
Reference
• Heidelberger, B., Teschner, M., and Gross, M. 2003. Real-time volumetic intersections of deforming objects. Proc. of Vision, Modeling and Visualization.
• Govindaraju, N., Redon, S., Lin, M. C., and Manocha, D. 2003. CULLIDE: Interactive Collision Detection between Complex Models in Large Environments using Graphics Hardware. Proc. of Eurographics/SIGGRAPH Workshop on Graphics Hardware
• Govindaraju, N., Knott, D., Jain, N., Kabul, I., Tamstorf, R., Gayle, R., Lin, M. C., and Manocha, D. 2005. Interactive Collision Detection between Deformable Models using Chromatic Decomposition. Proc. of ACM SIGGRAPH.