BVH for Efficient Raytracing of Dynamic Metaballs on ...

5 downloads 0 Views 3MB Size Report
Loıc Barthe∗ - Mathias Paulin∗ - Pierre Poulin∗+. SIGGRAPH 2009 - August ... no approximation for the ray-isosurface intersection efficient even with a large ...
Context Contribution Implementation Conclusion

BVH for Efficient Raytracing of Dynamic Metaballs on GPU Olivier Gourmel∗ - Anthony Pajot∗ Lo¨ıc Barthe∗ - Mathias Paulin∗ - Pierre Poulin∗+

SIGGRAPH 2009 - August 7th , 2009



IRIT-CNRS - Universite´ de Toulouse, France + ´ Universite´ de Montreal IRIT - Universite´ de Toulouse

Raytracing of Metaballs on GPU

( 1 / 23 )

Context Contribution Implementation Conclusion

Outline

1

Context

2

Review of our contribution Acceleration structure Ray-isosurface intersection

3

Implementation and results

4

Conclusion and perspectives

IRIT - Universite´ de Toulouse

Raytracing of Metaballs on GPU

( 2 / 23 )

Context Contribution Implementation Conclusion

Metaballs (1/3) Finite-support Metaball potential function centered at a point x, with maximum range R : α  ||x−y||2 fx (y) = max 0, 1 − R 2

IRIT - Universite´ de Toulouse

Raytracing of Metaballs on GPU

( 3 / 23 )

Context Contribution Implementation Conclusion

Metaballs (2/3)

Implicit surface ST defined by N metaballs centered at xi , (i ∈ {1, . . . , N}) at given point y, and threshold T :

f (y) =

N X

fxi (y)

(1)

ST = {y/f (y) = T }

(2)

i=1

The smaller T , the larger the iso-surface.

IRIT - Universite´ de Toulouse

Raytracing of Metaballs on GPU

( 4 / 23 )

Context Contribution Implementation Conclusion

Metaballs (3/3) Example of isosurface :

IRIT - Universite´ de Toulouse

Raytracing of Metaballs on GPU

( 5 / 23 )

Context Contribution Implementation Conclusion

Metaballs (3/3) Example of isosurface :

IRIT - Universite´ de Toulouse

Raytracing of Metaballs on GPU

( 5 / 23 )

Context Contribution Implementation Conclusion

Metaballs (3/3) Example of isosurface :

Effect of T Changing T can cause arbitrary topology changes. IRIT - Universite´ de Toulouse

Raytracing of Metaballs on GPU

( 5 / 23 )

Context Contribution Implementation Conclusion

Examples of use Highly deformable objects Varying topology

F IG .: Typical example : fluids Source : http ://nature.thetazzone.com IRIT - Universite´ de Toulouse

Raytracing of Metaballs on GPU

( 6 / 23 )

Context Contribution Implementation Conclusion

Metaballs rendering : state of the art

Most recent work : Kanamori et al., Eurographics 2008 main strengths : fast even with large number of metaballs (100K)

limits : based on approximations for medium to high density sets of metaballs no efficient possibility for complex secondary effects (true reflections, soft shadows, . . .)

IRIT - Universite´ de Toulouse

Raytracing of Metaballs on GPU

( 7 / 23 )

Context Contribution Implementation Conclusion

Raytracing Intersection

Outline

1

Context

2

Review of our contribution Acceleration structure Ray-isosurface intersection

3

Implementation and results

4

Conclusion and perspectives

IRIT - Universite´ de Toulouse

Raytracing of Metaballs on GPU

( 8 / 23 )

Context Contribution Implementation Conclusion

Raytracing Intersection

Objectives, proposed solutions

no limitation on the type of renderable effects

no approximation for the ray-isosurface intersection efficient even with a large number of metaballs

IRIT - Universite´ de Toulouse

Raytracing of Metaballs on GPU

( 9 / 23 )

Context Contribution Implementation Conclusion

Raytracing Intersection

Objectives, proposed solutions

no limitation on the type of renderable effects → raytracing core, modified Bounding Volume Hierarchy no approximation for the ray-isosurface intersection efficient even with a large number of metaballs

