Download - Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

Transcript
Page 1: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

Barycentric Differential

Partial differential = relationship between two coordinate systemschange in barycentric coordinate related to change in screen space

-1-

Screen space (x, y) Barycentric space (ฮฒ, ฮณ)

๐ ๐œท๐ ๐’™โ€ฆ

Page 2: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

๐œ• ๐›ฝ๐œ• ๐‘ฆ

๐œ• ๐›ฝ๐œ• ๐‘ฅ

Detecting Edge

-2-

If any test of four corner is failed, it is edge!Sampling more rays for the case

Page 3: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

Edge Detection Example

Geometric edge detection, not visual edge Recklessly modeled object

-3-

Page 4: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

Image Comparison (0-depth)

-4-

1X non-sample 4x proposed 4X super-sampling

Page 5: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

Image Comparison (4-depth)

-5-

1X non-sample 4x proposed 4X super-sampling

Page 6: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

Performance Comparison

-6-

1x 4x ours 4x SS 8x ours 8x SS0

5000000

10000000

15000000

20000000

25000000

# of rays (0 depth)

PrimaryShadow

1x 4x ours 4x SS 8x ours 8x SS0

5000000

10000000

15000000

20000000

25000000

30000000

35000000

# of rays (4depth)

PrimaryShadowReflectionRefraction

1x 4x-ours 4x-ss 8x-ours 8x-ss

0-depth 6.54 11 25.68 16.69 50.2

4-depth 11.05 18.82 42 29.3 82.13

โ€ข Rendering Time

โ€ข # of Rays

Page 7: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

Todos

๋…ผ๋ฌธ๋ช… ์ œ์ถœ์ฒ˜ ์ƒํƒœ

A Latency-efficient Stencil/depth Buffer System for  Mobile 3-D Rendering Processors

IEICE Express On review

An Effective Depth Data Memory System Using an Escape Count Buffer for 3D Rendering Processors 

IEICE Express Accepted

๋ฌด๊ฒŒ ์ค‘์‹ฌ ์ขŒํ‘œ๊ณ„์˜ ํŽธ๋ฏธ๋ถ„์„ ์ด์šฉํ•œ ๊ด‘์„ ์ถ”์ ๊ธฐ๋ฒ•์˜ ํ…์Šค์ฒ˜ MIPMAP

๋ ˆ๋ฒจ ์„ ํƒ ์•Œ๊ณ ๋ฆฌ์ฆ˜๊ฒŒ์ž„ํ•™ํšŒ ๋…ผ๋ฌธ์ง€ ๊ณ„ํš ์ค‘

-7-

๋…ผ๋ฌธ ์ž‘์„ฑ ๊ณ„ํšโ€“ Adaptive antialiasing using ray differentials

โ€ข ์ถ”๊ฐ€ ์‹คํ—˜ ํ•„์š” , PBRT ์ ์šฉ ํ•™์œ„ ๋…ผ๋ฌธ ์ž‘์„ฑ

Page 8: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

2011/06Jeongsoo Park

The Graduate SchoolYonsei University

Department of Computer Science

The Design of Acceleration Algorithm for Real-time Ray Tracing

Page 9: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

Agenda

Introductionโ€“ Benefit of Ray Tracingโ€“ Why todayโ€™s issue?โ€“ Contributions

Background & Related Workโ€“ Basics of Ray Tracingโ€“ Acceleration technique

Ray Differentials for Adaptive Level-of-Detailโ€“ Derivation of ray differentialโ€“ Ray-diff for texture filteringโ€“ Ray-diff for adaptive antialiasing

Probability Heuristics for Ray Tracing Accelerationโ€“ Traditional SAHโ€“ Surface Probability Heuristics

Conclusion & Future Work

-9-

Page 10: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

Introduction

Application of computer graphics is getting wider

Quality of computer graphics is getting real and faster

-10-

Toy story, 1995, 11 hours Crysis, 2011, 30 ms

Game Movie Medical AR/VR

Page 11: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

Introduction (cont.)

Ray tracing is capable of high degree of realistic imageโ€“ Support reflection, refraction, caustics naturallyโ€“ Calculate physically-correct lighting effectโ€“ Simulate interference between primitives in the scene

-11-

Page 12: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

Background (cont.)

Ray tracing is basically โ€œSEARCHโ€ algorithmโ€“ Rasterization sorts the primitive into 2-D grid of buckets(pixels)

