Multi-Resolution Method for Ray Tracing Sung-Eui Yoon ( ) Course - - PowerPoint PPT Presentation

multi resolution method for ray tracing
SMART_READER_LITE
LIVE PREVIEW

Multi-Resolution Method for Ray Tracing Sung-Eui Yoon ( ) Course - - PowerPoint PPT Presentation

Multi-Resolution Method for Ray Tracing Sung-Eui Yoon ( ) Course URL: http://jupiter.kaist.ac.kr/~sungeui/SGA/ At the Previous Class Studied LOD techniques for rasterization 2 Goal Perform an interactive ray tracing of


slide-1
SLIDE 1

Multi-Resolution Method for Ray Tracing

Sung-Eui Yoon (윤성의)

Course URL: http://jupiter.kaist.ac.kr/~sungeui/SGA/

slide-2
SLIDE 2

2

At the Previous Class

  • Studied LOD techniques for rasterization
slide-3
SLIDE 3

3

Goal

  • Perform an interactive ray tracing of

massive models

  • Handles various kinds of polygonal meshes

(e.g., scanned data and CAD)

  • St. Matthew

372M triangles Double eagle tanker 82M triangles Forest model (32M)

slide-4
SLIDE 4

4

Recent Advances for Interactive Ray Tracing

  • Hardware improvements
  • Exponential growth of computation power
  • Multi-core architectures
  • Algorithmic improvements
  • Efficient ray coherence techniques [Wald et al.

01, Reshetov et al. 05]

slide-5
SLIDE 5

5

Ray Coherence Techniques

  • Models with large primitives
  • Group rays and test intersections between the

group and a bounding box Viewpoint Image plane Large triangles Ray beams

slide-6
SLIDE 6

6

Hierarchical Acceleration Data Structures

  • kd-trees for interactive ray tracing [Wald

04]

  • Simplicity and efficiency
  • Used for efficient object culling

kd-node Axis-aligned bounding box

slide-7
SLIDE 7

7

Ray Tracing of Massive Models

  • Logarithmic asymptotic behavior
  • Very useful for dealing with massive models
  • Due to the hierarchical data structures
  • Observed only in in-core cases
slide-8
SLIDE 8

8

Performance of Ray Tracing with Different Model Complexity

  • Measured with 2GB main memory

Memory thrashing! Render time (log scale) Model complexity (M tri) - log scale Working set size 2GB

slide-9
SLIDE 9

9

Low Growth Rate of Data Access Time

5 10 15 20 25 30 35 40 45 50

Disk access speed RAM access speed CPU speed

Growth rate during 1993 – 2004

Courtesy: http://www.hcibook.com/e3/online/moores-law/

47X 20X 2X

slide-10
SLIDE 10

10

Inefficient Memory Accesses and Temporal Aliasing

  • St. Matthew (256M triangles)
  • Around 100M visible triangles
  • 1K by 1K image resolution
  • 1M primary rays
  • Hundreds of triangle per pixel
  • Each triangle likely in different

area of memory Viewpoint Image plane Small triangles Rays per each pixel

slide-11
SLIDE 11

11

Example of Aliasing

Due to the under- sampling

slide-12
SLIDE 12

12

LOD-based Ray Tracing

  • Propose an LOD (level-of-detail)-based ray

tracing of massive models

  • R-LOD, a novel LOD representation for Ray

tracing

  • Efficient LOD error metric for primary and

secondary rays

  • Integrate ray and cache coherent techniques
slide-13
SLIDE 13

13

Performance of Ray Tracing with Different Model Complexity

  • Measured with 2GB main memory

Memory thrashing! Render time (log scale) Model complexity (M tri) - log scale Working set size 2GB

slide-14
SLIDE 14

14

Performance of LOD-based Ray Tracing

  • Measured with 2GB main memory

Model complexity (M tri) - log scale Achieved up to three order of magnitude speedup! Render time (log scale) Working set size

slide-15
SLIDE 15

15

Real-time Captured Video – St. Matthew Model

512 by 512 and 2x2 super-sampling, 4 pixels of LOD error in image space

slide-16
SLIDE 16

16

Related Work

  • Interactive ray tracing
  • LOD and out-of-core techniques
  • LOD-based ray tracing
slide-17
SLIDE 17

17

Interactive Ray Tracing

  • Ray coherences
  • [Heckbert and Hanrahan 84, Wald et al. 01,

Reshetov et al. 05]

  • Parallel computing
  • [Parker et al. 99, DeMarle et al. 04, Dietrich et
  • al. 05]
  • Hardware acceleration
  • [Purcell et al. 02, Schmittler et al. 04, Woop et
  • al. 05]
  • Large dataset
  • [Pharr et al. 97, Wald et al. 04]
slide-18
SLIDE 18

18

LOD and Out-of-Core Techniques

  • Widely researched
  • LOD book [Luebke et al. 02]
  • Out-core algorithm course [Chiang et al. 03]
  • LOD algorithms combined with out-of-core

techniques

  • Points clouds [Rusinkiewicz and Levoy 00]
  • Regular meshes [Hwa et al. 04, Losasso and

Hoppe 04]

  • General meshes [Lindstrom 03, Cignoni et al.

04, Yoon et al. 04, Gobbetti and Marton 05]

Not clear whether LOD techniques for rasterization is applicable to ray tracing

slide-19
SLIDE 19

19

LOD-based Ray Tracing

  • Ray differentials [Igehy 99]
  • Subdivision meshes [Christensen et al. 03, Stoll

et al. 06]

  • Point clouds [Wand and Straβer 03]

