35
computer graphics & visualization PantaRay: Fast Ray-traced Occlusion Caching of Massive Scenes J. Pantaleoni, L. Fascione, M. Hill, T. Aila Marie-Lena Eckert

PantaRay · 2015. 7. 29. · [Ram01] Ravi Ramamoorthi and Pat Hanrahan. An efficient representation for irradiance environment maps. In Proceedings of the 28th annual conference on

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: PantaRay · 2015. 7. 29. · [Ram01] Ravi Ramamoorthi and Pat Hanrahan. An efficient representation for irradiance environment maps. In Proceedings of the 28th annual conference on

computer graphics & visualization

PantaRay: Fast Ray-traced Occlusion Caching of Massive Scenes

J. Pantaleoni, L. Fascione, M. Hill, T. Aila

Marie-Lena Eckert

Page 2: PantaRay · 2015. 7. 29. · [Ram01] Ravi Ramamoorthi and Pat Hanrahan. An efficient representation for irradiance environment maps. In Proceedings of the 28th annual conference on

computer graphics & visualization

PantaRay: Fast Ray-traced Occlusion Caching of Massive Scenes Marie-Lena Eckert

Agenda • Introduction

– Motivation

– Basics

• PantaRay

– Accelerating structure generation

– Massively parallel ray tracer

• Conclusion

– Summary

– Critics

Page 3: PantaRay · 2015. 7. 29. · [Ram01] Ravi Ramamoorthi and Pat Hanrahan. An efficient representation for irradiance environment maps. In Proceedings of the 28th annual conference on

computer graphics & visualization

PantaRay: Fast Ray-traced Occlusion Caching of Massive Scenes Marie-Lena Eckert

Introduction: Motivation • Computer-generated imagery (CGI), rendering:

3D model 2D image

Page 4: PantaRay · 2015. 7. 29. · [Ram01] Ravi Ramamoorthi and Pat Hanrahan. An efficient representation for irradiance environment maps. In Proceedings of the 28th annual conference on

computer graphics & visualization

PantaRay: Fast Ray-traced Occlusion Caching of Massive Scenes Marie-Lena Eckert

Introduction: Motivation • Avatar: unprecedented complexity

Page 5: PantaRay · 2015. 7. 29. · [Ram01] Ravi Ramamoorthi and Pat Hanrahan. An efficient representation for irradiance environment maps. In Proceedings of the 28th annual conference on

computer graphics & visualization

PantaRay: Fast Ray-traced Occlusion Caching of Massive Scenes Marie-Lena Eckert

Introduction: Motivation • Avatar: level of detail (LOD)

Page 6: PantaRay · 2015. 7. 29. · [Ram01] Ravi Ramamoorthi and Pat Hanrahan. An efficient representation for irradiance environment maps. In Proceedings of the 28th annual conference on

computer graphics & visualization

PantaRay: Fast Ray-traced Occlusion Caching of Massive Scenes Marie-Lena Eckert

Introduction: Basics • Rendering equation

𝐿𝑜 𝑥, 𝜔𝑜 = 𝐿𝑖 𝑥, 𝜔 𝜌 𝑥, 𝜔, 𝜔𝑜 𝑉 𝑥, 𝜔 ⟨𝜔, 𝑛 ⟩ ⅆ𝜔Ω+

𝒏 𝝎𝒐

Page 7: PantaRay · 2015. 7. 29. · [Ram01] Ravi Ramamoorthi and Pat Hanrahan. An efficient representation for irradiance environment maps. In Proceedings of the 28th annual conference on

computer graphics & visualization

PantaRay: Fast Ray-traced Occlusion Caching of Massive Scenes Marie-Lena Eckert

Introduction: Basics • Rendering equation

𝐿𝑜 𝑥, 𝜔𝑜 = 𝐿𝑖 𝑥, 𝜔 𝜌 𝑥, 𝜔, 𝜔𝑜 𝑉 𝑥, 𝜔 ⟨𝜔, 𝑛 ⟩ ⅆ𝜔Ω+

𝒏 𝝎𝒐