-12-

Processing PRIMITIVES to SORT onto image plane

Z-buffered rasterization

Processing RAYS to SEARCH contributing objects

Ray tracing

Page 13: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

Ray differential unit for antialiasing

Introductionโ€“ Ray tracing is regular sampling texture aliasingโ€“ Solutionโ€ข Stochastic strategy

More rays per pixel, EXPENSIVE (Distribution ray tracing, Path tracing)โ€ข Filtering strategy

Filtering out the area within a pixel or using pre-filtered texture How to know minification ratio

-13-

Page 14: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

Ray differential unit for antialiasing (cont.)

Related worksโ€“ Distance based [BMRT1996]โ€ข Ray is linearly diverging โ€“ twice the distance, twice the differenceโ€ข Used in RenderMan [Apodaca1999]โ€ข Only valid for PRIMARY RAYโ€ข Not support reflection/refraction of ray

-14-

Page 15: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

Ray differential unit for antialiasing (cont.)

Tracing ray differentialโ€“ Partial derivatives of rayโ€™s starting point (P) and directions (D)โ€“ Difference of P and D in accordance with that of x and y.

-15-

๐œ• ๐‘ฅ

๐‘ƒ (๐‘ฅ , ๐‘ฆ)

๐‘ƒ (๐‘ฅ+๐œ•๐‘ฅ , ๐‘ฆ )

๐ท(๐‘ฅ , ๐‘ฆ )

๐ท(๐‘ฅ+๐œ• ๐‘ฅ , ๐‘ฆ )๐ ๐‘ท โ€ฒ โ€ฒ๐๐’™

๐ ๐‘ซ โ€ฒ โ€ฒ๐ ๐’™

๐ ๐‘ท โ€ฒ๐ ๐’™

๐ ๐‘ซ โ€ฒ๐ ๐’™

Page 16: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

Ray differential unit for antialiasing (cont.)

For primary ray

-16-

View

Right

Up

Differentiating

Page 17: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

Ray differential unit for antialiasing (cont.)

For reflection ray

-17-

Differentiating

ND Phit

Drefl

Page 18: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

Ray differential unit for antialiasing (cont.)

For refraction ray

-18-

Differentiating

ND Phit

Drefr

Page 19: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

Ray differential unit for antialiasing (cont.)

Proposed differential unit operates in three modes (raytype)

-19-

Page 20: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

Ray differential unit for antialiasing (cont.)

Proposed differential unit operates in three modesโ€“ Similar pipeline process ( 1DIV= 2MUL)

-20-

Primary ray

DOT3 (1)

DIV (1)

DOT3(2)

SQRT (1)

MUL (3)

MUL (12)

ADD (6)

MUL (1)

MUL (1)

P1

P2

P3

P4

P5

P6

P7

P8

P9

P10

P11

P12

P13

Reflection ray

DOT3 (1)

MUL (1)

MUL (3)

MUL (1)

MUL (3)

ADD (6)

DOT3(1)

Refraction ray

DIV (1)

MUL (1)

MUL (1)

ADD (1)

MUL (2)

MUL (12)

ADD (6)

DOT3 (1)

DOT3(2)

Page 21: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

Ray differential unit for antialiasing (cont.)

Application of ray differential (Texture filtering)โ€“ Calculate length of projected area withโ€ข R1= , R2 =

โ€“ Level of textureโ€ข LOD = [Heckbert1983]

-21-

Page 22: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

Ray differential unit for antialiasing (cont.)

Image comparisonโ€“ Distance method excessively blurs (blue)

,or does not filter (red)

-22-

Distance Method Ray Differential MethodBase Level (l=0 always)

Base Level (l=0 always) Distance Method Proposed method

Page 23: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

Ray differential unit for antialiasing (cont.)

Image comparison (cont.)โ€“ Distance method could not support convergence/divergence of rayโ€“ Proposed method selects appropriate level of filtered texture

-23-

Base Level (l=0 always) Distance Method Proposed method

Page 24: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

Surface Probability Heuristics

Introductionโ€“ If ray tracing is a SEARCH algorithm, pre-calculated indexing is desirableโ€“ Acceleration structure is index of geometry distributionโ€ข Spatial - GRID[Klimaszewski1997], KD-tree[Fussel1998]โ€ข Object - BVH[Goldsmith1987]

โ€“ KD-tree is known as the best AS for rendering speed [Havran2000]โ€ข Redundant primitive reference

