Stratified Sampling for Stochastic Transparency

Slides:



Advertisements
Similar presentations
CS123 | INTRODUCTION TO COMPUTER GRAPHICS Andries van Dam © 1/16 Deferred Lighting Deferred Lighting – 11/18/2014.
Advertisements

Ray tracing. New Concepts The recursive ray tracing algorithm Generating eye rays Non Real-time rendering.
The Binary Numbering Systems
Week 10 - Monday.  What did we talk about last time?  Global illumination  Shadows  Projection shadows  Soft shadows.
03/12/02 (c) 2002 University of Wisconsin, CS559 Last Time Some Visibility (Hidden Surface Removal) algorithms –Painter’s Draw in some order Things drawn.
Two Methods for Fast Ray-Cast Ambient Occlusion Samuli Laine and Tero Karras NVIDIA Research.
CAP4730: Computational Structures in Computer Graphics Visible Surface Determination.
Computer Graphics Visible Surface Determination. Goal of Visible Surface Determination To draw only the surfaces (triangles) that are visible, given a.
High-Performance Software
High-Quality Parallel Depth-of- Field Using Line Samples Stanley Tzeng, Anjul Patney, Andrew Davidson, Mohamed S. Ebeida, Scott A. Mitchell, John D. Owens.
Bar Ilan University And Georgia Tech Artistic Consultant: Aviya Amir.
Korea Univ. Graphics Lab. 3D Game Engine Design Chapter 12. Spatial Sorting Chung Ji Hye
Efficient Sparse Voxel Octrees
Implementation Dr. Amy Zhang. Reading 2  Hill, Chapters  Hill, Chapter 10.
Chapter 6: Vertices to Fragments Part 2 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley Mohan Sridharan Based on Slides.
1 Lecture 8: Genetic Algorithms Contents : Miming nature The steps of the algorithm –Coosing parents –Reproduction –Mutation Deeper in GA –Stochastic Universal.
Shadow Silhouette Maps Pradeep Sen, Mike Cammarano, Pat Hanrahan Stanford University.
1 Image filtering Hybrid Images, Oliva et al.,
Vertices and Fragments III Mohan Sridharan Based on slides created by Edward Angel 1 CS4395: Computer Graphics.
© 2004 Tomas Akenine-Möller1 Shadow Generation Hardware Vision day at DTU 2004 Tomas Akenine-Möller Lund University.
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics1 Other Rendering Techniques Types of rendering – Wireframe techniques – Scan-line conversion – Reyes.
Computer Graphics Shadows
09/18/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Bump Mapping Multi-pass algorithms.
Hidden Surface Removal
3D Global Registration. The Problem Given: n scans around an objectGiven: n scans around an object Goal: align them allGoal: align them all First attempt:
Shadows Computer Graphics. Shadows Shadows Extended light sources produce penumbras In real-time, we only use point light sources –Extended light sources.
Computer Graphics Mirror and Shadows
Aaron Schultz. Idea: Objects close to a light shadow those far away. Anything we can see from the light’s POV is lit. Everything hidden is dark. Distance.
Filtering theory: Battling Aliasing with Antialiasing Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology.
Samuli Laine: A General Algorithm for Output-Sensitive Visibility PreprocessingI3D 2005, April 3-6, Washington, D.C. A General Algorithm for Output- Sensitive.
CS 638, Fall 2001 Today Light Mapping (Continued) Bump Mapping with Multi-Texturing Multi-Pass Rendering.
The Visibility Problem In many environments, most of the primitives (triangles) are not visible most of the time –Architectural walkthroughs, Urban environments.
Advanced Computer Graphics Depth & Stencil Buffers / Rendering to Textures CO2409 Computer Graphics Week 19.
Emerging Technologies for Games Alpha Sorting and “Soft” Particles CO3303 Week 15.
3D Graphics for Game Programming Chapter IV Fragment Processing and Output Merging.
Multi-pass Rendering. © 2002 James K. Hahn, N.H. Baek2 Multi-pass Rendering Repeat: image  Rendering pass  result imageRepeat: image  Rendering pass.
Hidden Surface Removal 1.  Suppose that we have the polyhedron which has 3 totally visible surfaces, 4 totally invisible/hidden surfaces, and 1 partially.
Shadows. Shadows is important in scenes, consolidating spatial relationships “Geometric shadows”: the shape of an area in shadow Early days, just pasted.
CS-378: Game Technology Lecture #2.2: Clipping and Hidden Surfaces Prof. Okan Arikan University of Texas, Austin Thanks to James O’Brien, Steve Chenney,
Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005.
Binary Space Partitioning Trees Ray Casting Depth Buffering
Importance Resampling for Global Illumination Justin F. Talbot Master’s Thesis Defense Brigham Young University Provo, UT.
Implementation II.
Sample Based Visibility for Soft Shadows using Alias-free Shadow Maps Erik Sintorn – Ulf Assarsson – uffe.
Hierarchical Penumbra Casting Samuli Laine Timo Aila Helsinki University of Technology Hybrid Graphics, Ltd.
Computer Graphics Blending CO2409 Computer Graphics Week 14.
CS123 | INTRODUCTION TO COMPUTER GRAPHICS Andries van Dam © Visible Surface Determination (VSD) To render or not to render, that is the question… 1 of.
CS COMPUTER GRAPHICS LABORATORY. LIST OF EXPERIMENTS 1.Implementation of Bresenhams Algorithm – Line, Circle, Ellipse. 2.Implementation of Line,
Computer Graphics I, Fall 2010 Implementation II.
Painterly Rendering for Animation Introduction speaks of focus and detail –Small brush strokes focus and provide detail –Large strokes are abstract and.
Real-Time Dynamic Shadow Algorithms Evan Closson CSE 528.
Analysis of Social Media MLD , LTI William Cohen
Shadows David Luebke University of Virginia. Shadows An important visual cue, traditionally hard to do in real-time rendering Outline: –Notation –Planar.
01/28/09Dinesh Manocha, COMP770 Visibility Computations Visible Surface Determination Visibility Culling.
BSP Tree Supplement Jyun-Ming Chen. Fall Kd-Tree and BSP tree kd-tree is a special kind of bsp tree.
01/26/05© 2005 University of Wisconsin Last Time Raytracing and PBRT Structure Radiometric quantities.
09/23/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Reflections Shadows Part 1 Stage 1 is in.
David Luebke 3/17/2016 Advanced Computer Graphics Antialiasing David Luebke
Date of download: 9/29/2017 Copyright © ASME. All rights reserved.
Real-Time Soft Shadows with Adaptive Light Source Sampling
Distributive Property of Multiplication 306 x 2
Alias-Free Shadow Maps
1.2 Design of Periodic, Clustered-Dot Screens
Finite Element Surface-Based Stereo 3D Reconstruction
Visibility Computations
Sorting and Searching Tim Purcell NVIDIA.
Linear sketching over
UMBC Graphics for Games
UMBC Graphics for Games
Linear sketching with parities
Presentation transcript:

Stratified Sampling for Stochastic Transparency Samuli Laine, Tero Karras NVIDIA Research

Stratified Stochastic Transparency Goal: Improve image quality of stochastic transparency [Enderton et al. 2010] Motivation: As always, good sampling produces less noise than bad sampling Random sampling Stratified sampling

What Is Stochastic Transparency? Order-independent transparency (OIT) algorithm Draw surface into a sample with probability α Binary decision, no blending with previous color MSAA resolve produces the blended result + Fixed storage requirements + Correct expected value − Noise in the result

How to Realize Probability α? Build on the basic algorithm of Enderton et al. For each sample Pick reference value x If α < x, discard Otherwise proceed (Z test, stencil, ROP, etc.) As long as x is properly distributed, the expected value is correct

Choice of α Reference In each sample, what do we compare α against? Random number between 0 and 1 Reference values spaced 1/N apart (N = samples / pixel)

The Hard Part: Multiple Surfaces Can the reference value assignment be static? No, separate surfaces must be uncorrelated Current alpha-to-coverage Can they be changed between each triangle? No, interior edges of surfaces become visible

Our Bag of Tricks Trick 1: Know when a surface changes Trick 2: Generate good, uncorrelated α reference values for every surface Trick 3: Improve stratification for partially occluded surfaces

Trick 1: Surface Tracking Keep a surface ID per pixel Keep bit per sample indicating current surface coverage Bit = 1: We have already touched this sample with the current surface ID

Surface Tracking Example Start a new surface here because of conflicts Change surface at every triangle Change surface when conflict

Trick 2: Generation of α Ref. Values We need to take Surface ID Pixel ID Sample ID .. And produce an α reference value that is Stratified within the pixel (spaced 1/N apart) Well-interleaved between nearby pixels For high-quality dithering Details in the paper Uncorrelated for different surface IDs

Reference Value Generator Start with standard base-2 radical inverse Only one problem: Correlated sub-spans E.g., 0..3 and 4..7 are the same, offset 0.125 apart Would result in pixels and surfaces being almost perfectly correlated  wrong results

Improving the Reference Values Add a scramble where each bit is flipped based on a hash of bits below it Similar to Sobol sequence but more generic

Example Implementation Hash + XOR for all bits simultaneously

Example Result With scrambled base-2 inverse Equally well stratified but now different sub-spans are uncorrelated Perfect!

+ = Now for the Hairy Stuff We now have excellent stratification both spatially and in α domain for single surfaces What about stratification between multiple surfaces in the same pixel? + = First draw 50% red in front Then draw 50% green in back Wrong result (should be 25% green)

A Fix for Multiple Surfaces? First stab: Compact samples after Z test + = First draw 50% red in front Then draw 50% green in back, ONLY considering samples that survive Z test Correct result

Almost Works, But… What’s going on here? Low noise High noise

Back-to-Front Still Broken When rendering back-to-front, the samples are not stratified for previously drawn surfaces Compaction after Z test does not help here + = First draw 50% green in back Then draw 50% red in front Result is still wrong

Trick 3: Make It Work Both Ways Solution: Sort previous samples based on depth Groups samples from previous surfaces into continuous spans Each previously drawn surface gets a continuous span of α reference values  good stratification + = First draw 50% green in back Then 50% red in front, assigned in sorted order Correct result

Compact after Z and sort Example Result Compact after Z, no sort Compact after Z and sort

Putting Everything Together

Results, 16 spp Previous method RMSE = 17.2 Our method RMSE = 10.3

Results, 16 spp Previous method RMSE = 8.4 Our method RMSE = 5.6

Results, 64 spp Previous method RMSE = 8.7 Our method RMSE = 4.0

Results, 64 spp Previous method RMSE = 4.1 Our method RMSE = 2.0

Stratification  Faster Convergence RMSE results for the test scenes

Thank You Questions

Dithering Example Stratification between pixels No cooperation between pixels, results in random dithering Stratification within aligned 2x2, 4x4, etc. pixel blocks