Page 8: PantaRay · 2015. 7. 29. · [Ram01] Ravi Ramamoorthi and Pat Hanrahan. An efficient representation for irradiance environment maps. In Proceedings of the 28th annual conference on

computer graphics & visualization

PantaRay: Fast Ray-traced Occlusion Caching of Massive Scenes Marie-Lena Eckert

Introduction: Basics • Image-based lighting (IBL) for global illumination

Page 9: PantaRay · 2015. 7. 29. · [Ram01] Ravi Ramamoorthi and Pat Hanrahan. An efficient representation for irradiance environment maps. In Proceedings of the 28th annual conference on

computer graphics & visualization

PantaRay: Fast Ray-traced Occlusion Caching of Massive Scenes Marie-Lena Eckert

Introduction: Basics • Image-based lighting (IBL) for global illumination

Page 10: PantaRay · 2015. 7. 29. · [Ram01] Ravi Ramamoorthi and Pat Hanrahan. An efficient representation for irradiance environment maps. In Proceedings of the 28th annual conference on

computer graphics & visualization

PantaRay: Fast Ray-traced Occlusion Caching of Massive Scenes Marie-Lena Eckert

α

Introduction: Basics • Rendering equation

𝐿𝑜 𝑥, 𝜔𝑜 = 𝐿𝑖 𝑥, 𝜔 𝜌 𝑥, 𝜔, 𝜔𝑜 𝑉 𝑥, 𝜔 ⟨𝜔, 𝑛 ⟩ ⅆ𝜔Ω+

𝒏 𝝎𝒐

α

IBL environment

BRDF

Page 11: PantaRay · 2015. 7. 29. · [Ram01] Ravi Ramamoorthi and Pat Hanrahan. An efficient representation for irradiance environment maps. In Proceedings of the 28th annual conference on

computer graphics & visualization

PantaRay: Fast Ray-traced Occlusion Caching of Massive Scenes Marie-Lena Eckert

Introduction: Basics • Rendering equation

𝐿𝑜 𝑥, 𝜔𝑜 = 𝐿𝑖 𝑥, 𝜔 𝜌 𝑥, 𝜔, 𝜔𝑜 𝑉 𝑥, 𝜔 ⟨𝜔, 𝑛 ⟩ ⅆ𝜔Ω+

𝒏 𝝎𝒐

Page 12: PantaRay · 2015. 7. 29. · [Ram01] Ravi Ramamoorthi and Pat Hanrahan. An efficient representation for irradiance environment maps. In Proceedings of the 28th annual conference on

computer graphics & visualization

PantaRay: Fast Ray-traced Occlusion Caching of Massive Scenes Marie-Lena Eckert

𝒏

Introduction: Basics • Rendering equation

𝐿𝑜 𝑥, 𝜔𝑜 = 𝐿𝑖 𝑥, 𝜔 𝜌 𝑥, 𝜔, 𝜔𝑜 𝑉 𝑥, 𝜔 ⟨𝜔, 𝑛 ⟩ ⅆ𝜔Ω+

Page 13: PantaRay · 2015. 7. 29. · [Ram01] Ravi Ramamoorthi and Pat Hanrahan. An efficient representation for irradiance environment maps. In Proceedings of the 28th annual conference on

computer graphics & visualization

PantaRay: Fast Ray-traced Occlusion Caching of Massive Scenes Marie-Lena Eckert

𝒏

Introduction: Basics • Rendering equation

𝐿𝑜 𝑥, 𝜔𝑜 = 𝐿𝑖 𝑥, 𝜔 𝜌 𝑥, 𝜔, 𝜔𝑜 𝑉 𝑥, 𝜔 ⟨𝜔, 𝑛 ⟩ ⅆ𝜔Ω+

Irradiance

cos(α)*Irradiance

𝝎

α

Page 14: PantaRay · 2015. 7. 29. · [Ram01] Ravi Ramamoorthi and Pat Hanrahan. An efficient representation for irradiance environment maps. In Proceedings of the 28th annual conference on

computer graphics & visualization

