Accelerating Sphere Tracing Csaba Blint , Gbor Valasek Etvs Lornd - - PowerPoint PPT Presentation

accelerating sphere tracing
SMART_READER_LITE
LIVE PREVIEW

Accelerating Sphere Tracing Csaba Blint , Gbor Valasek Etvs Lornd - - PowerPoint PPT Presentation

Accelerating Sphere Tracing Csaba Blint , Gbor Valasek Etvs Lornd University, Hungary Table of Contents Introduction to Sphere Tracing Relaxed Sphere Tracing Current best Enhanced Sphere Tracing Our first contribution


slide-1
SLIDE 1

Accelerating Sphere Tracing

Csaba Bálint, Gábor Valasek

Eötvös Loránd University, Hungary

slide-2
SLIDE 2

➢ Introduction to Sphere Tracing ✓ Relaxed Sphere Tracing ➢ Enhanced Sphere Tracing ✓ Optimally approximates smooth surfaces ✓ ~50% faster than relaxed sphere tracing ➢ Iteratively Increasing Resolution ✓ Increases resolution while rendering ✓ ~20% speedup

Table of Contents

Our first contribution

2

Our second contribution Current best

Accelerating Sphere Tracing, Csaba Bálint, Gábor Valasek

slide-3
SLIDE 3

Ray-Surface Intersection

  • 𝒒 is a surface point

 𝑔 𝒒 = 0  implicit representation

  • Ray:

𝒕 𝑢 = 𝒒0 + 𝑢 ⋅ 𝒘0

  • Ray-surface intersections:

𝑔 𝒕 𝑢 = 0

Accelerating Sphere Tracing, Csaba Bálint, Gábor Valasek

3

slide-4
SLIDE 4

Singed Distance Function

  • 𝑔(𝒒): signed distance to the surface from point 𝒒

Unbounding sphere → Center: 𝒒0 → Radius: 𝑔(𝒒0)

4

Accelerating Sphere Tracing, Csaba Bálint, Gábor Valasek

slide-5
SLIDE 5

Sphere Tracing Step

  • Travel 𝑔(𝒒) on ray – Cannot step over an intersection

5

Accelerating Sphere Tracing, Csaba Bálint, Gábor Valasek

slide-6
SLIDE 6

Sphere Tracing Algorithm

  • Travel 𝑔(𝒒) on ray – Cannot step over an intersection

▪ Repeat: t += 𝑔 𝒒0 + 𝑢 ⋅ 𝒘0 ; ▪ Stop:

  • After a 100 iterations
  • When 𝑔 𝒒0 + 𝑢 ⋅ 𝒘0 is small
  • When 𝑢 is large

6 [1] HART J. C.: Sphere tracing: A geometric method for the antialiased ray tracing of implicit surfaces. The Visual Computer 12 (1994), 527–545

Accelerating Sphere Tracing, Csaba Bálint, Gábor Valasek

slide-7
SLIDE 7

SDFE – Signed Distance Function Estimate

  • 𝑔(𝒒) is a lower bound to the actual distance

7 [1] HART J. C.: Sphere tracing: A geometric method for the antialiased ray tracing of implicit surfaces. The Visual Computer 12 (1994), 527–545

Accelerating Sphere Tracing, Csaba Bálint, Gábor Valasek

slide-8
SLIDE 8

Slowdown

  • Large overlap – could have taken a larger step

8

Accelerating Sphere Tracing, Csaba Bálint, Gábor Valasek

slide-9
SLIDE 9
  • Take a 1.6 x larger step
  • Check if spheres overlap
  • Step back if they don’t

9 [2] KEINERT B., Schäfer H., Korndörfer J., Ganse U., Stamminger M.: Enhanced Sphere Tracing. The Eurographics Association (2014)

Accelerating Sphere Tracing, Csaba Bálint, Gábor Valasek

Relaxed Sphere Stracing

slide-10
SLIDE 10
  • 11 tracing steps
  • 11 function evaluations

10

Accelerating Sphere Tracing, Csaba Bálint, Gábor Valasek

Divergent case – Sphere Tracing

slide-11
SLIDE 11
  • 11 tracing steps
  • 13 function evaluations

11

Accelerating Sphere Tracing, Csaba Bálint, Gábor Valasek

Divergent case – Relaxed Sphere Tracing

slide-12
SLIDE 12
  • 11 tracing steps
  • 12 function evaluations

12

Accelerating Sphere Tracing, Csaba Bálint, Gábor Valasek

Divergent case – (Our) Enhanced Sphere Tracing

slide-13
SLIDE 13

Enhanced Sphere Tracing Step I

Previous

13

Next ? 𝑠𝑗−1 𝑠𝑗

  • Idea: Approximate flat surfaces optimally

Accelerating Sphere Tracing, Csaba Bálint, Gábor Valasek

slide-14
SLIDE 14