IRIT - Universite´ de Toulouse

Raytracing of Metaballs on GPU

( 9 / 23 )

Context Contribution Implementation Conclusion

Raytracing Intersection

Objectives, proposed solutions

no limitation on the type of renderable effects → raytracing core, modified Bounding Volume Hierarchy no approximation for the ray-isosurface intersection → secant method, dichotomic search efficient even with a large number of metaballs

IRIT - Universite´ de Toulouse

Raytracing of Metaballs on GPU

( 9 / 23 )

Context Contribution Implementation Conclusion

Raytracing Intersection

Objectives, proposed solutions

no limitation on the type of renderable effects → raytracing core, modified Bounding Volume Hierarchy no approximation for the ray-isosurface intersection → secant method, dichotomic search efficient even with a large number of metaballs → CUDA implementation

IRIT - Universite´ de Toulouse

Raytracing of Metaballs on GPU

( 9 / 23 )

Context Contribution Implementation Conclusion

Raytracing Intersection

Observations finite-support metaballs ⇒ a metaball only influences points which are in the given range R ; Metaball Connected Set (MCS) : set of metaballs influencing shared points. A metaball can belong to several MCS.

IRIT - Universite´ de Toulouse

Raytracing of Metaballs on GPU

( 10 / 23 )

Context Contribution Implementation Conclusion

Raytracing Intersection

BVH for metaballs - observations

BVH built on the metaballs : each leaf stores full MCS.

IRIT - Universite´ de Toulouse

Raytracing of Metaballs on GPU

( 11 / 23 )

Context Contribution Implementation Conclusion

Raytracing Intersection

BVH for metaballs - observations

BVH built on the metaballs : each leaf stores full MCS.

Modified BVH Built as a normal BVH, but with tracking of MCS.

IRIT - Universite´ de Toulouse

Raytracing of Metaballs on GPU

( 11 / 23 )

Context Contribution Implementation Conclusion

Raytracing Intersection

Split metaballs tracking Goal : at each split phase, keep track of the metaballs that may interact with metaballs in each subnode.

IRIT - Universite´ de Toulouse

Raytracing of Metaballs on GPU

( 12 / 23 )

Context Contribution Implementation Conclusion

Raytracing Intersection

Split metaballs tracking Goal : at each split phase, keep track of the metaballs that may interact with metaballs in each subnode.

IRIT - Universite´ de Toulouse

Raytracing of Metaballs on GPU

( 12 / 23 )

Context Contribution Implementation Conclusion

Raytracing Intersection

Split metaballs tracking Goal : at each split phase, keep track of the metaballs that may interact with metaballs in each subnode.

IRIT - Universite´ de Toulouse

Raytracing of Metaballs on GPU

( 12 / 23 )

Context Contribution Implementation Conclusion

Raytracing Intersection

Split metaballs tracking Goal : at each split phase, keep track of the metaballs that may interact with metaballs in each subnode.

IRIT - Universite´ de Toulouse

Raytracing of Metaballs on GPU

( 12 / 23 )

Context Contribution Implementation Conclusion

Raytracing Intersection

Ray-isosurface intersection Intersection along ray r at point r (t) solution of : N X

fxi (r (t)) − T = 0

(3)

i=1

IRIT - Universite´ de Toulouse

Raytracing of Metaballs on GPU

( 13 / 23 )

Context Contribution Implementation Conclusion

Raytracing Intersection

General scheme

Intersection of isosurface ST with ray r ⇔ find the first zero of a function. 2 steps : 1 2

base interval finding root isolation

IRIT - Universite´ de Toulouse

Raytracing of Metaballs on GPU

( 14 / 23 )

Context Contribution Implementation Conclusion

Raytracing Intersection

base interval finding Goal : find t0 outside ST and t1 inside t0 : the origin of the ray ; t1 : nearest metaball projection point inside ST .

IRIT - Universite´ de Toulouse

Raytracing of Metaballs on GPU

( 15 / 23 )

Context Contribution Implementation Conclusion

Raytracing Intersection

