Hierarchical Penumbra Casting Samuli Laine Timo Aila Helsinki University of Technology Hybrid Graphics, Ltd.

Slides:



Advertisements
Similar presentations
An Optimized Soft Shadow Volume Algorithm with Real-Time Performance Ulf Assarsson 1, Michael Dougherty 2, Michael Mounier 2, and Tomas Akenine-Möller.
Advertisements

Sven Woop Computer Graphics Lab Saarland University
Christian Lauterbach COMP 770, 2/16/2009. Overview  Acceleration structures  Spatial hierarchies  Object hierarchies  Interactive Ray Tracing techniques.
Restart Trail for Stackless BVH Traversal Samuli Laine NVIDIA Research.
RealityEngine Graphics Kurt Akeley Silicon Graphics Computer Systems.
Physically Based Real-time Ray Tracing Ryan Overbeck.
Two Methods for Fast Ray-Cast Ambient Occlusion Samuli Laine and Tero Karras NVIDIA Research.
CS 445 Greg Humphreys, Spring 2003 Ray Tracing 2: Acceleration.
Week 14 - Monday.  What did we talk about last time?  Bounding volume/bounding volume intersections.
Efficient Sparse Voxel Octrees
Christian Lauterbach COMP 770, 2/11/2009
Rasterization and Ray Tracing in Real-Time Applications (Games) Andrew Graff.
Vertices and Fragments I CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
Computer Graphics (Fall 2005) COMS 4160, Lecture 21: Ray Tracing
3D Graphics Processor Architecture Victor Moya. PhD Project Research on architecture improvements for future Graphic Processor Units (GPUs). Research.
Specialized Acceleration Structures for Ray-Tracing Warren Hunt Bill Mark.
Approximate Soft Shadows on Arbitrary Surfaces using Penumbra Wedges Tomas Akenine-Möller Ulf Assarsson Department of Computer Engineering, Chalmers University.
1 Advanced Scene Management System. 2 A tree-based or graph-based representation is good for 3D data management A tree-based or graph-based representation.
Computer Graphics Shadows
1 A Hierarchical Shadow Volume Algorithm Timo Aila 1,2 Tomas Akenine-Möller 3 1 Helsinki University of Technology 2 Hybrid Graphics 3 Lund University.
Afrigraph 2004 Massive model visualization Tutorial A: Part I Rasterization Based Approaches Andreas Dietrich Computer Graphics Group, Saarland University.
Erdem Alpay Ala Nawaiseh. Why Shadows? Real world has shadows More control of the game’s feel  dramatic effects  spooky effects Without shadows the.
Computer Graphics Mirror and Shadows
Direct Illumination with Lazy Visibility Evaluation David Hart Philip Dutré Donald P. Greenberg Cornell University SIGGRAPH 99.
Ray Tracing Primer Ref: SIGGRAPH HyperGraphHyperGraph.
Samuli Laine: A General Algorithm for Output-Sensitive Visibility PreprocessingI3D 2005, April 3-6, Washington, D.C. A General Algorithm for Output- Sensitive.
Computer Graphics 2 Lecture x: Acceleration Techniques for Ray-Tracing Benjamin Mora 1 University of Wales Swansea Dr. Benjamin Mora.
Ray Tracing and Photon Mapping on GPUs Tim PurcellStanford / NVIDIA.
Spatial Data Structures Jason Goffeney, 4/26/2006 from Real Time Rendering.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
The Visibility Problem In many environments, most of the primitives (triangles) are not visible most of the time –Architectural walkthroughs, Urban environments.
Graphics Graphics Korea University cgvr.korea.ac.kr Solid Modeling 고려대학교 컴퓨터 그래픽스 연구실.
On a Few Ray Tracing like Algorithms and Structures. -Ravi Prakash Kammaje -Swansea University.
Visible-Surface Detection Jehee Lee Seoul National University.
Rendering Overview CSE 3541 Matt Boggus. Rendering Algorithmically generating a 2D image from 3D models Raster graphics.
MIT EECS 6.837, Durand and Cutler Acceleration Data Structures for Ray Tracing.
Collaborative Visual Computing Lab Department of Computer Science University of Cape Town Graphics Topics in VR By Shaun Nirenstein.
Real-time Graphics for VR Chapter 23. What is it about? In this part of the course we will look at how to render images given the constrains of VR: –we.
Saarland University, Germany B-KD Trees for Hardware Accelerated Ray Tracing of Dynamic Scenes Sven Woop Gerd Marmitt Philipp Slusallek.
Interactive Rendering With Coherent Ray Tracing Eurogaphics 2001 Wald, Slusallek, Benthin, Wagner Comp 238, UNC-CH, September 10, 2001 Joshua Stough.
Computer Graphics 2 Lecture 7: Texture Mapping Benjamin Mora 1 University of Wales Swansea Pr. Min Chen Dr. Benjamin Mora.
David Luebke11/26/2015 CS 551 / 645: Introductory Computer Graphics David Luebke
Sample Based Visibility for Soft Shadows using Alias-free Shadow Maps Erik Sintorn – Ulf Assarsson – uffe.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Surface Rendering Methods 고려대학교 컴퓨터 그래픽스 연구실.
Interactive Ray Tracing of Dynamic Scenes Tomáš DAVIDOVIČ Czech Technical University.
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Hybrid Algorithms K. H. Ko School of Mechatronics Gwangju Institute.
Ray Tracing Fall, Introduction Simple idea  Forward Mapping  Natural phenomenon infinite number of rays from light source to object to viewer.
Bounding Volume Hierarchy. The space within the scene is divided into a grid. When a ray travels through a scene, it only passes a few boxes within the.
Advanced topics Advanced Multimedia Technology: Computer Graphics Yung-Yu Chuang 2006/01/04 with slides by Brian Curless, Zoran Popovic, Mario Costa Sousa.
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
Virtual Light Field Group University College London Ray Tracing with the VLF (VLF-RT) Jesper Mortensen
Soft Shadow Volumes for Ray Tracing
Shadows David Luebke University of Virginia. Shadows An important visual cue, traditionally hard to do in real-time rendering Outline: –Notation –Planar.
1 Shadow Rendering Techniques: Hard and Soft Author: Jamiur Rahman Supervisor: Mushfiqur Rouf Department of CSE BRAC University.
Hierarchical Occlusion Map Zhang et al SIGGRAPH 98.
BSP Tree Supplement Jyun-Ming Chen. Fall Kd-Tree and BSP tree kd-tree is a special kind of bsp tree.
Controlling Memory Consumption of Hierarchical Radiosity with Clustering iMAGIS -GRAVIR/IMAG-INRIA iMAGIS is a joint project of CNRS/INRIA/UJF/INPG Xavier.
RENDERING : Global Illumination
CSE 681 Introduction to Ray Tracing. CSE 681 Ray Tracing Shoot a ray through each pixel; Find first object intersected by ray. Image plane Eye Compute.
David Luebke3/12/2016 Advanced Computer Graphics Lecture 3: More Ray Tracing David Luebke
Shuen-Huei Guan Seminar in CMLab, NTU
Watertight Reduced-Precision Traversal Karthik Vaidyanathan Tomas Akenine-Möller Marco Salvi.
Real-Time Soft Shadows with Adaptive Light Source Sampling
Real-Time Ray Tracing Stefan Popov.
© University of Wisconsin, CS559 Fall 2004
Alias-Free Shadow Maps
A Hierarchical Shadow Volume Algorithm
Distributed Ray Tracing
Chapter XV Shadow Mapping
Introduction to Ray Tracing
Presentation transcript:

Hierarchical Penumbra Casting Samuli Laine Timo Aila Helsinki University of Technology Hybrid Graphics, Ltd.

Introduction Rendering soft shadows –As usual, area light sources are sampled with a number of light samples –Multiple receiver points to be shaded The main problem is solving the visibility –which light samples are visible to which receiver points

Light source What’s Happening? Light samples Shadow caster Visible surface Receiver points

On the Scale of the Problem With R receiver points and L light samples there are RL visibility relations to solve –For example, 1024 × 768 resolution and 256 light samples gives over 200 million relations Ray casting is the usual solution for solving the visibility relations –With T triangles, the cost of casting one shadow ray is O(log T) –Total cost becomes O(RL log T)

About Ray Casting The standard ray casting approach considers only one ray at a time –This inevitably leads to linear performance with respect to RL However, this is highly flexible –We need to generate only one ray at a time Sub-linear complexity with respect to T is achieved by placing the triangles into an acceleration hierarchy

Transposing the Algorithm Our Approach for each triangle T find all l  r rays blocked by T Ray Tracing for each receiver point r for each light sample l find triangle that blocks ray l  r Goal: sub-linear complexity w.r.t. RL Requires rearranging the rendering loop linear to R linear to L sub-linear to T linear to T sub-linear to RL

