GigaVoxels Effects In Video Games

Similar documents
GigaVoxels: Voxels Come Into Play

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

Octree-Based Sparse Voxelization for Real-Time Global Illumination. Cyril Crassin NVIDIA Research

Applications of Explicit Early-Z Culling

Real-Time Voxelization for Global Illumination

CSE 167: Lecture #17: Volume Rendering. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

CS GPU and GPGPU Programming Lecture 2: Introduction; GPU Architecture 1. Markus Hadwiger, KAUST

Chapter 11 Global Illumination. Part 1 Ray Tracing. Reading: Angel s Interactive Computer Graphics (6 th ed.) Sections 11.1, 11.2, 11.

Volume Rendering. Lecture 21

GigaVoxels, Real-time Voxel-based Library to Render Large and Detailed Objects

Point based Rendering

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

Interactive Indirect Illumination Using Voxel Cone Tracing

CHAPTER 1 Graphics Systems and Models 3

Rendering Soft Shadows and Glossy Reflections with Cone Tracing

CPSC GLOBAL ILLUMINATION

Volume Rendering. Computer Animation and Visualisation Lecture 9. Taku Komura. Institute for Perception, Action & Behaviour School of Informatics

Hardware Accelerated Volume Visualization. Leonid I. Dimitrov & Milos Sramek GMI Austrian Academy of Sciences

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

Volume Rendering - Introduction. Markus Hadwiger Visual Computing Center King Abdullah University of Science and Technology

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

Volume Rendering. CS7GV3 Real-time Rendering

Many rendering scenarios, such as battle scenes or urban environments, require rendering of large numbers of autonomous characters.

Optimizing and Profiling Unity Games for Mobile Platforms. Angelo Theodorou Senior Software Engineer, MPG Gamelab 2014, 25 th -27 th June

Streaming Massive Environments From Zero to 200MPH

Real-Time Reyes: Programmable Pipelines and Research Challenges. Anjul Patney University of California, Davis

Real-Time Volumetric Smoke using D3D10. Sarah Tariq and Ignacio Llamas NVIDIA Developer Technology

COMP 175: Computer Graphics April 11, 2018

Deferred Splatting. Gaël GUENNEBAUD Loïc BARTHE Mathias PAULIN IRIT UPS CNRS TOULOUSE FRANCE.

RSX Best Practices. Mark Cerny, Cerny Games David Simpson, Naughty Dog Jon Olick, Naughty Dog

Previously... contour or image rendering in 2D

The Rasterization Pipeline

8/5/2012. Introduction. Transparency. Anti-Aliasing. Applications. Conclusions. Introduction

Spatial Data Structures

Next-Generation Graphics on Larrabee. Tim Foley Intel Corp

Comparison of hierarchies for occlusion culling based on occlusion queries

Volume-based Ambient Occlusion with Voxel Fragmentation

Consider a partially transparent object that is illuminated with two lights, one visible from each side of the object. Start with a ray from the eye

Spatial Data Structures

Effects needed for Realism. Computer Graphics (Fall 2008) Ray Tracing. Ray Tracing: History. Outline

Direct Volume Rendering

Real-Time Shadows. Computer Graphics. MIT EECS Durand 1

GPU-Based Visualization of AMR and N-Body Dark Matter Simulation Data. Ralf Kähler (KIPAC/SLAC)

Lighting. To do. Course Outline. This Lecture. Continue to work on ray programming assignment Start thinking about final project

Effects needed for Realism. Ray Tracing. Ray Tracing: History. Outline. Foundations of Computer Graphics (Spring 2012)

Direct Volume Rendering

Applications of Explicit Early-Z Z Culling. Jason Mitchell ATI Research

Utrecht University. Real-time Ray tracing and Editing of Large Voxel Scenes

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

Sung-Eui Yoon ( 윤성의 )

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

Benchmark 1.a Investigate and Understand Designated Lab Techniques The student will investigate and understand designated lab techniques.

Identifying those parts of a scene that are visible from a chosen viewing position, and only process (scan convert) those parts

Volume Graphics Introduction

Visualization Computer Graphics I Lecture 20

Spatial Data Structures

GUERRILLA DEVELOP CONFERENCE JULY 07 BRIGHTON

Visibility and Occlusion Culling

Interactive Computer Graphics A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL

Single Scattering in Refractive Media with Triangle Mesh Boundaries

Computer Graphics (CS 543) Lecture 13b Ray Tracing (Part 1) Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

Enabling immersive gaming experiences Intro to Ray Tracing

Point Cloud Filtering using Ray Casting by Eric Jensen 2012 The Basic Methodology

Accelerated Raytracing

SUMMARY. CS380: Introduction to Computer Graphics Ray tracing Chapter 20. Min H. Kim KAIST School of Computing 18/05/29. Modeling

Motivation. Culling Don t draw what you can t see! What can t we see? Low-level Culling

CS 563 Advanced Topics in Computer Graphics QSplat. by Matt Maziarz