Enhanced Sphere Tracing Step II

14

𝑠𝑗−1 𝑠𝑗 Tangent 𝑠𝑗 𝑒𝑗 𝑠𝑗+1 𝑠𝑗+1 = ?

  • Unbounding sphere is expected to touch

✓ The previous unbounding sphere ✓ The flat surface Next step size to try: 𝑒𝑗+1 = 𝑠

𝑗 + 𝑠 𝑗+1

Accelerating Sphere Tracing, Csaba Bálint, Gábor Valasek

slide-15
SLIDE 15

Enhanced Sphere Tracing Step III

15

Similar 𝑠𝑗−1 𝑠𝑗 Triangles 𝑠𝑗 𝑒𝑗 𝑠𝑗+1 𝑠𝑗+1

Solution: 𝑠

𝑗+1 = 𝑠 𝑗 ⋅ 𝑒𝑗 − 𝑠 𝑗−1 + 𝑠 𝑗

𝑒𝑗 + 𝑠

𝑗−1 + 𝑠 𝑗

Next step size to try: 𝑒𝑗+1 = 𝑠

𝑗 + 𝑠 𝑗+1

What if the surface is curved?

Accelerating Sphere Tracing, Csaba Bálint, Gábor Valasek

slide-16
SLIDE 16

Enhanced Sphere Tracing Step – Relaxation

16

𝑠𝑗−1 𝑠𝑗 𝑠𝑗 𝑒𝑗 𝑠𝑗+1 𝑠𝑗+1

Relax enhanced step: 𝑒𝑗+1 = 𝑠

𝑗 + 𝜕 ⋅ 𝑠 𝑗+1

Eg.: 𝜕 = 0.9 relaxation parameter. Different goal: fix slight concavity  Optimal on smooth surfaces

Accelerating Sphere Tracing, Csaba Bálint, Gábor Valasek

slide-17
SLIDE 17

Test Scene I: CSG composition

17 Accelerating Sphere Tracing, Csaba Bálint, Gábor Valasek

slide-18
SLIDE 18

Test Scene II: Village

Accelerating Sphere Tracing, Csaba Bálint, Valasek Gábor 18

slide-19
SLIDE 19

Scene III: Mandelbulb 3D Fractal

19

Non-smooth surface!

Accelerating Sphere Tracing, Csaba Bálint, Gábor Valasek

slide-20
SLIDE 20

Enhanced Sphere Tracing: Relative runtimes

20

Classic ST Faster than relaxed ST

  • But why?

Accelerating Sphere Tracing, Csaba Bálint, Gábor Valasek

slide-21
SLIDE 21

Enahnced Sphere Tracing: Step back rato

21

Enhanced sphere tracing → Only a few fallbacks → Better thread coherence → Even faster on the GPU Ratio of overshoots visualized

Accelerating Sphere Tracing, Csaba Bálint, Gábor Valasek

  • White pixels:

100% wrong prediction

  • Black pixels:

100% good prediction

slide-22
SLIDE 22

Enhanced Sphere Tracing: Relative Error

22

Close to the surface our algorithm overtakes

Accelerating Sphere Tracing, Csaba Bálint, Gábor Valasek

slide-23
SLIDE 23

Enhanced Sphere Tracing: Relative Performance

23

1.6 times better than Relaxed ST

Accelerating Sphere Tracing, Csaba Bálint, Gábor Valasek

slide-24
SLIDE 24

Cone Tracing

24

Unbounding sphere

[1] HART J. C.: Sphere tracing: A geometric method for the antialiased ray tracing of implicit surfaces. The Visual Computer 12 (1994), 527–545

Accelerating Sphere Tracing, Csaba Bálint, Gábor Valasek

slide-25
SLIDE 25

Iteratively Increase Resolution

25

4 new cones penetrate the scene further

Accelerating Sphere Tracing, Csaba Bálint, Gábor Valasek

slide-26
SLIDE 26

Iteratively Increasing Resolution Results

26

Baseline: single res.

Using 2 different resolutions: 20%

Multiple resolution change is expencive

Accelerating Sphere Tracing, Csaba Bálint, Gábor Valasek

slide-27
SLIDE 27

Summary

➢ Enhanced Sphere Tracing ✓ Optimally approximates smooth surfaces ✓ 50% faster than relaxed sphere tracing ➢ Iteratively Increasing Resolution ✓ Increases resolution while rendering ✓ 20% faster & Interactive or real-time rendering

[2] KEINERT B., Schäfer H., Korndörfer J., Ganse U., Stamminger M.: Enhanced Sphere Tracing. The Eurographics Association (2014) [1] HART J. C.: Sphere tracing: A geometric method for the antialiased ray tracing of implicit surfaces. The Visual Computer 12 (1994)

Accelerating Sphere Tracing, Csaba Bálint, Gábor Valasek

Thank you for your attention!