About Our Algorithm Sub-linear complexity with respect to RL is achieved by placing the receiver points and light samples into acceleration hierarchies –Therefore, all receiver points must be gathered before computing the shadows We process one triangle at a time –Good: no need for triangle BSP –Bad: linear complexity with respect to T

About Our Algorithm, part 2 The full rendering process goes as follows: 1. Ray-trace or rasterize the image without shadows to get the receiver points 2. Build the acceleration structures for receiver points and light samples 3. Process all triangles to solve the visibility relations between light samples and receiver points 4. Perform shading

The Acceleration Structures Fixed three-level bounding volume hierarchy is used for the light samples –Assuming a polygonal light source, bounding “volumes” are actually bounding polygons Standard bounding volume hierarchy is used for the receiver points –Axis-aligned boxes as bounding volumes

Light Sample Hierarchy Three levels All nodes have a bounding volume Entire light sourceLight sample groupsLight samples Root nodeMiddle nodesLeaf nodes

Storing the visibility information A bit mask with L bits is assigned for every receiver point –bit = 0: light sample is visible –bit = 1: light sample is occluded Initially, all bits are zero When a triangle is found to occlude a light sample from a receiver point, the corresponding bit is set to one

All points where a triangle may block a ray from a bounding volume are inside the corresponding penumbra volume Penumbra Volumes Penumbra volume Bounding volume in light hierarchy Triangle

Processing a Triangle First build penumbra volumes for all nodes in the light sample hierarchy For individual light samples (leaf nodes) these become hard shadow volumes

Processing a Triangle Traverse down the receiver point hierarchy Step 1: Test intersection between main penumbra volume and bounding volume of receiver node Main penumbra volume Bounding volume of entire light source Triangle Receiver node

Processing a Triangle Step 2: Update the list of active light sample groups –At beginning of traversal, all groups are active Bounding volumes of light sample groups Receiver node Triangle Remove from active group list

Processing a Triangle Step 3: Recurse into child nodes in receiver hierarchy –With pruned list of active light sample groups Main penumbra volume Bounding volume of entire light source Triangle Child nodes

Processing a Triangle Step 4: In leaf node, test receiver points vs. hard shadow volumes of light samples –Update the visibility relation bits Light samples in active groups Receiver points Triangle

Summary of Recursion Traverse down the receiver point hierarchy –Maintain list of active light sample groups Initially all groups are active –First ensure that receiver node intersects the main penumbra volume, terminate otherwise –Then prune the active light sample group list by intersecting receiver node vs. penumbra volumes of active light sample groups –In leaf node, test receiver points against hard shadow volumes of remaining light samples

Optimizations Umbra bits for early traversal termination –With receiver hierarchy rebuilding to ensure balance Active plane sets Lazy penumbra volume and hard shadow volume construction On-demand bit mask allocation Coarse blocker sorting

Extensions Multiple light sample sets –To remove banding artifacts Alpha matte textures –Often used in e.g. vegetation textures Adaptive antialiasing Volumetric light sources

Results Compared against Mental Ray 3.2 Benchmarked only the solving of the visibility relations –For Mental Ray, computed both with and without shadows and took the difference More detailed results in the paper

ResolutionPeak mem usageSpeedup factor 1280× M × M16.7 Grids 32K triangles 256 light samples

ResolutionPeak mem usageSpeedup factor 1280× M × M7.8 Flowers 903K triangles 256 light samples

ResolutionPeak mem usageSpeedup factor 1280× M × M11.4 Sponza 1.27M triangles 256 light samples

Results: Analysis Sub-linearity with respect to R –Increasing output resolution gives better relative performance –Due to hierarchical processing of receiver points Sub-linearity with respect to L –Using more light samples gives better relative performance (results in the paper) –Due to using analytic penumbra volumes that represent many light samples at once

Results: More Analysis Somewhat high memory usage –Depends on the output resolution –Depends on the complexity of the shadows –Does not depend on the number of triangles in the scene New problem: dependence on the spatial size of light source –Penumbra volumes become larger –Leads to lower performance

Conclusions Nice properties +Exactly the same result as with ray casting +No need to store all triangles at any point +Sub-linear dependence on output resolution and number of light samples Not so nice properties –Linear dependence on triangle count –Memory usage can be high –Dependence on the spatial size of light source

Future Work Process multiple triangles at a time? Could experiment with full light sample hierarchy, which should (in theory) have better performance

Thank You Questions Funding: National Technology Agency of Finland, Bitboys, Hybrid Graphics, Remedy Entertainment, Nokia, ATI