Last Time: Acceleration Data Structures for Ray Tracing. Schedule. Today. Shadows & Light Sources. Shadows

Graphics Performance Optimisation. John Spitzer Director of European Developer Technology

3D Rasterization II COS 426

Volume visualization. Volume visualization. Volume visualization methods. Sources of volume visualization. Sources of volume visualization

Animating ultra-complex voxel scenes through shell deformation

Spatial Data Structures

Intro to Ray-Tracing & Ray-Surface Acceleration

Real-Time Hair Simulation and Rendering on the GPU. Louis Bavoil

REYES REYES REYES. Goals of REYES. REYES Design Principles

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane

Computer Graphics. Si Lu. Fall uter_graphics.htm 11/22/2017

Visualization. Images are used to aid in understanding of data. Height Fields and Contours Scalar Fields Volume Rendering Vector Fields [chapter 26]

CSL 859: Advanced Computer Graphics. Dept of Computer Sc. & Engg. IIT Delhi

Accelerating Ray Tracing

INFOMAGR Advanced Graphics. Jacco Bikker - February April Welcome!

GPU-based Volume Rendering. Michal Červeňanský

Ray Tracing. CS334 Fall Daniel G. Aliaga Department of Computer Science Purdue University

OpenCL Implementation Of A Heterogeneous Computing System For Real-time Rendering And Dynamic Updating Of Dense 3-d Volumetric Data

Interactive Ray Tracing: Higher Memory Coherence

CS4620/5620: Lecture 14 Pipeline

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

Project Gotham Racing 2 (Xbox) Real-Time Rendering. Microsoft Flighsimulator. Halflife 2

Enhancing Traditional Rasterization Graphics with Ray Tracing. October 2015

Motivation. Sampling and Reconstruction of Visual Appearance. Effects needed for Realism. Ray Tracing. Outline

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

Adaptive Point Cloud Rendering

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

GigaVoxels: Ray-Guided Streaming for Efficient and Detailed Voxel Rendering

Ray Intersection Acceleration

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

Spatial Data Structures

Deus Ex is in the Details

Texture. Texture Mapping. Texture Mapping. CS 475 / CS 675 Computer Graphics. Lecture 11 : Texture

Transcription:

GigaVoxels Effects In Video Games Cyril Crassin, Fabrice Neyret, INRIA Rhône-Alpes & Grenoble Univ. Sylvain Lefebvre, Elmar Eisemann, Miguel Sainz INRIA Sophia-Antipolis Saarland Univ./MPI NVIDIA Corporation

Voxel grid illustration courtesy of Real-Time Volume Graphics A (very) brief history of voxels Rings a bell? Outcast (Appeal Software) Comanche (Novalogic)

Voxel Engines in Special effects Natural representation Fluid, smoke, scans Volumetric phenomena Semi-transparency Unified rendering representation Particles, meshes, fluids The Day After Tomorrow, Digital Domain XXX, Digital Domain Lord of the Rings, Digital Domain

Voxels in video games? Renewed interest Jon Olick, Siggraph 08 John Carmack [Olick08] Jon Olick, John Carmack

Why bother with voxels? Exploding number of triangles Sub-pixel triangles not GPU-friendly (might improve but not yet REYES pipeline) Filtering remains an issue Multi-sampling expensive Geometric LOD ill-defined Clouds, smoke, fluids, etc. Participating media? The Mummy 3, Digital Domain/Rhythm&Hues

Voxels Natural for complex geometries LOD defined Unique Geometry (no additional authoring) Structured data Convenient to traverse But: Memory is a key issue! E.g. 2048 ^ 3 x RGBA = 32 GB!!! Transfer CPU GPU expensive No fast renderer available

GigaVoxels I3D2009 paper [CNLE09] Unified geometry & volumetric phenomena Full pipeline to render infinite resolution voxel objects/scenes

GigaVoxels pipeline Now implemented with GPU Voxel Ray- Tracer Output Image Sparse Voxel Octree Mipmap Pyramid Update structure GPU Cache manager On-disc data producer CPU

[BNMBC08]

GigaVoxels Data Structure GPU Ray-Tracer Output Image Sparse Voxel Octree MipMap Pyramid Update structure GPU Cache manager On-disc data producer CPU

Sparse Voxel MipMap Pyramid Data Composed structure structure Generalized Octree Empty space compaction Bricks of voxels Linked by octree nodes Store opacity, color, normal Tower model courtesy of Erklaerbar, made with 3DCoat

CUDA 3D Array (Texture) Linear Memory Octree of Voxel Bricks 1 GPU 1 2 3 4 5 2 3 Node pool 4 5 One child pointer Compact structure Cache efficient Brick pool

GigaVoxels Rendering GPU GigaVoxels Ray-Tracer Output Image Sparse Voxel Octree Pyramid Update structure GPU Cache manager On-disc data producer CPU

