Collision Detection for Deformable Models Huai-Ping Lee [email protected] Differences in Deformable Models • Collision and self-collisions – Self collisions are often neglected for rigid bodies • Preprocessing –
Download ReportTranscript Collision Detection for Deformable Models Huai-Ping Lee [email protected] Differences in Deformable Models • Collision and self-collisions – Self collisions are often neglected for rigid bodies • Preprocessing –
Collision Detection for Deformable Models
Huai-Ping Lee [email protected]
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
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 important than the tightness of BVs • AABBs are preferred
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
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
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
Hybrid Approach [LAM01]
• Results for hard cases – All intersecting face pairs are reported
Hybrid Approach [LAM01]
• Results for simple cases – Only the first intersecting face pair is reported
Hybrid Approach [LAM01]
• Improved bounding volume hierarchies for deformable models – More efficient update • Self-collisions are not considered
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 build internal nodes bottom-up • Also want to detect self-collision
Lazy Update [MKE03]
• Knowing maximum velocity of the vertices, some BVs need not be updated – Parts of the hierarchy where vertices do not travel more than a distance
b
can be omitted during the hierarchy update for a time
t = b
/
v
, if proximities smaller than ε close – 2
b
is to be detected • The BVs have been fattened by ε close / 2
Lazy Update [MKE03]
• BVHs are still inappropriate when detecting self-collisions – bounding boxes will always find contacts between adjacent sub-objects • Test the BVH against itself?
– Need to skip some tests between adjacent sub-surfaces – Previous solutions: [VMT94] and [Pro97] – This paper uses method in [Pro97]
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.
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
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 positive dot products with all the normals in the BV
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
Lazy Update [MKE03]
• Another way to improve hierarchy update • Also detects self-intersection using normal cones • Results – HU=Hierarchy Update, CT=Collision Test
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
Morphing of Tree [LAM03]
• Tree building (top-down) – Add one BV per node in the tree for each reference 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
Morphing of Tree [LAM03]
• Experiment—three reference models
Morphing of Tree [LAM03]
• Compared with hybrid method [LAM01]
Image-Space Techniques
• Work with 2D or 3D discretized representation of objects – Do not perform exact collision detection due to discretization error • Make use of graphics hardware – Have to worry about bandwidth to and from graphics card • Too many read-backs of buffers (depth, color, stencil) will make it slower than using only CPU
Layered Depth Image (LDI) Decomposition [HTG03] • Use discretized 3D representation to accelerate collision detection – Look like this:
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
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 version runs slower than CPU version
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
Layered Depth Image (LDI) Decomposition [HTG03] • Results—using intersection volume (3a) – Depth complexity is the number of layers in LDI
Layered Depth Image (LDI) Decomposition [HTG03] • Results—using vertex-in-volume – Times for LDI generation for entire objects
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!
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
CULLIDE [GRLM03]
• Given an environment composed of
n
objects,
O
1 ,
O
2 , …,
O n
– If
O i
is
fully-visible
objects, then
O i
with respect to all other 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
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
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?
Chromatic Decomposition [Govindaraju et al. 05] • Modify CULLIDE to handle self-collision – transforms self-collision detection into pair-wise N body CD between non-adjacent primitives – Decompose the mesh into
k
S 1 ,…,S
k
independent sets – For every pair of independent set, (S
i
, S
j
), ensure each primitive in S
i
has only one adjacent primitive that is in S
j
• To simplify the adjacency • Building a corresponding graph G, and decompose it with graph coloring
Graph Coloring [Govindaraju et al. 05] • Construct a graph G = (V, E) • Each primitive
p i
correspond to a vertex V(
p i
) in V • Add an edge (V(
p l
), V(
p m
)) to E if – Primitives
p l
and
p m
are vertex-adjacent – There exists primitive
p
in the mesh that is adjacent to both
p l
and
p m
• Ensures each primitive in S
i
primitive that is in S
j
has only one adjacent
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
Reordering [Govindaraju et al. 05] • Consider each pair S
i
and S
j
, compute pairs of adjacent primitives between them – Give the adjacent primitives the same index
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 S
i
to first from last • Test if
p i m
is fully-visible against previously rendered primitives in S
i
and S
j
, namely
p i >m
&
p j >m
– 2nd pass: traverse the primitives from first to last, namely test
p i m
against
p i
&
p j
GPU Culling [Govindaraju et al. 05]
AABB Culling vs. GPU culling [Govindaraju et al. 05] • Results of culling
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 • For adjacent primitives, perform elementary EE and VF tests, but do not test the shared edge or vertex
Benchmarks [Govindaraju et al. 05] 13K triangles 400-500ms during each step More than 23K triangles 400-550ms during each step 32,500 triangles each curtain 100ms for each curtain Path planning for a deformable object 60-90ms
Comparison [Govindaraju et al. 05]
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
Conclusion
• BVHs are still an important tool for collision detection for deformable objects – Need to optimize update procedure • Self-collision can be culled in object space – 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 space exact collision detection
Reference
• Lin, M. C., and Manocha, D. 2004. Collision and proximity queries. In
Handbook of Discrete and Computational Geometry, 2nd Ed
ch. 35, 787.807.
• Teschner, M., Kimmerle, S., Heidelberger, B., Zachmann, G., for deformable objects.
Computer Graphics Forum
• Larsson T., Akenine-Möller T. 2001. Collision detection for continuously deforming bodies. In
Eurographics
, pp. 325 ., J. E. Goodman and J. O'Rourke, Eds. CRC Press LLC, Boca Raton, FL, Raghupathi, L., Fuhrmann, A., Cani, M.-P., Faure, F., Magnenat Thalmann, N., Strasser, W., and Volino, P. 2005. Collision detection –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.
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.
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
.