voxel cone tracing and sparse voxel octree for real-time global...

31
Voxel Cone Tracing and Sparse Voxel Octree for Real-time Global Illumination Cyril Crassin NVIDIA Research

Upload: others

Post on 04-Aug-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Voxel Cone Tracing and Sparse Voxel Octree for Real-time Global …developer.download.nvidia.com/GTC/PDF/GTC2012/... · 2012-09-12 · Times in ms . OpenGL Insights . Octree-Based

Voxel Cone Tracing and Sparse Voxel Octree for

Real-time Global Illumination

Cyril Crassin NVIDIA Research

Page 2: Voxel Cone Tracing and Sparse Voxel Octree for Real-time Global …developer.download.nvidia.com/GTC/PDF/GTC2012/... · 2012-09-12 · Times in ms . OpenGL Insights . Octree-Based

Global Illumination

Indirect effects Important for realistic image synthesis

Direct lighting Direct+Indirect lighting

Page 3: Voxel Cone Tracing and Sparse Voxel Octree for Real-time Global …developer.download.nvidia.com/GTC/PDF/GTC2012/... · 2012-09-12 · Times in ms . OpenGL Insights . Octree-Based

8ms @ 512x512 – 27ms @ 720p - 62ms @ 1080p Voxel-Based GI

Page 4: Voxel Cone Tracing and Sparse Voxel Octree for Real-time Global …developer.download.nvidia.com/GTC/PDF/GTC2012/... · 2012-09-12 · Times in ms . OpenGL Insights . Octree-Based

It can run in a game ! • EPIC Games : SVOgi

Voxel-based GI

Page 5: Voxel Cone Tracing and Sparse Voxel Octree for Real-time Global …developer.download.nvidia.com/GTC/PDF/GTC2012/... · 2012-09-12 · Times in ms . OpenGL Insights . Octree-Based

DEMO

Page 6: Voxel Cone Tracing and Sparse Voxel Octree for Real-time Global …developer.download.nvidia.com/GTC/PDF/GTC2012/... · 2012-09-12 · Times in ms . OpenGL Insights . Octree-Based

Sparse Voxel Octree Detailed geometry rendering

Structured LODs

Laine and Karras (NVIDIA) 2010

Crassin et al. 2009 (GigaVoxels)

Olick. 2008

Page 7: Voxel Cone Tracing and Sparse Voxel Octree for Real-time Global …developer.download.nvidia.com/GTC/PDF/GTC2012/... · 2012-09-12 · Times in ms . OpenGL Insights . Octree-Based
Page 8: Voxel Cone Tracing and Sparse Voxel Octree for Real-time Global …developer.download.nvidia.com/GTC/PDF/GTC2012/... · 2012-09-12 · Times in ms . OpenGL Insights . Octree-Based

GPU Voxel Octree

Linked nodes in linear video memory (Octree Pool)

2x2x2 nodes tiles 1 pointer per node to a node-tile

Voxels stored into a 3D texture (Brick Pool)

Allows hardware tri-linear interpolation 1

2

4 5

8 6 7

3

9

1 2 3 4 5

Octree pool Li

near

Mem

ory

6 7 8 9

3D T

extu

re

Brick pool

Page 9: Voxel Cone Tracing and Sparse Voxel Octree for Real-time Global …developer.download.nvidia.com/GTC/PDF/GTC2012/... · 2012-09-12 · Times in ms . OpenGL Insights . Octree-Based

Hybrid rendering pipeline Rasterized primary rays

GPU pipeline optimized for direct visibility Cone-traced secondary rays

Flexibility and scalability

Forward or deferred rendering

Hybrid rendering pipeline

Page 10: Voxel Cone Tracing and Sparse Voxel Octree for Real-time Global …developer.download.nvidia.com/GTC/PDF/GTC2012/... · 2012-09-12 · Times in ms . OpenGL Insights . Octree-Based

Voxel cone tracing

Geometry pre-filtering Traced like a participating media

Volume ray-casting

Voxel representation Scene geometry : Opacity field + Incoming radiance

3D MIP-map pyramid of pre-filtered values

Quadrilinearly interpolated samples

n r

l