Hierarchical Volume Ray-Casting Render semi-transparent materials Participating medias Emission/Absorption model for each ray Accumulate Color intensity + Alpha Front-to-back Stop when opaque

Hierarchical Volume Ray-Casting Volume ray-casting [Sch05, CB04, LHN05a, Olick08, GMAG08, CNLE09] Big CUDA kernel One thread per ray KD-restart algorithm Ray-driven LOD

Volume Ray-Casting Tree Descent 1 2 3 Skip Node Ray traversal 4 5 Brick Marching 6 7 8 9 Brick Marching Brick Marching Per-ray LOD evaluation

Rendering costs

Volume MipMapping mechanism Problem: LOD uses discrete downsampled levels Popping + Aliasing Same as bilinear only for 2D textures Quadrilinear filtering Geometry is texture No need of multisampling (eg. MSAA) MipMap zones L3 L2 L1 L0 MipMap pyramid

GigaVoxels Data Management GPU Voxel Ray- Tracer Output Image Sparse Voxel Octree Pyramid Update structure GPU Cache manager On-disc data producer CPU

Brick pool Node pool Incremental octree update Progressive loading Wrong LOD Pass 1 1 Data request No Data Pass 2 Pass 3 Pass 4 Wrong LOD Data request (LoD OK) 2 Data 3 requests (Max opacity) 4 5 (Constant value) (Node not reached) 1 2 3 4 5

Ray-based visibility & queries Zero CPU intervention Per ray frustum and visibility culling On-chip structure management Subdivision requests LOD adaptation Cache management Remove CPU synchronizations

GigaVoxels Data Management GPU Voxel Ray- Tracer Output Image Sparse Voxel Octree Pyramid Update structure GPU Cache manager On-disc data producer CPU

SVMP cache Two caches on the GPU Bricks But also tree No maximal tree size

Octree/Bricks Pool SVMP caches GPU LRU (Least Recently Used) Track elements usage Maintain list with least used in front Cache Elements (Node Tile/Brick) Oldest Newest Usage sorted nodes addresses New Used elements nodes mask New data Stream compaction Stream compaction Concatenate

Just-in-Time Visibility Detection Minimum amount of data is loaded Fully compatible with secondary rays and exotic rays paths Reflections, refractions, shadows, curved rays,

Voxel sculpting Direct voxel scultping 3D-Coat Like ZBrush Generate a lot of details

Voxel data synthesis Instantiation Recursivity Infinite details

Free voxel objects instancing BVH based structure Cooperative ray packet traversal [GPSS07] Shared stack WA-Buffer Deferred compositing

Cool Blurry Effects Going further with 3D MipMapping Full pre-integrated versions of objects Idea: Implements blurry effects very efficiently Without multi-sampling Soft shadows Depth of field Glossy reflections

Let s look more closely at what we are doing For a given pixel: Approximate cone integration Using pre-integrated data With only one ray! Voxels can be modeled as spheres Sphere size chosen to match the cone Linear interpolation between mipmap levels Samples distance d Based on voxels/spheres size Image Plane One pixel footprint Pixel Color+Alpha Cubical voxel footprint

Soft shadows Launch secondary rays When ray hit object surface Same model as primary rays MipMap level chosen to approximate light source cone Compatible with our cache technique Light source Occluder Resulting integrated opacity Approximated occlusion

Depth-Of-Field Similarly for depthof-field MipMap leveld based on circle-ofconfusion size Image plane Lens Plane in focus Illustration courtesy of GPU Gems Apperture

Conclusion Unlimited volume data at interactive rates Minimal CPU intervention Several game techniques can benefit from our algorithm

Many thanks go to Digisens Corporation Rhone-Alpes Explora doc program Cluster of Excellence on Multimodal Computing and Interaction (M2CI) 3D-Coat and Rick Sarasin Erklaerbar

But there is a little problem Let s see more closely what we are doing: Approximate cone integration Using pre-integrated data But the integration function is not the good one! Emi/Abs model used along rays But pre-integration is a simple sum Result: Occluding objects are merged/blended Virtually not noticeable for little ray-steps Image Plane One pixel footprint Cubical voxel footprint

Emission/Absorption model Equation of transfer q : Source term Kappa: absorption

What we would like Tangential integration: Sum Depth integration: Equation of transfer But still avoiding multi-sampling Is it commutative? Not sure how far we can approximate like this

Possible solutions Anisotropic pre-integration Similar to early anysotropic filtering methods 2D mipmapping 1 axis kept unfiltered Interpolate between axis at runtime Problems: Storage Sampling cost!

Possible solutions Full Anisotropic pre-integration Pre-integrate both parts Light-Transmitance Screen-space average Interpolate between axis at runtime Problems: Storage! We would like to stay anisotropic Or to reduce storage problem

Possible solutions Spheres subtraction Problem: Sampling cost Any better idea?

Lighting problem How to pre-filter lighting? Pre-filter Normals How to store them? How to interpolate them? Lobes de normales? Compute gradients on the fly?