-24-

Page 25: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

Surface Probability Heuristics (cont.)

Related worksโ€“ Object median[Goldsmith1987]

โ€“ Spatial medianโ€ข Bad for skewed distribution

โ€“ Surface Area Heuristics [Mac-donald1990]โ€ข Split minimizing a cost functionโ€ข Empty space cut, but sweeping

โ€“ Hybrid approach[Shevtsov2007]โ€ข Upper-level : medianโ€ข Lower-level : SAH

-25-

โ˜žProposed division scheme is enhancement of SAH

Page 26: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

Surface Probability Heuristics (cont.)

Surface Area Heuristicsโ€“ Probability that arbitrary ray goes through space VL

=

โ€“ Then, cost of traversing this node

-26-

KT = Cost of visiting this nodeKI = cost of intersection testTL|R = Number of primitives

V

 

 

 

 

 

   VL VR

 

 

 

 

 

p

  

 

    

Page 27: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

Surface Probability Heuristics (cont.) Proposed scheme

โ€“ Calculate all probabilities of inbound and outbound sub-surface

โ€“ Probability of ray come IN with โ€˜aโ€™

โ€“ Probability of ray go OUT with โ€˜bโ€™

โ€“ Probability of ray hit left

โ€ฆ

โ€“ Probability of hit โ€˜bothโ€™ (left to right)

)โ€ฆ

-27-

a e

b f

c g

d h

i j

development figure

   

a

b

e

f

j

โ˜ž

Page 28: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

Surface Probability Heuristics (cont.)

Experimental resultโ€“ ~ 82.3% reduction in tree size

โ€“ ~69.3% reduction in primitive redundancy

-28-

kitchen sponza0

200000400000600000800000

10000001200000140000016000001800000

# prim. index

SAHProposed

kitchen sponza0

100000

200000

300000

400000

500000

600000

700000

Tree size

SAHProposed

Page 29: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

Surface Probability Heuristics (cont.)

Experimental resultโ€“ ~ 15.8% reduction in tree size

โ€“ 3% overhead in rendering performance

-29-

kitchen sponza020406080

100120140160180200

# traversal

SAHProposed

kitchen sponza0

20

40

60

80

100

120

rendering time

SAHProposed

Page 30: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

Conclusions

This research focuses on the research of algorithm design for memory reduction and visual improvement for real-time ray trac-ing โ€“ Effective filtering kernel estimator by ray differentialโ€“ Hardware design that switch it operating mode in accordance with type of

rayโ€“ Advanced heuristics that reduces required memory for acceleration struc-

ture

-30-

Page 31: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

BACKUP

-31-

Page 32: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

The Design of Acceleration Al-gorithm for Real-time Ray Trac-

ing

Jeong-soo Park

2011/05/31Media System Lab.Yonsei Univ.

Page 33: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

* ๋ชฉ์ฐจ

1. Introductionโ€“ Benefit of Ray Tracing

โ€“ Why todayโ€™s issue?

โ€“ Contributions

2. Background & Related Workโ€“ Basics of Ray Tracing

โ€“ Technical Categorization

โ€ข RT execution platform

โ€ข Acceleration technique

3. Ray Differentials for Adaptive Level-of-Detailโ€“ Derivation of ray differential

โ€“ Ray-diff for texture filtering

โ€“ Ray-diff for adaptive antialiasing

4. Probability Heuristics for Ray Tracing Acceleration

5. Simulation Environment for Graphics Acceleration Hardware

6. Conclusion & Future Work

Page 34: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

Introduction

Page 35: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

* Benefit of Ray Tracing

โ€ข High degree of realistic image

โ€“ Support reflection, refraction, caustics naturally

โ€“ Calculate physically-correct lighting effect

โ€“ Simulate interference between primitives in the scene

35

Ray tracing is one of global illumination algorithm to synthesize high degree realistic images as well as to

process 3D scene more efficiently than Z-buffer algorithm

Image of nVidia. :Optix : INTERACTIVE RAY TRACING ON NVIDIA QUADRO PROFESSIONAL GRAPHICS SOLUTIONS,โ€ developer.nvidia.com, 2009

Page 36: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

* Barrier of Ray Tracing

โ€ข Computation

โ€“ All operations are based on real

numbers

โ€“ High amount of computations

โ€ข For example:โ€“ Image resolution : 1280 x 720,

