Real Time Ray Tracing

Similar documents
Ray Tracing Performance

Accelerating Ray-Tracing

Computer Graphics. - Ray-Tracing II - Hendrik Lensch. Computer Graphics WS07/08 Ray Tracing II

Acceleration Data Structures

Acceleration Structure for Animated Scenes. Copyright 2010 by Yong Cao

Ray Tracing. Computer Graphics CMU /15-662, Fall 2016

INFOGR Computer Graphics. J. Bikker - April-July Lecture 11: Acceleration. Welcome!

Intersection Acceleration

SPATIAL DATA STRUCTURES. Jon McCaffrey CIS 565

B-KD Trees for Hardware Accelerated Ray Tracing of Dynamic Scenes

Computer Graphics. - Spatial Index Structures - Philipp Slusallek

Fast BVH Construction on GPUs

MULTI-LEVEL GRID STRATEGIES FOR RAY TRACING Improving Render Time Performance for Row Displacement Compressed Grids

CS580: Ray Tracing. Sung-Eui Yoon ( 윤성의 ) Course URL:

RACBVHs: Random Accessible Compressed Bounding Volume Hierarchies

Spatial Data Structures

Specialized Acceleration Structures for Ray-Tracing. Warren Hunt

Spatial Data Structures

Ray Tracing III. Wen-Chieh (Steve) Lin National Chiao-Tung University

Lecture 2 - Acceleration Structures

Accelerated Raytracing

Parallel Physically Based Path-tracing and Shading Part 3 of 2. CIS565 Fall 2012 University of Pennsylvania by Yining Karl Li

INFOMAGR Advanced Graphics. Jacco Bikker - February April Welcome!

COMP 4801 Final Year Project. Ray Tracing for Computer Graphics. Final Project Report FYP Runjing Liu. Advised by. Dr. L.Y.

Lecture 4 - Real-time Ray Tracing

Ray-Box Culling for Tree Structures

Ray Intersection Acceleration

Simpler and Faster HLBVH with Work Queues

Adaptive Assignment for Real-Time Raytracing

REDUCING RENDER TIME IN RAY TRACING

Spatial Data Structures

Spatial Data Structures

Anti-aliased and accelerated ray tracing. University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell

Ray Tracing with Multi-Core/Shared Memory Systems. Abe Stephens

Acceleration. Digital Image Synthesis Yung-Yu Chuang 10/11/2007. with slides by Mario Costa Sousa, Gordon Stoll and Pat Hanrahan

Spatial Data Structures

Interactive Ray Tracing: Higher Memory Coherence

Improving Memory Space Efficiency of Kd-tree for Real-time Ray Tracing Byeongjun Choi, Byungjoon Chang, Insung Ihm

HLBVH: Hierarchical LBVH Construction for Real Time Ray Tracing of Dynamic Geometry. Jacopo Pantaleoni and David Luebke NVIDIA Research

improving raytracing speed

Exploiting Local Orientation Similarity for Efficient Ray Traversal of Hair and Fur

Ray Intersection Acceleration

Ray Tracing Acceleration. CS 4620 Lecture 20

CPSC / Sonny Chan - University of Calgary. Collision Detection II

Topics. Ray Tracing II. Intersecting transformed objects. Transforming objects

Anti-aliased and accelerated ray tracing. University of Texas at Austin CS384G - Computer Graphics

MSBVH: An Efficient Acceleration Data Structure for Ray Traced Motion Blur

MSBVH: An Efficient Acceleration Data Structure for Ray Traced Motion Blur

Comparison of hierarchies for occlusion culling based on occlusion queries

Topics. Ray Tracing II. Transforming objects. Intersecting transformed objects

Towards Interactive Global Illumination Effects via Sequential Monte Carlo Adaptation. Carson Brownlee Peter S. Shirley Steven G.

Fast Agglomerative Clustering for Rendering

Ray Casting Deformable Models on the GPU

Ray Tracing: State of the Field Report

Ray Tracing Acceleration Data Structures

Accelerating Geometric Queries. Computer Graphics CMU /15-662, Fall 2016

Holger Dammertz August 10, The Edge Volume Heuristic Robust Triangle Subdivision for Improved BVH Performance Holger Dammertz, Alexander Keller

Efficient Clustered BVH Update Algorithm for Highly-Dynamic Models. Kirill Garanzha

Announcements. Written Assignment2 is out, due March 8 Graded Programming Assignment2 next Tuesday

Acceleration Data Structures for Ray Tracing

Logistics. CS 586/480 Computer Graphics II. Questions from Last Week? Slide Credits