PantaRay: Fast Ray-traced Occlusion Caching of Massive Scenes Marie-Lena Eckert

Introduction: Basics • Rendering equation

𝐿𝑜 𝑥, 𝜔𝑜 = 𝐿𝑖 𝑥, 𝜔 𝜌 𝑥, 𝜔, 𝜔𝑜 𝑉 𝑥, 𝜔 ⟨𝜔, 𝑛 ⟩ ⅆ𝜔Ω+

𝒏 𝝎𝒐

Page 15: PantaRay · 2015. 7. 29. · [Ram01] Ravi Ramamoorthi and Pat Hanrahan. An efficient representation for irradiance environment maps. In Proceedings of the 28th annual conference on

computer graphics & visualization

PantaRay: Fast Ray-traced Occlusion Caching of Massive Scenes Marie-Lena Eckert

Introduction: Basics • Spherical Harmonics (SH)

– [Ram01]: 9 coefficients, 1% error

– Store visibility term and BRDF

– Rendering time: only scalar product

Page 16: PantaRay · 2015. 7. 29. · [Ram01] Ravi Ramamoorthi and Pat Hanrahan. An efficient representation for irradiance environment maps. In Proceedings of the 28th annual conference on

computer graphics & visualization

PantaRay: Fast Ray-traced Occlusion Caching of Massive Scenes Marie-Lena Eckert

Introduction: Basics • Rendering equation

𝐿𝑜 𝑥, 𝜔𝑜 = 𝜌 ⋅ ⟨𝑆𝐻 𝐿𝑖 , 𝑆𝐻(𝑽⟨𝜔, 𝑛 ⟩)⟩

𝒏 𝝎𝒐

Page 17: PantaRay · 2015. 7. 29. · [Ram01] Ravi Ramamoorthi and Pat Hanrahan. An efficient representation for irradiance environment maps. In Proceedings of the 28th annual conference on

computer graphics & visualization

PantaRay: Fast Ray-traced Occlusion Caching of Massive Scenes Marie-Lena Eckert

PantaRay Precompute and cache visibility term

• Scenes:

– Unprecedented complexity

– Bigger than memory

– Varying density

• Production pipeline of Weta Digital

• Panta rei: everything flows

Page 18: PantaRay · 2015. 7. 29. · [Ram01] Ravi Ramamoorthi and Pat Hanrahan. An efficient representation for irradiance environment maps. In Proceedings of the 28th annual conference on

computer graphics & visualization

PantaRay: Fast Ray-traced Occlusion Caching of Massive Scenes Marie-Lena Eckert

PantaRay: Pipeline computation passes

1. Preparation

Microgrid-

stream

2. Vislocal pass

𝐿𝑜 𝑥, 𝜔𝑜 = 𝜌 ⋅ ⟨𝑆𝐻 𝐿𝑖 , 𝑆𝐻(𝑽⟨𝜔, 𝑛 ⟩)⟩

3. Beauty pass

SH(V)

(etc.)

AS Ray tracing

Page 19: PantaRay · 2015. 7. 29. · [Ram01] Ravi Ramamoorthi and Pat Hanrahan. An efficient representation for irradiance environment maps. In Proceedings of the 28th annual conference on

computer graphics & visualization

PantaRay: Fast Ray-traced Occlusion Caching of Massive Scenes Marie-Lena Eckert

PantaRay: Preparation

Final render of the scene Render of bake sets

Microgrid stream:

Page 20: PantaRay · 2015. 7. 29. · [Ram01] Ravi Ramamoorthi and Pat Hanrahan. An efficient representation for irradiance environment maps. In Proceedings of the 28th annual conference on

computer graphics & visualization

PantaRay: Fast Ray-traced Occlusion Caching of Massive Scenes Marie-Lena Eckert

• Vislocal pass

– Build Bounding Volume Hierarchy (BVH)

– Traverse for intersection computation

• LOD

• Ray tracing

• Main bottleneck: I/O

– Touch objects multiple times

– Ten of thousands concurrent processes

PantaRay: Acceleration Structure