Scene size : 100K primitives, 10

propagations

โ€“ 1280 x 720 x 100K x 10 = 858G

times intersection test and shading

36

However ray tracing has several barriers to achieve in real-time performance, which are its types and amount of

computations.

objectresolution

R N

propagation

D

Color O(#pixel * #obj * #propagation)

Page 37: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

* Why Todayโ€™s Issue

โ€ข Hardware performance growth

โ€“ Raw performance of CPU/GPU in-

creased

โ€ข GPU as massive parallel architec-

ture

โ€“ More parallelism exploited

โ€ข Even CPU starts to expand parallel-

ism

โ€ข Ray tracing algorithm is highly

parallel

37

Even so, there are several trends that realizes real-time performance of ray tracing.

*Nvidia developer center

Parallel architect`ure in commodity PC*

*Larrabee architecture

*Intel, โ€œLarrabee: A Many-Core x86 Architecture for Visual Computing,โ€ SIGGRAPH 2008

Page 38: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

* Why Todayโ€™s issue

โ€ข Industrial demands for advanced, realistic graphics

โ€“ In addition to be getting complex, it becomes more real-time

38

Even so, there are several trends that realizes real-time performance of ray tracing.

Expendable(1999)Quake 3(1999) Half-Life 2(2004)

Real-time Rendering (Game)Crysis 2(2011)

A Bugs Life(1998)Toy Story(1995) Car(2006)Finding Nemo(2003)

TextureMapping

BumpMapping HDRI

RayTracing

High Quality Rendering (Movie)

Page 39: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

Background & Related Work

Page 40: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

* Basics of Ray Tracing

โ€ข Ray tracing processes RAYS to SEARCH corresponding primitives

โ€“ Basically searching algorithm

โ€“ Z-buffered algorithm processes primitives to sort its projective position

Ray tracing algorithm is essentially searching algorithm that finds the primitive that contributes to the screen

Processing PRIMITIVES to SORT onto image plane

Processing RAYS to SEARCH contributing objects

Z-buffered rasterization Ray tracing

40

Page 41: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

* Acceleration Algorithms

There are several works for accelerating ray tracing to real-time performance.

41

โ€ข Ray tracing Acceleration works

โ€“ Acceleration structure : pre-indexing primitives with auxiliary data structure

โ€“ Core acceleration : optimize efficiency of RT core algorithm (traversal & intersection

test)

โ€“ Execution platform : exploiting hardware resources efficiently Search Algo-

rithmRay tracing

Acceleration Structure

โ€ข Grid[Kalojanov11], BVH[Lauterbach09], KD-tree, โ€ข Fast build/update[Kalojanov09, Pantaleoni10]

Core Acceleration โ€ข MLRTA[Reshtov05], Packet[Boulos08] โ€ข Fast IST[Havel09]

Platform โ€ข CPU/GPUโ€ข GPU[Parker10, Aila09], Multi-core[Wald10, Seiler08]

โ€ข GPU build [Lauterbach09]

Page 42: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

Ray Differentials for Adaptive

LOD

Page 43: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

* Introduction

โ€ข Regular sampling of ray tracing aliasing problem

โ€ข Solution

โ€“ Stochastic sampling

โ€ข More rays per pixel, EXPENSIVEโ€“ Eg.) Distribution ray tracing, Path tracing

โ€“ Texture filtering (like rasterization)

โ€ข Filtering texels in a pixel, or choose from prefiltered texture map (MIPMAP)

โ€ข Filtering kernel is rayโ€™s footprint on texture space

How to know rayโ€™s footprint along ray traversal

Like other rendering algorithm, ray tracing is another regular sampling technique. It also suffers from aliasing

problem.

43

Page 44: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

* Related works

โ€ข BMRT[Gritz96]

โ€“ Estimating difference based on ray

traversal distance

โ€“ Only valid for primary ray

โ€“ Could not support convergence/di-

vergence of ray ( lens effect )

โ€ข Tracing ray differential[Igehy99]

โ€“ Derivatives of world coordinate po-

sition

โ€“ Used for geometry subdivision in

offline renderer [Christensen03,

Christensen06]

Several works has been announced to eliminate aliasing problem in texture mapping

44

Page 45: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

* Tracing Ray Differential

โ€ข Essentially tracing derivatives of rayโ€™s starting point (P) and its direction (D)

โ€“ Keep track of whether ray is expanding or shrinking

45

๐œ• ๐‘ฅ

๐‘ƒ (๐‘ฅ , ๐‘ฆ)

๐‘ƒ (๐‘ฅ+๐œ•๐‘ฅ , ๐‘ฆ )

๐ ๐‘ท (๐’™ , ๐’š )

๐ ๐‘ซ (๐’™ , ๐’š )๐ท(๐‘ฅ , ๐‘ฆ )

๐ท(๐‘ฅ+๐œ• ๐‘ฅ , ๐‘ฆ )

Page 46: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

* Derivation of Ray Differential

Ray generation Ray differential

Primary ray

Reflection Ray

Refraction Ray

Barycentric Coor-dinate

Ray differential is partial derivatives of ray parameters of x, y. Hence ray differentials for each types of ray

could be found by differentiating ray generation equation.

46

Page 47: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

* Ray differentials for texture filtering

โ€ข Longer edge (R1 or R2) is selected

for filtering kernel size

โ€ข For Mipmapping, appropriate level

of mipmap is calculated as:

47

size =

๐’๐’†๐’—๐’†๐’=(๐’Š๐’๐’• ) log๐Ÿ(๐’”๐’Š๐’›๐’†)

Page 48: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

* Ray differential pipeline design

โ€ข Ray differential unit needs 3 DOT3, 17 MUL, 10 ADD, 1 DIV, 1 SQRT

48

At ray generation stage, differential unit calculates ray differential according to type of ray.

Primary ray

DOT3 (1)

DIV (1)

DOT3(2)

SQRT (1)

MUL (3)MUL (12)

ADD (6)

MUL (1)

MUL (1)

P1

P2

P3

P4

P5

P6

P7

P8

P9

P10

P11

P12

P13

P14

P15

Reflection ray

DOT3 (1)

MUL (1)

MUL (3)

MUL (1)MUL (3)

ADD (6)

DOT3(1)

Refraction ray

DIV (1)

MUL (1)

MUL (1)

ADD (1)

MUL (2)MUL (12)

ADD (6)

DOT3 (1)

DOT3(1)

Page 49: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

* Result

49

Scene comparison (no filtering โ€“ distance based โ€“ ray differential )

BMRT Method Ray Differential MethodBase Level (l=0 always)

Base Level (l=0 always) BMRT Method Ray Differential Method

Page 50: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

*

Base Level (l=0 always) BMRT Method Ray Differential Method

Page 51: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

* Result

51

Scene comparison (no filtering โ€“ distance based โ€“ ray differential )

Base Level (l=0 always) BMRT Method Ray Differential Method

Page 52: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

Conclusion & Future work

Page 53: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

* Conclusion & Future works

โ€ข Ray differential could estimated size of ray footprint as the ray propagates

โ€ข By differentiating function of world-to-texture space transformation, it is possible

to calculate footprint on the texture

โ€ข Texture space footprint could be used to compute:

โ€“ Filtering kernel size

โ€“ Level of mipmap

โ€ข Adaptive supersampling by differential scheme

โ€“ Transform ray differential barycentric differential

53

Page 54: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

Backup

Page 55: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

* Benefit of Ray Tracing

โ€ข Benefit โ€“ High Image Quality

โ€ข Support reflection, refraction, caus-

tics naturally

โ€ข Calculate lighting effect globally

โ€“ Efficient processing

โ€ข Logarithmic behavior to scene

complexity

โ€ข Only process the primitive that con-

tributes to final image

55

Ray tracing is one of global illumination algorithm to synthesize high degree realistic images as well as to

process 3D scene more efficiently than Z-buffer algorithm

*Daniel Pohl, โ€œRay Tracing and Gaming,โ€ PC perspective articles from Intel, Jan. 2008

Z-buffer algorithm

Ray Tracing

ComputationBehavior of graphics algorithm*

Page 56: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

*

์„ฑ๋Šฅ

์‚ฌ์‹ค์„ฑ

56

ํ˜„์žฌ ๊ทธ๋ž˜ํ”ฝ์Šค ๊ธฐ์ˆ ์˜ ๋ฌธ์ œ์ 

โ€ข์ง€์—ญ ์กฐ๋ช… ๊ธฐ๋ฐ˜์œผ๋กœ ์ธํ•œ ์‚ฌ์‹ค๊ฐ์˜ ํ•œ๊ณ„โ€ข ๊ฐ ๋ฌผ์ฒด์™€ ๊ด‘์›๊ณผ์˜ ๊ด€๊ณ„๋งŒ ๊ณ ๋ ค

โ€ข Eg. 1โ€™ ์— ๋“œ๋ฆฌ์›Œ์ง€๋Š” 3โ€™ ์˜ ๊ทธ๋ฆผ์ž ํ‘œํ˜„ ๋ถˆ๊ฐ€โ€ข์ธ์ ‘ํ•œ ๋ฌผ์ฒด๊ฐ„์˜ ์œ„์น˜ ๊ด€๊ณ„๋ฅผ ํ‘œํ˜„ํ•˜์ง€ ๋ชปํ•จ

โ€ข ํŠน์ • ๋ฌผ์ฒด๋ฅผ ์ฒ˜๋ฆฌํ•  ๋•Œ ๋‹ค๋ฅธ ๋ฌผ์ฒด์˜ ์œ„์น˜๋ฅผ ๋ชจ๋ฆ„โ€ข Eg. 4 ์— ๋น„์นœ 1 ์˜ ์˜์ƒ์„ ํ‘œํ˜„ ๋ชปํ•จ

โ€ข์„ฑ๋Šฅํšจ์œจ์ด ๋‚ฎ์Œโ€ข ๋น„๊ฐ€์‹œ ์˜์—ญ์— ๋Œ€ํ•ด ๋ถˆํ•„์š”ํ•œ ๋ Œ๋”๋ง์ž‘์—… ์ˆ˜ํ–‰

โ€ข Eg. 3 ์— ์˜ํ•ด ๊ฐ€๋ ค์ง€๋Š” 2 ์˜ ์˜์—ญ๊นŒ์ง€ ๋ Œ๋”๋ง์ˆ˜ํ–‰โ€ข ์‚ฌ์‹ค๊ฐ ๊ฐœ์„ ์„ ์œ„ํ•œ ์ค‘๋ณต ๋ Œ๋”๋ง

โ€ข Eg. 5 ๋ฅผ ๋‹ค์‹œ ๋ Œ๋”๋งํ•˜์—ฌ 1 ์— ๋Œ€ํ•œ ๋ฐ˜์‚ฌ๋ฅผ ํ‘œํ˜„โ€ข๋ฌผ์ฒด์˜ ์ˆ˜์— ์„ ํ˜• ๋ณต์žก๋„๋ฅผ ๊ฐ€์ง

โ€ข ์žฅ๋ฉด์„ ๊ตฌ์„ฑํ•˜๋Š” ๋ชจ๋“  ๋ฌผ์ฒด (N ๊ฐœ ) ์— ๋Œ€ํ•ด ๋ Œ๋”๋ง ์ˆ˜ํ–‰ (Lin-ear complexity: O(N) )

โ€ข ๊ทธ๋ž˜ํ”ฝ application ์˜ ์˜์ƒ ๋ณต์žก๋„๋Š” ๊ธ‰๊ฒฉํ•œ ์ฆ๊ฐ€์ถ”์„ธ

5โ€™

3

2

1

Graphics Pipeline

2

1โ€™

3โ€™

N 5

4

Page 57: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

* Result

57

Scene comparison (no filtering โ€“ distance based โ€“ ray differential )

BMRT Method Ray Differential MethodBase Level (l=0 always)

Base Level (l=0 always) BMRT Method Ray Differential Method

Page 58: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

* Global Illumination ๊ธฐ๋ฒ•์˜ ์žฅ์ 

58

์„ฑ๋Šฅ

์‚ฌ์‹ค์„ฑโ€ข์‹ค๊ฐ์žˆ๋Š” ์ง์ ‘ ์กฐ๋ช… ํšจ๊ณผ ์žฌํ˜„

โ€ข ๊ด‘์„ ์˜ ์—ฐ์‡„์ถ”์ ์„ ํ†ตํ•ด ์‹ค์ œ์™€ ์œ ์‚ฌํ•œ ๋น›์˜ ๋ฐ˜์‚ฌ , ๊ตด์ ˆ , ๊ทธ๋ฆผ์ž๋ฅผ ์žฌํ˜„ (simulation)

โ€ข Eg. 1 ์—์„œ ๊ด‘์›์— ๋Œ€ํ•ด ๊ทธ๋ฆผ์ž ray ์ถ”์  , 4 ์—์„œ 1์— ๋Œ€ํ•œ ๋ฐ˜์‚ฌ ray ์ถ”์ 

โ€ข๊ฐ„์ ‘์กฐ๋ช… ํšจ๊ณผ ์žฌํ˜„ โ€ข ๊ด‘์›์—์„œ ์ƒ์„ฑ๋˜๋Š” ๊ฐ„์ ‘์กฐ๋ช…ํšจ๊ณผ ์ง€์›

โ€ข Eg. 3 ์— ์˜ํ•œ ๊ฐ„์ ‘์กฐ๋ช… ํšจ๊ณผ๋กœ 1 ์˜ ์ƒ‰์ƒ์ด ๋ฐ”๋€œ

โ€ขํšจ์œจ์ ์ธ ๋ Œ๋”๋ง ์ฒ˜๋ฆฌโ€ข ๋ฌผ์ฒด๊ฐ€ ์•„๋‹Œ ์ƒ์„ฑํ•œ ๊ด‘์„ ์„ ์‹œ์Šคํ…œ์—์„œ ์ฒ˜๋ฆฌโ€ข ๊ด‘์„  ์—ญ์ถ”์ ์œผ๋กœ ํ˜„ ์‹œ์ ์—์„œ ๊ฐ€์‹œ์˜์—ญ๋งŒ ๋ Œ๋”๋ง ์ˆ˜ํ–‰

โ€ข๊ณ„์‚ฐ ๋ณต์žก๋„๊ฐ€ ๋‚ฎ์Œโ€ข ๊ณต๊ฐ„์ƒ์— ๋ฐฐ์น˜๋œ ๊ฐ ๋ฌผ์ฒด๋ฅผ tree ๊ตฌ์กฐํ™”ํ•˜์—ฌ ๋ฌผ์ฒด ์ˆ˜ (N) ์—

๋Œ€ํ•ด Log(N) ์˜ ๋ณต์žก๋„๋ฅผ ๊ฐ€์งโ€ข ์žฅ๋ฉด ๋ณต์žก๋„ ์ฆ๊ฐ€์— ํšจ๊ณผ์ ์œผ๋กœ ๋Œ€์‘

1

23

1

Shadow ray

Eye ray

Reflection ray

Refraction ray

4

Page 59: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

* Edge detection using ray differential

โ€ข For each sub-pixel, check conditions:

Barycentric coordinate differential could be used to estimate hit-point of neighbor rays

๐œ•๐‘ƒ๐œ• ๐‘ฅ

๐œ•๐‘ƒ๐œ• ๐‘ฆ

3 4

1 2

Page 60: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

* Why todayโ€™s issue

โ€ข Hardware performance growth

โ€“ Raw performance of CPU/GPU in-

creased

โ€ข GPU as massive parallel architec-

ture

โ€“ More parallelism exploited

โ€ข Even CPU starts to expand parallel-

ism

โ€ข Ray tracing algorithm is highly

parallel

Even so, there are several trends that realizes real-time performance of ray tracing.

CE/ ํ‘œ์ค€

CE/ ํ‘œ์ค€

CE/ ํ‘œ์ค€Gflops growth

CPUGPU

Gtx 480

Gtx 200

G92

G80

Core2 XeonI7 980

Page 61: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

* ๋ชฉ์ฐจ

1. Introduction

โ€“ Benefit of Ray Tracing

โ€“ Why todayโ€™s issue?

โ€“ Contributions

2. Background & Related Work

โ€“ Basics of Ray Tracing

โ€“ Technical Categorization

โ€ข RT execution platform

โ€ข Acceleration technique

3. Ray Differentials for Adaptive LOD

โ€“ Derivation of ray differential

โ€“ Ray-diff for texture filtering

โ€“ Ray-diff for adaptive antialiasing

4. New Heuristics for Accelerating RT

5. Simulation Environment for Advanced Computer Graphics

6. Conclusion & Future Work

Page 62: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

* ๋ชฉ์ฐจ

โ€ข Introduction

โ€ข Background & Related Work

โ€ข Ray Differentials for Adaptive LOD

โ€ข New Heuristics for Accelerating RT

โ€ข Simulation Environment for Advanced Computer Graphics

โ€ข Conclusion & Future Work

Page 63: Barycentric Differential Partial differential = relationship between two coordinate systems change in barycentric coordinate related to change in screen.

* Result

63

Scene comparison (no filtering โ€“ distance based โ€“ ray differential )