Embree Ray Tracing Kernels: Overview and New Features

Ray Tracing. Cornell CS4620/5620 Fall 2012 Lecture Kavita Bala 1 (with previous instructors James/Marschner)

Scene Management. Video Game Technologies 11498: MSc in Computer Science and Engineering 11156: MSc in Game Design and Development

Sequential Monte Carlo Adaptation in Low-Anisotropy Participating Media. Vincent Pegoraro Ingo Wald Steven G. Parker

Fast and Lazy Build of Acceleration Structures from Scene Hierarchies

Fast kd-tree Construction with an Adaptive Error-Bounded Heuristic

A Hardware Pipeline for Accelerating Ray Traversal Algorithms on Streaming Processors

State of the Art in Ray Tracing Animated Scenes

Grid Creation Strategies for Efficient Ray Tracing

Part IV. Review of hardware-trends for real-time ray tracing

Homework 1: Implicit Surfaces, Collision Detection, & Volumetric Data Structures. Loop Subdivision. Loop Subdivision. Questions/Comments?

Ray Tracing Acceleration. CS 4620 Lecture 22

Asynchronous BVH Construction for Ray Tracing Dynamic Scenes on Parallel Multi-Core Architectures

Ray Tracing with Spatial Hierarchies. Jeff Mahovsky & Brian Wyvill CSC 305

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo

AN EXPERIMENTAL COMPARISON OF ACCELERATION SCHEMES FOR DENSELY OCCLUDED ENVIRONMENTS

Computer Graphics Ray Casting. Matthias Teschner

Fast, Effective BVH Updates for Animated Scenes

Enhancing Traditional Rasterization Graphics with Ray Tracing. October 2015

Sung-Eui Yoon ( 윤성의 )

Speeding Up Ray Tracing. Optimisations. Ray Tracing Acceleration

Accelerating Shadow Rays Using Volumetric Occluders and Modified kd-tree Traversal

kd-trees for Volume Ray-Casting

Grid-based SAH BVH construction on a GPU

Lecture 11 - GPU Ray Tracing (1)

Advanced Ray Tracing

Interactive Isosurface Ray Tracing of Large Octree Volumes

Lecture 11: Ray tracing (cont.)

Spatial Data Structures and Speed-Up Techniques. Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology

Early Split Clipping for Bounding Volume Hierarchies

Acceleration Structures. CS 6965 Fall 2011

EDAN30 Photorealistic Computer Graphics. Seminar 2, Bounding Volume Hierarchy. Magnus Andersson, PhD student

SAH guided spatial split partitioning for fast BVH construction. Per Ganestam and Michael Doggett Lund University

COMP 175: Computer Graphics April 11, 2018

Bounding Volume Hierarchy Optimization through Agglomerative Treelet Restructuring

Accelerating Ray Tracing

Questions from Last Week? Extra rays needed for these effects. Shadows Motivation

Acceleration Data Structures. Michael Doggett Department of Computer Science Lund university

CS 431/636 Advanced Rendering Techniques

Transcription:

Real Time Ray Tracing Programação 3D para Simulação de Jogos Vasco Costa

Ray tracing? Why? How? P3DSJ Real Time Ray Tracing Vasco Costa 2

Real time ray tracing : example Source: NVIDIA P3DSJ Real Time Ray Tracing Vasco Costa 3

Exploiting vector parallelism exploit ray coherence for ray triangle intersections P3DSJ Real Time Ray Tracing Vasco Costa 4

Ray packets / Triangle packets (summary) exploit ray coherence for ray triangle intersections Pros common subexpressions for intersections with same ray origin are eliminated. better cache coherence. Cons mostly useful for primary rays (ray packets). useful only if there are enough triangles in the scene (triangle packets). Due to fine granularity usually employed in combination with vector parallelism. P3DSJ Real Time Ray Tracing Vasco Costa 5

Exploiting thread parallelism Task to be divided should have large enough granularity. Ray scene intersection is usually divided among threads: a 1024x1024 display needs tracing of over 1 million rays How to divide the ray workload? P3DSJ Real Time Ray Tracing Vasco Costa 6

Ray generation & distribution Thread workload division matters. Simple chequerboard distribution (left) scales well in pratice. Other ray generation schemes (e.g. Z order) are sometimes used. P3DSJ Real Time Ray Tracing Vasco Costa 7

Z order ray generation Idea is that neighbouring display areas have similar complexity. Better cache coherence during tracing. Source: Wikipedia P3DSJ Real Time Ray Tracing Vasco Costa 8