Page 21: PantaRay · 2015. 7. 29. · [Ram01] Ravi Ramamoorthi and Pat Hanrahan. An efficient representation for irradiance environment maps. In Proceedings of the 28th annual conference on

computer graphics & visualization

PantaRay: Fast Ray-traced Occlusion Caching of Massive Scenes Marie-Lena Eckert

PantaRay: Acceleration Structure

Bucketing pass Brick construction

(etc.)

Microgrids

Chunking pass

Page 22: PantaRay · 2015. 7. 29. · [Ram01] Ravi Ramamoorthi and Pat Hanrahan. An efficient representation for irradiance environment maps. In Proceedings of the 28th annual conference on

computer graphics & visualization

PantaRay: Fast Ray-traced Occlusion Caching of Massive Scenes Marie-Lena Eckert

PantaRay: Ray tracing • Shading of bake sets

– Point stream into batches

– Simple ray tracer: CPU

• Simple reflection occlusion

• Area light shadow shaders

– Massively parallel ray tracer: GPU

• Complex spherical sampling queries – SH occlusion

– Indirect lighting shaders

• Billions of points per scene compute-intensive, LOD

Page 23: PantaRay · 2015. 7. 29. · [Ram01] Ravi Ramamoorthi and Pat Hanrahan. An efficient representation for irradiance environment maps. In Proceedings of the 28th annual conference on

computer graphics & visualization

PantaRay: Fast Ray-traced Occlusion Caching of Massive Scenes Marie-Lena Eckert

PantaRay: Ray tracing - LOD

Batch 1 Batch 2

• Determine and stream required bricks

Page 24: PantaRay · 2015. 7. 29. · [Ram01] Ravi Ramamoorthi and Pat Hanrahan. An efficient representation for irradiance environment maps. In Proceedings of the 28th annual conference on

computer graphics & visualization

PantaRay: Fast Ray-traced Occlusion Caching of Massive Scenes Marie-Lena Eckert

Batch 1

• 3 rays emanating from each surface point

• Each ray represents solid angle 𝜎 =2𝜋

𝑛, 𝑛 = 3

Batch 2

𝜎 =2𝜋

𝑛

PantaRay: Ray tracing - LOD

Page 25: PantaRay · 2015. 7. 29. · [Ram01] Ravi Ramamoorthi and Pat Hanrahan. An efficient representation for irradiance environment maps. In Proceedings of the 28th annual conference on

computer graphics & visualization

PantaRay: Fast Ray-traced Occlusion Caching of Massive Scenes Marie-Lena Eckert

• Bricks loaded if size(BV(brick)) >= avg(dist(rays))

Batch 1 Batch 2

PantaRay: Ray tracing - LOD

Page 26: PantaRay · 2015. 7. 29. · [Ram01] Ravi Ramamoorthi and Pat Hanrahan. An efficient representation for irradiance environment maps. In Proceedings of the 28th annual conference on

computer graphics & visualization

PantaRay: Fast Ray-traced Occlusion Caching of Massive Scenes Marie-Lena Eckert

• Partially transparent Bounding Volumes (BV)

Batch 1 Batch 2

PantaRay: Ray tracing - LOD

Page 27: PantaRay · 2015. 7. 29. · [Ram01] Ravi Ramamoorthi and Pat Hanrahan. An efficient representation for irradiance environment maps. In Proceedings of the 28th annual conference on

computer graphics & visualization

PantaRay: Fast Ray-traced Occlusion Caching of Massive Scenes Marie-Lena Eckert

• Custom far-field for batch 1

Batch 1 Batch 2

PantaRay: Ray tracing - LOD

Page 28: PantaRay · 2015. 7. 29. · [Ram01] Ravi Ramamoorthi and Pat Hanrahan. An efficient representation for irradiance environment maps. In Proceedings of the 28th annual conference on

computer graphics & visualization

PantaRay: Fast Ray-traced Occlusion Caching of Massive Scenes Marie-Lena Eckert

• 𝑚 GPUs

–1

𝑚 points, subset focus on coherence

