haptic cloth rendering 6th dutch-belgian haptics meeting tudelft, 21 st june 2006 lode vanacken...

27
Haptic Cloth Rendering 6th Dutch-Belgian Haptics Meeting TUDelft, 21 st June 2006 Lode Vanacken Expertise centre for Digital Media (EDM) Hasselt University (UHasselt)

Post on 21-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Haptic Cloth Rendering 6th Dutch-Belgian Haptics Meeting TUDelft, 21 st June 2006 Lode Vanacken Expertise centre for Digital Media (EDM) Hasselt University

Haptic Cloth Rendering

6th Dutch-Belgian Haptics Meeting

TUDelft, 21st June 2006

Lode Vanacken

Expertise centre for Digital Media (EDM)Hasselt University (UHasselt)

Page 2: Haptic Cloth Rendering 6th Dutch-Belgian Haptics Meeting TUDelft, 21 st June 2006 Lode Vanacken Expertise centre for Digital Media (EDM) Hasselt University

21-06-2006 6th Dutch-Belgian Haptics Meeting

2

Introduction

• Comparing techniques in both domains:– Integration Techniques– Collision Detection– Haptic Rendering

Haptic Cloth Rendering

Cloth Simulation Haptics

Page 3: Haptic Cloth Rendering 6th Dutch-Belgian Haptics Meeting TUDelft, 21 st June 2006 Lode Vanacken Expertise centre for Digital Media (EDM) Hasselt University

21-06-2006 6th Dutch-Belgian Haptics Meeting

3

Overview

• Cloth Simulation• Integration Techniques• Collision Detection• Haptic Rendering• Haptic Cloth Rendering

Page 4: Haptic Cloth Rendering 6th Dutch-Belgian Haptics Meeting TUDelft, 21 st June 2006 Lode Vanacken Expertise centre for Digital Media (EDM) Hasselt University

21-06-2006 6th Dutch-Belgian Haptics Meeting

4

Cloth Simulation

• Using Mass Spring Systems– Combination of Particles and Springs– Several techniques to connect particles

Page 5: Haptic Cloth Rendering 6th Dutch-Belgian Haptics Meeting TUDelft, 21 st June 2006 Lode Vanacken Expertise centre for Digital Media (EDM) Hasselt University

21-06-2006 6th Dutch-Belgian Haptics Meeting

5

Overview

• Cloth Simulation• Integration Techniques• Collision Detection• Haptic Rendering• Haptic Cloth Rendering

Page 6: Haptic Cloth Rendering 6th Dutch-Belgian Haptics Meeting TUDelft, 21 st June 2006 Lode Vanacken Expertise centre for Digital Media (EDM) Hasselt University

21-06-2006 6th Dutch-Belgian Haptics Meeting

6

Integration Techniques

• Moving the Cloth?– Movement through Newton’s dynamics– Position/Velocity of the particles need to

be updated– Represented as Initial Value Problem– IVP can be solved using a first order

Ordinary Differential Equation (ODE)– Several numerical methods exist

• Explicit, Implicit, IMEX, Verlet Integration,…

Page 7: Haptic Cloth Rendering 6th Dutch-Belgian Haptics Meeting TUDelft, 21 st June 2006 Lode Vanacken Expertise centre for Digital Media (EDM) Hasselt University

21-06-2006 6th Dutch-Belgian Haptics Meeting

7

Integration Techniques

• Verlet Integration– Popular in Molecular Dynamics– Basic Verlet Scheme– High accuracy: O(h4) with only one force

evaluation– No explicit Velocity computation– Two other schemes

• Velocity• Leapfrog

Page 8: Haptic Cloth Rendering 6th Dutch-Belgian Haptics Meeting TUDelft, 21 st June 2006 Lode Vanacken Expertise centre for Digital Media (EDM) Hasselt University

21-06-2006 6th Dutch-Belgian Haptics Meeting

8

Integration Techniques

• After IT step: Inverse Dynamics– Changing the positions/velocities– Stability increases

Page 9: Haptic Cloth Rendering 6th Dutch-Belgian Haptics Meeting TUDelft, 21 st June 2006 Lode Vanacken Expertise centre for Digital Media (EDM) Hasselt University

21-06-2006 6th Dutch-Belgian Haptics Meeting

9

Overview

• Cloth Simulation• Integration Techniques• Collision Detection• Haptic Rendering• Haptic Cloth Rendering

Page 10: Haptic Cloth Rendering 6th Dutch-Belgian Haptics Meeting TUDelft, 21 st June 2006 Lode Vanacken Expertise centre for Digital Media (EDM) Hasselt University