Page 11: Voxel Cone Tracing and Sparse Voxel Octree for Real-time Global …developer.download.nvidia.com/GTC/PDF/GTC2012/... · 2012-09-12 · Times in ms . OpenGL Insights . Octree-Based

Rendering algorithm

1. Light pass (es) Bake irradiance (RSM)

2. Filtering pass Down-sample radiance in the octree

3. Camera pass For each visible fragment:

Gather indirect radiance

Diffuse cones

l

n View direction

d

Light source

n

Page 12: Voxel Cone Tracing and Sparse Voxel Octree for Real-time Global …developer.download.nvidia.com/GTC/PDF/GTC2012/... · 2012-09-12 · Times in ms . OpenGL Insights . Octree-Based

Scalable lighting rep. ! Independent of geometric complexity Control over rendering time

Large cones Precision / Light leaking

But always smooth

Never noisy !!

Discussion

Page 13: Voxel Cone Tracing and Sparse Voxel Octree for Real-time Global …developer.download.nvidia.com/GTC/PDF/GTC2012/... · 2012-09-12 · Times in ms . OpenGL Insights . Octree-Based

Indirect diffuse

Page 14: Voxel Cone Tracing and Sparse Voxel Octree for Real-time Global …developer.download.nvidia.com/GTC/PDF/GTC2012/... · 2012-09-12 · Times in ms . OpenGL Insights . Octree-Based

Indirect diffuse

Page 15: Voxel Cone Tracing and Sparse Voxel Octree for Real-time Global …developer.download.nvidia.com/GTC/PDF/GTC2012/... · 2012-09-12 · Times in ms . OpenGL Insights . Octree-Based

Specular tracing

l

d

Light source

n

Specular cone

Diffuse cones

n View direction

Voxel-based cone

Page 16: Voxel Cone Tracing and Sparse Voxel Octree for Real-time Global …developer.download.nvidia.com/GTC/PDF/GTC2012/... · 2012-09-12 · Times in ms . OpenGL Insights . Octree-Based

Indirect specular

Page 17: Voxel Cone Tracing and Sparse Voxel Octree for Real-time Global …developer.download.nvidia.com/GTC/PDF/GTC2012/... · 2012-09-12 · Times in ms . OpenGL Insights . Octree-Based

Indirect specular

Page 18: Voxel Cone Tracing and Sparse Voxel Octree for Real-time Global …developer.download.nvidia.com/GTC/PDF/GTC2012/... · 2012-09-12 · Times in ms . OpenGL Insights . Octree-Based
Page 19: Voxel Cone Tracing and Sparse Voxel Octree for Real-time Global …developer.download.nvidia.com/GTC/PDF/GTC2012/... · 2012-09-12 · Times in ms . OpenGL Insights . Octree-Based
Page 20: Voxel Cone Tracing and Sparse Voxel Octree for Real-time Global …developer.download.nvidia.com/GTC/PDF/GTC2012/... · 2012-09-12 · Times in ms . OpenGL Insights . Octree-Based

Multiple-bounces

Page 21: Voxel Cone Tracing and Sparse Voxel Octree for Real-time Global …developer.download.nvidia.com/GTC/PDF/GTC2012/... · 2012-09-12 · Times in ms . OpenGL Insights . Octree-Based

Voxel Ambient Occlusion

Scene model courtesy of Guillermo M. Leal Llaguno

AO cones

n

+ Distant + off-screen occlusions

- Resolution 5.5ms @ 1280x720

Page 22: Voxel Cone Tracing and Sparse Voxel Octree for Real-time Global …developer.download.nvidia.com/GTC/PDF/GTC2012/... · 2012-09-12 · Times in ms . OpenGL Insights . Octree-Based

One cone per pixel The smoother, the faster to compute !

Voxel soft shadows

Area light source

Occluder

3-9ms @ 1280x720

Page 23: Voxel Cone Tracing and Sparse Voxel Octree for Real-time Global …developer.download.nvidia.com/GTC/PDF/GTC2012/... · 2012-09-12 · Times in ms . OpenGL Insights . Octree-Based

Publications

Interactive indirect illumination using voxel cone tracing

C. Crassin, F. Neyret, M. Sainz, S. Green, E. Eisemann

Computer Graphics Forum (Proc. of Pacific Graphics 2011) http://research.nvidia.com/publication/interactive-indirect-illumination-using-voxel-cone-tracing