• Trace through brick hierarchy – [Ail09] while-while traversal kernel

• Intersection computation – high scene complexity, high tree depth low

Single Instruction Multiple Thread (SIMT) utilization – increase from 20% to 50-60%

PantaRay: Generate and trace rays

Page 29: PantaRay · 2015. 7. 29. · [Ram01] Ravi Ramamoorthi and Pat Hanrahan. An efficient representation for irradiance environment maps. In Proceedings of the 28th annual conference on

computer graphics & visualization

PantaRay: Fast Ray-traced Occlusion Caching of Massive Scenes Marie-Lena Eckert

Conclusion: Summary • Raised 2 orders of magnitude in terms of both

speed and scene size

• Comparison AS generation

– [Wald05]: 350M triangles: 1d

– PantaRay: 575M micropolygons: 54min

• Custom far-field low I/O (few MBs per batch)

• Ray tracing speed: up to 22M shaded rays per second

Page 30: PantaRay · 2015. 7. 29. · [Ram01] Ravi Ramamoorthi and Pat Hanrahan. An efficient representation for irradiance environment maps. In Proceedings of the 28th annual conference on

computer graphics & visualization

PantaRay: Fast Ray-traced Occlusion Caching of Massive Scenes Marie-Lena Eckert

Conclusion: Summary I/O: 2MB per batch, trace time: 16 h, 41 m, 8.7M shaded rays/s

Page 31: PantaRay · 2015. 7. 29. · [Ram01] Ravi Ramamoorthi and Pat Hanrahan. An efficient representation for irradiance environment maps. In Proceedings of the 28th annual conference on

computer graphics & visualization

PantaRay: Fast Ray-traced Occlusion Caching of Massive Scenes Marie-Lena Eckert

Conclusion: Critics • Loss of details in computing visibility term (SH,

LOD)

• Float precision: missing some intersections

• Parallel construction of AS

Page 32: PantaRay · 2015. 7. 29. · [Ram01] Ravi Ramamoorthi and Pat Hanrahan. An efficient representation for irradiance environment maps. In Proceedings of the 28th annual conference on

computer graphics & visualization

PantaRay: Fast Ray-traced Occlusion Caching of Massive Scenes Marie-Lena Eckert

Thank you!

Page 33: PantaRay · 2015. 7. 29. · [Ram01] Ravi Ramamoorthi and Pat Hanrahan. An efficient representation for irradiance environment maps. In Proceedings of the 28th annual conference on

computer graphics & visualization

PantaRay: Fast Ray-traced Occlusion Caching of Massive Scenes Marie-Lena Eckert

PantaRay: References [Ail09]

AILA, T., AND LAINE, S. 2009. Understanding the efficiency of ray

traversal on GPUs. In Proc. High-Performance Graphics, 145–149.

[Ram01]

Ravi Ramamoorthi and Pat Hanrahan. An efficient representation for

irradiance environment maps. In Proceedings of the 28th annual conference on Computer graphics and interactive techniques, S IGGRAPH '01, pages 497-500, New York, NY, USA, 2001. ACM.

[Wald05]

Ingo Wald, Andreas Dietrich, and Philipp Slusallek. An interactive out-

of-core rendering framework for visualizing massively complex models. In ACM SIGGRAPH 2005 Courses, SIGGRAPH '05, New York, NY, USA, 2005. ACM.

Page 34: PantaRay · 2015. 7. 29. · [Ram01] Ravi Ramamoorthi and Pat Hanrahan. An efficient representation for irradiance environment maps. In Proceedings of the 28th annual conference on

computer graphics & visualization

PantaRay: Fast Ray-traced Occlusion Caching of Massive Scenes Marie-Lena Eckert

Trace rays algorithm

Page 35: PantaRay · 2015. 7. 29. · [Ram01] Ravi Ramamoorthi and Pat Hanrahan. An efficient representation for irradiance environment maps. In Proceedings of the 28th annual conference on

computer graphics & visualization

PantaRay: Fast Ray-traced Occlusion Caching of Massive Scenes Marie-Lena Eckert

Compute intersections algorithm