Root isolation Goal : find [t0∗ , t1∗ ] ⊂ [t0 , t1 ] such that t1∗ − t0∗ <  and containing the intersection point. 1 Secant method to rapidly narrow the base interval

IRIT - Universite´ de Toulouse

Raytracing of Metaballs on GPU

( 16 / 23 )

Context Contribution Implementation Conclusion

Raytracing Intersection

Root isolation Goal : find [t0∗ , t1∗ ] ⊂ [t0 , t1 ] such that t1∗ − t0∗ <  and containing the intersection point. 1 Secant method to rapidly narrow the base interval

IRIT - Universite´ de Toulouse

Raytracing of Metaballs on GPU

( 16 / 23 )

Context Contribution Implementation Conclusion

Raytracing Intersection

Root isolation Goal : find [t0∗ , t1∗ ] ⊂ [t0 , t1 ] such that t1∗ − t0∗ <  and containing the intersection point. 1 Secant method to rapidly narrow the base interval

IRIT - Universite´ de Toulouse

Raytracing of Metaballs on GPU

( 16 / 23 )

Context Contribution Implementation Conclusion

Raytracing Intersection

Root isolation Goal : find [t0∗ , t1∗ ] ⊂ [t0 , t1 ] such that t1∗ − t0∗ <  and containing the intersection point. 1 Secant method to rapidly narrow the base interval 2 dichotomic search to further refine, just need to compute the sign of f (r (t)) − T ⇒ cheaper for large MCS

IRIT - Universite´ de Toulouse

Raytracing of Metaballs on GPU

( 16 / 23 )

Context Contribution Implementation Conclusion

Outline

1

Context

2

Review of our contribution Acceleration structure Ray-isosurface intersection

3

Implementation and results

4

Conclusion and perspectives

IRIT - Universite´ de Toulouse

Raytracing of Metaballs on GPU

( 17 / 23 )

Context Contribution Implementation Conclusion

CUDA implementation

1D textures for both BVH nodes and metaballs (cache) streaming to allow parallel rendering / building / animation / memory transfers

IRIT - Universite´ de Toulouse

Raytracing of Metaballs on GPU

( 18 / 23 )

Context Contribution Implementation Conclusion

Temporal execution

IRIT - Universite´ de Toulouse

Raytracing of Metaballs on GPU

( 19 / 23 )

Context Contribution Implementation Conclusion

Results Hardware : Intel Core 2 Duo E6600 + nVidia 280 GTX Resolution : 640x480

scene no. metaballs

effects

min 6.7 3.7

fps max 11.2 6.7

avg 9.1 6.3

30,000 100,000

none

5,440

hard shadows

3.2

8.6

5.8

5,440

amb. occlusion 64 shadow rays

0.5

0.7

0.6

10,000

fresnel ref.

1.5

2.3

1.9

IRIT - Universite´ de Toulouse

Raytracing of Metaballs on GPU

( 20 / 23 )

Context Contribution Implementation Conclusion

Outline

1

Context

2

Review of our contribution Acceleration structure Ray-isosurface intersection

3

Implementation and results

4

Conclusion and perspectives

IRIT - Universite´ de Toulouse

Raytracing of Metaballs on GPU

( 21 / 23 )

Context Contribution Implementation Conclusion

Main strengths, limitations

Main strengths : no limitations on the possible effects (raytracing core) exact ray-isosurface intersection (secant method) efficient (CUDA implementation)

Limitations : efficiency problems with highly dense packs of metaballs

IRIT - Universite´ de Toulouse

Raytracing of Metaballs on GPU

( 22 / 23 )

Context Contribution Implementation Conclusion

Main strengths, limitations Main strengths : no limitations on the possible effects (raytracing core) exact ray-isosurface intersection (secant method) efficient (CUDA implementation)

Limitations : efficiency problems with highly dense packs of metaballs

BUT : solved since the talk’s submission, will be published soon (hopefully)

IRIT - Universite´ de Toulouse

Raytracing of Metaballs on GPU

( 22 / 23 )

Context Contribution Implementation Conclusion

Questions ?

IRIT - Universite´ de Toulouse

Raytracing of Metaballs on GPU

( 23 / 23 )

Suggest Documents