Viewpoint Image plane Ray beam for one pixel Footprint size

  • f ray
slide-20
SLIDE 20

20

Outline

  • R-LODs for ray tracing
  • Results
slide-21
SLIDE 21

21

Outline

  • R-LODs for ray tracing
  • Results
slide-22
SLIDE 22

22

R-LOD Representation

  • Tightly integrated with kd-nodes
  • A plane, material attributes, and surface

deviation Plane Normal kd-node Valid extent

  • f the plane

Intersection No intersection Rays

slide-23
SLIDE 23

23

Properties of R-LODs

  • Compact and efficient LOD representation
  • Add only 4 bytes to (8 bytes) kd-node
  • Drastic simplification
  • Useful for performance improvement
  • Error-controllable LOD rendering
  • Error is measured in a screen-space in terms of

pixels-of-error (PoE)

  • Provides interactive rendering framework
slide-24
SLIDE 24

24

Two Main Design Criteria for LOD Metric

  • Controllability of visual errors
  • Efficiency
  • Performed per ray (not per object)
  • More than tens of million times evaluation
slide-25
SLIDE 25

25

Visual Artifacts

  • Visibility difference
  • Illumination difference
  • Path difference for secondary rays

Surface deviation Projected area Curvature difference View direction Image plane

Ray with original mesh Ray with LODs

Original mesh LODs

slide-26
SLIDE 26

26

R-LOD Error Metric

  • Consider two factors
  • Projected screen-space area of a kd-node
  • Surface deviation
slide-27
SLIDE 27

27

Conservative Projection Method

  • Measures the screen-space area affected by

using an R-LOD

Viewpoint Image plane PoE error bound

B { R dmin C (B) dmin > R

? LOD metric: One ray beam kd-node

slide-28
SLIDE 28

28

R-LODs with Different PoE Values

PoE: Original 1.85 5 10 (512x512, no anti-aliasing)

slide-29
SLIDE 29

29

LOD Metric for Secondary Rays

  • Applicable to any linear transformation
  • Shadow
  • Planar reflection
  • Not applicable to non-linear transformation
  • Refraction
  • Uses more general, but expensive ray

differentials [Igehy 99]

slide-30
SLIDE 30

30

C0 Discontinuity between R-LODs

  • Possible solutions
  • Posing dependencies [Lindstrom 03, Hwa et al.

04, Yoon et al. 04, Cignoni et al. 05]

  • Implicit surfaces [Wald and Seidel 05]

Ray

slide-31
SLIDE 31

31

Expansion of R-LODs

  • Expansion of the extent of the plane
  • Inspired by hole-free point clouds rendering

[Kalaiah and Varshney 03]

  • A function of the surface deviation (20% of the

surface deviation) Ray

slide-32
SLIDE 32

32

Impact of Expansions of R-LODs

Original model Before expansion After expansion PoE = 5 at 512 by 512 Hole

slide-33
SLIDE 33

33

R-LOD Construction

  • Principal component analysis (PCA)
  • Compute the covariance matrix for the plane of

R-LODs

  • Hierarchical PCA computation
  • Has linear time complexity
  • Accesses the original data only one time with

virtually no memory overhead Normal (= Eigenvector)

slide-34
SLIDE 34

34

Hierarchical PCA Computation with Linear Time Complexity

where , are x, y coordinates of kth points

, ) )( (

1

=

− − =

n k x k x k xy

y x μ μ σ

k

x

k

y

∑ ∑ ∑ ∑ ∑

= = = = =

+ − =

n k k n k k n k k n k k n k k k xy

y x n y x n y x

1 1 2 1 1 1

2 2 σ

+

slide-35
SLIDE 35

35

Utilizing Coherence

  • Ray coherence
  • Using LOD improve the utilization of SIMD

traversal/intersection

  • Cache coherence
  • Use cache-oblivious layouts of bounding

volume hierarchies [Yoon and Manocha 06]

  • 10% ~ 60% performance improvement
slide-36
SLIDE 36

36

Outline

  • R-LODs for ray tracing
  • Results
slide-37
SLIDE 37

37

Implementation

  • Uses common optimized kd-tree

construction methods

  • Based on surface-area heuristic [MacDonald

and Booth 90, Havran 00]

  • Out-of-core computation
  • Decompose an input model into a set of

clusters [Yoon et al. 04]

slide-38
SLIDE 38

38

Impact of R-LODs

PoE = 0 (No LOD) PoE = 2.5 # of intersected nodes per ray Render time Working set size 10X speedup

slide-39
SLIDE 39

39

Real-time Captured Video – St. Matthew Model

512 x 512, 2 x 2 anti-aliasing, PoE = 4

slide-40
SLIDE 40

40

Pros and Cons

  • Limitations
  • Does not handle advanced materials such as

BRDF

  • No guarantee there is no holes
  • Advantages
  • Simplicity
  • Interactivity
  • Efficiency
slide-41
SLIDE 41

41

Conclusion

  • LOD-based ray tracing method
  • R-LOD representation
  • Efficient LOD error metric
  • Hierarchical LOD construction method with a

linear time complexity

  • Reduce the working set size
slide-42
SLIDE 42

42

Ongoing and Future Work

  • Investigate an efficient use of implicit

surfaces

  • Allow approximate visibility
  • Extend to global illumination
slide-43
SLIDE 43

43

At the Next Class

  • Will discuss cache-coherent layouts