21-06-2006 6th Dutch-Belgian Haptics Meeting

10

Collision Detection

• Achieving an interactive cloth (e.g. draping a table)

• Two phases– Broad phase: efficiently decreases the

number of possibly colliding objects– Narrow phase: detects the areas of an

object that possibly collides and checks these areas for collision

Page 11: Haptic Cloth Rendering 6th Dutch-Belgian Haptics Meeting TUDelft, 21 st June 2006 Lode Vanacken Expertise centre for Digital Media (EDM) Hasselt University

21-06-2006 6th Dutch-Belgian Haptics Meeting

11

Collision Detection

• Only Object-Object collisions• Main problem

– Deformable Object Pre-computed structure becomes invalid

• Two popular techniques– Bounding Volume Hierarchies (BVH)– Spatial Subdivision

Page 12: Haptic Cloth Rendering 6th Dutch-Belgian Haptics Meeting TUDelft, 21 st June 2006 Lode Vanacken Expertise centre for Digital Media (EDM) Hasselt University

21-06-2006 6th Dutch-Belgian Haptics Meeting

12

Bounding Volume Hierachies

• BVH is a tree structure• Primitives are recursively subdivided• Pre-computed but here also

rebuild/repair• Bounding Volumes

– Sphere, AABB, OBB,…– Good Enclosing + Fast Intersection test

Page 13: Haptic Cloth Rendering 6th Dutch-Belgian Haptics Meeting TUDelft, 21 st June 2006 Lode Vanacken Expertise centre for Digital Media (EDM) Hasselt University

21-06-2006 6th Dutch-Belgian Haptics Meeting

13

• Arity is important! – # nodes to update– # recursion depth

• Collision testing is performed top-down

• Repairing the BVH– Top-down, Bottom-up or Hybrid – Brown et al. combine Bottom-up with a

priority queue sorted on depth

Bounding Volume Hierachies

Page 14: Haptic Cloth Rendering 6th Dutch-Belgian Haptics Meeting TUDelft, 21 st June 2006 Lode Vanacken Expertise centre for Digital Media (EDM) Hasselt University

21-06-2006 6th Dutch-Belgian Haptics Meeting

14

Spatial Subdivision

• Divide the objects in space– Subdivision of the Complete Space– Each object has its own subdivision

• Optimized Spatial Hashing (OSH)– Divide the space implicitly into small grid cells– Hash function: 3D grid cells 1D hash table– No 3D Structure! – Infinite Regular Spatial

Grids– Two phases

Page 15: Haptic Cloth Rendering 6th Dutch-Belgian Haptics Meeting TUDelft, 21 st June 2006 Lode Vanacken Expertise centre for Digital Media (EDM) Hasselt University

21-06-2006 6th Dutch-Belgian Haptics Meeting

15

Overview

• Cloth Simulation• Integration Techniques• Collision Detection• Haptic Rendering• Haptic Cloth Rendering

Page 16: Haptic Cloth Rendering 6th Dutch-Belgian Haptics Meeting TUDelft, 21 st June 2006 Lode Vanacken Expertise centre for Digital Media (EDM) Hasselt University

21-06-2006 6th Dutch-Belgian Haptics Meeting

16

Haptic Rendering

• Two popular Rigid Body techniques– Penalty Based Methods

• Uses penetration depth• Pop-Through/Multiple Objects

– Constraint Based Methods• Solution to above

problems • Representative object

attached to the userusing a spring

Page 17: Haptic Cloth Rendering 6th Dutch-Belgian Haptics Meeting TUDelft, 21 st June 2006 Lode Vanacken Expertise centre for Digital Media (EDM) Hasselt University

21-06-2006 6th Dutch-Belgian Haptics Meeting

17

Haptic Rendering

• High cost of dynamic simulation Adapt HR algorithm

– Intermediate model [Mark et al.]

• Plane updated at simulation speed

– Local model [Mendoza et al.]

• Treat part of object as rigid body in the haptic loop

– Forcegrid [Mazella et al.]

• Uniform grid that functions as a buffer structure

Page 18: Haptic Cloth Rendering 6th Dutch-Belgian Haptics Meeting TUDelft, 21 st June 2006 Lode Vanacken Expertise centre for Digital Media (EDM) Hasselt University

21-06-2006 6th Dutch-Belgian Haptics Meeting

18

Overview

• Cloth Simulation• Integration Techniques• Collision Detection• Haptic Rendering• Haptic Cloth Rendering

