+ All Categories
Transcript
Page 1: Ray Tracing with the VLF (VLF-RT)

Virtual Light Field [email protected] College London

Ray Tracing with the VLF(VLF-RT)

Jesper [email protected]

GR/R13685/01

Research funded by:

Page 2: Ray Tracing with the VLF (VLF-RT)

VLF Project

VLF-RT

Page 3: Ray Tracing with the VLF (VLF-RT)

VLF Project

Aims of the Virtual Light Field

Efficient data structure for storing directionally dependent radiance

Fast generation (propagation of radiance)

Fast rendering of novel views from the data structure

Page 4: Ray Tracing with the VLF (VLF-RT)

VLF Project

Aims of VLF-RT

Make use of the (existing) VLF data structure

Provide fast ray queries for arbitrary rays

Provide accurate ray queries for arbitrary rays (conservative)

Page 5: Ray Tracing with the VLF (VLF-RT)

VLF Project

Data structure

Use existing pre-computed tile visibility?

Yes, but tile visibility must be accurate and inclusive, openGL/D3D is approximate

GDI/D3D/OGL e.g. use integer top left rasterization convention

If not done properly:- nasty aliasing….

Page 6: Ray Tracing with the VLF (VLF-RT)

VLF Project

Rasterization to tiles

Page 7: Ray Tracing with the VLF (VLF-RT)

VLF Project

Rasterization to tiles (cont’d)

Page 8: Ray Tracing with the VLF (VLF-RT)

VLF Project

Rasterization to tiles (cont’d)

Rasterization is done for each polygon in each direction

Creates a list of polygon indices for each tile Many tiles will be empty Depth information is lost Polygon A

Polygon B

Polygon C

PSF Tiles

Page 9: Ray Tracing with the VLF (VLF-RT)

VLF Project

Tile BSP trees

Tiles that intersect complex regions of a scene may have long tile lists

Acceleration structure in effect only 2D Introduce 1D BSP tree for a tile along the

direction of the PSF the tile belongs to We use spatial median subdivision and force

polygons to BSP leaves at a fixed depth

Page 10: Ray Tracing with the VLF (VLF-RT)

VLF Project

Tile BSP trees (cont’d)

Example of a tile BSP tree

TILE BSP

A A B B C D F FE

PSF

TILEI

AB

C DF

E

TILEj

TILEk

Page 11: Ray Tracing with the VLF (VLF-RT)

VLF Project

Ray projection

The algorithm for intersecting a ray with the acceleration structure is seemingly simple:1) Find PSF that corresponds to ray2) Project ray origin onto PSF to find tile3) Intersect polygons whose id is in the tile4) Return intersected id of closes intersection

However, the ray may not correspond exactly to a PSF in the set

Page 12: Ray Tracing with the VLF (VLF-RT)

VLF Project

Ray projection (cont’d)

Project ray onto nearest PSF Compute a list of intersected tiles with

relevant t-intersection ranges This can be done all at once,

or incrementally Incremental approach saves

work due to early raytermination

Rayj RayiPSF

Tiles 1 2 3 4 5

Page 13: Ray Tracing with the VLF (VLF-RT)

VLF Project

Ray projection (cont’d)

Correct imageDirectional resolution (.5K 2K 8K)

Tile reso

lutio

n (16

2 322 64

2)

Page 14: Ray Tracing with the VLF (VLF-RT)

VLF Project

Ray intersection overview

To intersect a ray it is projected to the nearest PSF Tiles are visited in near-far order, incrementally BSP tree for a tile is searched in near-far order for

the intersection range defined by the rays intersection with the tile

Ray can terminate as soon as intersection is found in a BSP node

Traversal must be fastBSP traversal is recursive, we avoid explicit recursion by unrolling and using a stack

Page 15: Ray Tracing with the VLF (VLF-RT)

VLF Project

Intersection kernels

The acceleration structure provides identifiers of polygons that may intersect the ray, to resolve these we use:

Wald’s optimized intersection- Requires pre-computed information- But very fast

Möller-Trumbore intersection- Only requires triangle vertices- But significantly slower than Wald

Both implemented as macros to ensure inlining

Page 16: Ray Tracing with the VLF (VLF-RT)

VLF Project

Intersection kernels (Wald)

Barycentric projection method Pre-compute and store normals, edges, projection

case, and simplify terms Triangle datastructure is 48bytes + vertices Use cache alignment, ordering matched to algorithm

flow Worst case 10 muls, 1 div, 11 adds Best case (depth rejection) 4 muls, 1 div, 5 adds Wald, I, “Realtime Ray Tracing and Interactive

Global Illumination”, PhD Thesis, 2004.

Page 17: Ray Tracing with the VLF (VLF-RT)

VLF Project

Intersection kernels (Möller-Trumbore)

Minimum storage, only triangle vertices No pre-computation But no early depth rejection Worst case 27 muls, 1 div, 23 adds Best case

- barycentric u rejection 12 muls, 16 adds - barycentric v rejection 21 muls, 21 adds

Good for unstructured motion, more on this later… Möller, T, Trumbore, B, “Fast, minimum storage ray-triangle

intersection”. Journal of graphics tools, 2(1):21-28, 1997.

Page 18: Ray Tracing with the VLF (VLF-RT)

VLF Project

Intersection kernels

Intersection Kernels

0

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

1 31 61 91 121 151 181 211 241 271 301 331 361 391 421 451

Frame

Ren

der

ing

tim

e

WALDMÖLLER-TRUMBORE

In the walkthrough scenario shown below the Wald intersectionkernel was 20% faster than Möller-Trumbore

Page 19: Ray Tracing with the VLF (VLF-RT)

VLF Project

Rendering

Flexible ray tracing framework Shading

- Simple diffuse- OpenGL like local illumination- Full Whitted ray tracing

Page 20: Ray Tracing with the VLF (VLF-RT)

VLF Project

Rendering (cont’d)

Spatial median 3D BSP acceleration structure Depth first and Breadth first ray tracing Single and multi-threaded Support triangles only – automatic triangulation 3D file format support:

- Alias Wavefront (OBJ)- Benchmark for Animated Ray Tracing (BART)- Procedural random triangle clouds

Page 21: Ray Tracing with the VLF (VLF-RT)

VLF Project

Results

Early results on artificial scenes showed promising performance

Recent results on realistic scenes confirm this Comparison with single ray 3D BSP ray tracing

(CRT) favors VLT-RT

Page 22: Ray Tracing with the VLF (VLF-RT)

VLF Project

Results (random scene)

Walkthrough of 16K randomly distributed triangles Superior performance throughout Less inter frame variation

Page 23: Ray Tracing with the VLF (VLF-RT)

VLF Project

Results (random scene)

SHOW RANDOM SCENE VIDEO

Page 24: Ray Tracing with the VLF (VLF-RT)

VLF Project

Results (classroom scene)

Walkthrough of 46K realistic scene Superior performance on average Again, less inter frame variation Memory consumption high (>1GB)

Walkthrough

0.15

0.2

0.25

0.3

0.35

0.4

0.45

0.5

1 51 101 151 201 251 301 351 401

Frame

Tim

e

VF-RT_64_7

VF-RT_80_5

VF-RT_90_6

VF-RT_95_6

WALD_20

Page 25: Ray Tracing with the VLF (VLF-RT)

VLF Project

Results (classroom scene)

SHOW CLASSROOM VIDEO

Page 26: Ray Tracing with the VLF (VLF-RT)

VLF Project

Future work

SIMD extensions for ray bundle intersection Hierarchical multi VLF approach Analytical objects

- spheres- parametric surfaces

Transparency (trivial, but missing)

Page 27: Ray Tracing with the VLF (VLF-RT)

VLF Project

Publications

All publications can be found here: http://www.cs.ucl.ac.uk/research/vr/Projects/VLF/Media/


Top Related