Adaptive supersampling Instead of tracing rays for every pixel, the display is coarsely sampled first. More rays are traced in areas where there is more variability and detail. May introduce rendering errors, worsen cache coherency, imbalance thread distribution. P3DSJ Real Time Ray Tracing Vasco Costa 9

Spatial subdivision (1) Ray tracing algorithm is easy to paralelize. However number of ray triangle intersections is still huge so some sort of spatial subdivision is required to accelerate rayscene queries for scenes with many triangles. There is no optimum spatial subdivision scheme for all scenes: is geometry static? locally static? or dynamic? is scene triangle density regular? or irregular? Commonly used spatial subdivision schemes include: bounding volume hierarchies (BVH), KD trees, grids. P3DSJ Real Time Ray Tracing Vasco Costa 10

Spatial subdivision (2) BVH fast updates (for rigid bodies), medium memory consumption, expensive traversal, ok to parallelize (recursive, variable branching factor). KD tree slow updates, low memory consumption, cheap traversal, hard to paralellize (recursive, low branching factor). Grid fast updates (for dynamic geometry), high memory consumption, hard to predict rendering performance, easy to parallelize (non recursive). P3DSJ Real Time Ray Tracing Vasco Costa 11

Spatial subdivision (3) Implementation details can cause a high performance impact: Grids and BVHs compress better than KD trees. In the case of grids using compression for empty cells can reduce memory consumption so that it is lower than uncompressed KD trees. Some KD tree implementations have faster updates for rigid bodies. BVHs and KD trees have better performance than grids for static scenes with non regular geometry. This is due to the use of Surface Area Heuristics (SAH) for calculating the split boxes/planes. How to compute the splits for spatial subdivision? P3DSJ Real Time Ray Tracing Vasco Costa 12

Grid heuristics The goal of traditional grid heuristics is to reduce memory consumption. Hence an heuristic that strives to have linear memory consumption versus the number of primitives is commonly employed. Example: dim[ x, y, z] = density 3 numtriangles where density is some fixed value. P3DSJ Real Time Ray Tracing Vasco Costa 13

KD tree / BVH heuristics A top down split method is usually employed. Examples: split axis : splitting along the middle of the largest extent. split location : splitting by the median of the triangle geometry. surface area heuristic (SAH) : greedy search which tries to minimize a cost function. Heuristic selection can markedly impact performance. Surface Area Heuristics are state of the art and can improve render time performance over 100% at the cost of construction time. Surface Area Heuristic (SAH) example: Cost(cell) = = Ctrav + ProbHit(L) x Cost(L) + ProbHit(R) x Cost(R) = Ctrav + SA(L) x NumTriangles(L) + SA(R) x NumTriangles(R) P3DSJ Real Time Ray Tracing Vasco Costa 14

KD tree heuristics : test scene Source: Ray Tracing Performance, Gordon Stoll, SIGGRAPH 2006 P3DSJ Real Time Ray Tracing Vasco Costa 15

KD tree heuristics : split axis Source: Ray Tracing Performance, Gordon Stoll, SIGGRAPH 2006 P3DSJ Real Time Ray Tracing Vasco Costa 16

KD tree heuristics : split location Source: Ray Tracing Performance, Gordon Stoll, SIGGRAPH 2006 P3DSJ Real Time Ray Tracing Vasco Costa 17

KD tree heuristics : SAH Source: Ray Tracing Performance, Gordon Stoll, SIGGRAPH 2006 P3DSJ Real Time Ray Tracing Vasco Costa 18

Quake Wars : Ray Traced (real time ray tracing) Source: Intel P3DSJ Real Time Ray Tracing Vasco Costa 19

Aurora (real time ray tracing with primary rays only, interactive with secondary rays) P3DSJ Real Time Ray Tracing Vasco Costa 20

NVIDIA Fermi Demo (real time ray tracing & interactive path tracing) Source: NVIDIA P3DSJ Real Time Ray Tracing Vasco Costa 21

Mental Images iray (interactive ray tracing & global illumination) Source: CGArchitect.com P3DSJ Real Time Ray Tracing Vasco Costa 22

References State of the Art in Ray Tracing Animated Scenes Ingo Wald, William Mark, Johannes Günther, Solomon Boulos, Thiago Ize, Warren Hunt, Steven Parker, and Peter Shirley Eurographics (2007) Real time Ray Tracing through the Eyes of a Game Developer Jacco Bikker IEEE/Eurographics Symposium on Interactive Ray Tracing (2007) Physically Based Rendering: From Theory to Implementation Matt Pharr, Greg Humphreys Morgan Kaufmann (2004) P3DSJ Real Time Ray Tracing Vasco Costa 23