Page 19: Haptic Cloth Rendering 6th Dutch-Belgian Haptics Meeting TUDelft, 21 st June 2006 Lode Vanacken Expertise centre for Digital Media (EDM) Hasselt University

21-06-2006 6th Dutch-Belgian Haptics Meeting

19

Haptic Cloth Rendering

• Choose appropriate techniques• Cloth Simulation

– Some forces: Gravity, Viscous drag– Rectangular surface – Cloth’s mass– Smooth Shading– Texturing

Page 20: Haptic Cloth Rendering 6th Dutch-Belgian Haptics Meeting TUDelft, 21 st June 2006 Lode Vanacken Expertise centre for Digital Media (EDM) Hasselt University

21-06-2006 6th Dutch-Belgian Haptics Meeting

20

Haptic Cloth Rendering

• Integration:– Empirically

• Taxonomy M. Hauth• Comparison of Implemented ITs

– Mathematically • Second most stable/accurate

Leapfrog Verlet

Page 21: Haptic Cloth Rendering 6th Dutch-Belgian Haptics Meeting TUDelft, 21 st June 2006 Lode Vanacken Expertise centre for Digital Media (EDM) Hasselt University

21-06-2006 6th Dutch-Belgian Haptics Meeting

21

Haptic Cloth Rendering

• Haptic Rendering– Realized using HAL– Constraint Based Methods [Ruspini et al.]

– Force Shading [Morgenbesser et al.]

– Cloth simulator integrated as a separate library

• Implemented and compared the other Collision Detection Techniques

Page 22: Haptic Cloth Rendering 6th Dutch-Belgian Haptics Meeting TUDelft, 21 st June 2006 Lode Vanacken Expertise centre for Digital Media (EDM) Hasselt University

21-06-2006 6th Dutch-Belgian Haptics Meeting

22

Haptic Cloth Rendering

• Sphere and AABB Bounding Volume Hierarchies with possible arity of 2 or 4– Modification of the repair algorithm of Brown et

al.• Priority queue is sorted on IDs • Last added parent is saved • Use array (see Table)• Recursion is

completely removed!

Page 23: Haptic Cloth Rendering 6th Dutch-Belgian Haptics Meeting TUDelft, 21 st June 2006 Lode Vanacken Expertise centre for Digital Media (EDM) Hasselt University

21-06-2006 6th Dutch-Belgian Haptics Meeting

23

Haptic Cloth Rendering

• Optimized Spatial Hashing– Removed the first phase

• Evaluation of the CD algorithms

Page 24: Haptic Cloth Rendering 6th Dutch-Belgian Haptics Meeting TUDelft, 21 st June 2006 Lode Vanacken Expertise centre for Digital Media (EDM) Hasselt University

21-06-2006 6th Dutch-Belgian Haptics Meeting

24

Haptic Cloth Rendering

• Comparison in update time (#updates <> Ms)

0

5

10

15

20

25

30

35

40

45

162 722 1682 3042 4802

# Triangles

Mill

ise

co

nd

s

Sphere Quad Tree Sphere Binary Tree AABB Quad Tree

AABB Binary Tree Optimized Spatial Hashing

Page 25: Haptic Cloth Rendering 6th Dutch-Belgian Haptics Meeting TUDelft, 21 st June 2006 Lode Vanacken Expertise centre for Digital Media (EDM) Hasselt University

21-06-2006 6th Dutch-Belgian Haptics Meeting

25

Haptic Cloth Rendering

• Comparison in Haptic Loop

0.02

0.022

0.024

0.026

0.028

0.03

0.032

162 1152 3042

# Triangles

Mil

lis

ec

on

ds

Sphere Binary Tree AABB Quad Tree

Sphere Quad Tree AABB Binary Tree

Optimized Spatial Hashing

Page 26: Haptic Cloth Rendering 6th Dutch-Belgian Haptics Meeting TUDelft, 21 st June 2006 Lode Vanacken Expertise centre for Digital Media (EDM) Hasselt University

21-06-2006 6th Dutch-Belgian Haptics Meeting

26

Conclusion

• Who Won?– In our situation a sphere BVH with arity

4 is the best CD algorithm.

• Still a few problems– Force discontinuities arise– Solutions:

• Interpolate between two cloth representations

• Integrate locally at haptic update rate

Page 27: Haptic Cloth Rendering 6th Dutch-Belgian Haptics Meeting TUDelft, 21 st June 2006 Lode Vanacken Expertise centre for Digital Media (EDM) Hasselt University

21-06-2006 6th Dutch-Belgian Haptics Meeting

27

Questions?