I3D 2011 Poster http://maverick.inria.fr/Publications/2011/CNSGE11/

Siggraph 2011 Talk http://maverick.inria.fr/Publications/2011/CNSGE11a/

Page 24: Voxel Cone Tracing and Sparse Voxel Octree for Real-time Global …developer.download.nvidia.com/GTC/PDF/GTC2012/... · 2012-09-12 · Times in ms . OpenGL Insights . Octree-Based

Dynamic Voxelization

Entirely done using the GPU graphics pipeline

Sparse (No plain grid allocation)

Two modes : Static environment

Pre-voxelized (~20ms) Dynamic objects

Added to the structure at runtime (~4-5ms)

Page 25: Voxel Cone Tracing and Sparse Voxel Octree for Real-time Global …developer.download.nvidia.com/GTC/PDF/GTC2012/... · 2012-09-12 · Times in ms . OpenGL Insights . Octree-Based

One pass voxelization pipeline

Thin surface voxelization

x

x y y

z

z

Y-proj

Z-proj

X-proj

Normal

Triangle Dominant

Axis Selection

Triangle Projection

Voxel Attributes

Computation

Geometry Shader Fragment Shader

Hard

war

e Se

tup/

Rast

er.

Write to 3D surface

Edges Shifting

Fragments Clipping

Conservative Rasterization

VS

Page 26: Voxel Cone Tracing and Sparse Voxel Octree for Real-time Global …developer.download.nvidia.com/GTC/PDF/GTC2012/... · 2012-09-12 · Times in ms . OpenGL Insights . Octree-Based

Sparse Octree construction

Sparse voxelization No plain grid allocation

Two steps: 1. Octree subdivision 2. Values MIP-mapping

0

1

2 0

1

2

Page 27: Voxel Cone Tracing and Sparse Voxel Octree for Real-time Global …developer.download.nvidia.com/GTC/PDF/GTC2012/... · 2012-09-12 · Times in ms . OpenGL Insights . Octree-Based

Top-down octree construction Compute + Graphics

Octree construction

Node queue

1 2 3 4 0

Create New Node Tiles

Node queue

1 2 3 4 5 6 7 8 0

9 10 11 12 13 14 15 16

1 thread per node

Voxelize Mesh at level resolution

0

1

2

Tag octree nodes

1 thread per voxel-fragment

Page 28: Voxel Cone Tracing and Sparse Voxel Octree for Real-time Global …developer.download.nvidia.com/GTC/PDF/GTC2012/... · 2012-09-12 · Times in ms . OpenGL Insights . Octree-Based

Results

9 levels octree (512^3) RGBA32F

Kepler GK104 performance 30% - 58% faster than Fermi GF100 Atomic merging up to 80% faster.

Times in ms

Page 29: Voxel Cone Tracing and Sparse Voxel Octree for Real-time Global …developer.download.nvidia.com/GTC/PDF/GTC2012/... · 2012-09-12 · Times in ms . OpenGL Insights . Octree-Based

OpenGL Insights

Octree-Based Sparse Voxelization Using The GPU Hardware Rasterizer Cyril Crassin and Simon Green

Just released at Siggraph 2012 Patrick Cozzi & Christophe Riccio

Page 30: Voxel Cone Tracing and Sparse Voxel Octree for Real-time Global …developer.download.nvidia.com/GTC/PDF/GTC2012/... · 2012-09-12 · Times in ms . OpenGL Insights . Octree-Based

THANKS !

Page 31: Voxel Cone Tracing and Sparse Voxel Octree for Real-time Global …developer.download.nvidia.com/GTC/PDF/GTC2012/... · 2012-09-12 · Times in ms . OpenGL Insights . Octree-Based

GTC 2013 | March 18-21 | San Jose, CA The Smartest People. The Best Ideas. The Biggest Opportunities.

Opportunities for Participation: SPEAK - Showcase your work among the elite of graphics computing - Call for Sessions: August 2012 - Call for Posters: October 2012 REGISTER - learn from the experts and network with your peers - Use promo code GM10SIGG for a 10% discount SPONSOR - Reach influential IT decision-makers

Learn more at www.gputechconf.com