global light baking software

Similar documents
CS354R: Computer Game Technology

Rendering Algorithms: Real-time indirect illumination. Spring 2010 Matthias Zwicker

Real-Time Voxelization for Global Illumination

Georgios (George) Papaioannou

Introduction to Radiosity

GLOBAL ILLUMINATION IN UNITY 5

Global Illumination. COMP 575/770 Spring 2013

03 RENDERING PART TWO

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

Practical Techniques for Ray Tracing in Games. Gareth Morgan (Imagination Technologies) Aras Pranckevičius (Unity Technologies) March, 2014

Screen Space Ambient Occlusion. Daniel Kvarfordt & Benjamin Lillandt

Advanced Computer Graphics CS 563: Screen Space GI Techniques: Real Time

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

Hello, Thanks for the introduction

Dominic Filion, Senior Engineer Blizzard Entertainment. Rob McNaughton, Lead Technical Artist Blizzard Entertainment

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

GUERRILLA DEVELOP CONFERENCE JULY 07 BRIGHTON

Point based Rendering

Radeon ProRender and Radeon Rays in a Gaming Rendering Workflow. Takahiro Harada, AMD 2017/3

Game Technology. Lecture Physically Based Rendering. Dipl-Inform. Robert Konrad Polona Caserman, M.Sc.

Recollection. Models Pixels. Model transformation Viewport transformation Clipping Rasterization Texturing + Lights & shadows

Global Illumination. CSCI 420 Computer Graphics Lecture 18. BRDFs Raytracing and Radiosity Subsurface Scattering Photon Mapping [Ch

The Rendering Equation and Path Tracing

Render methods, Compositing, Post-process and NPR in NX Render

Other Rendering Techniques CSE 872 Fall Intro You have seen Scanline converter (+z-buffer) Painter s algorithm Radiosity CSE 872 Fall

CS451Real-time Rendering Pipeline

Advanced Graphics. Path Tracing and Photon Mapping Part 2. Path Tracing and Photon Mapping

Point based global illumination is now a standard tool for film quality renderers. Since it started out as a real time technique it is only natural

Computer Graphics. Lecture 13. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura

Efficient Image-Based Methods for Rendering Soft Shadows. Hard vs. Soft Shadows. IBR good for soft shadows. Shadow maps

Volume-based Ambient Occlusion with Voxel Fragmentation

Dynamic Ambient Occlusion and Indirect Lighting. Michael Bunnell NVIDIA Corporation

Global Illumination. Global Illumination. Direct Illumination vs. Global Illumination. Indirect Illumination. Soft Shadows.

NVIDIA Case Studies:

Photometric Stereo. Lighting and Photometric Stereo. Computer Vision I. Last lecture in a nutshell BRDF. CSE252A Lecture 7

NetLight: Cloud Baked Indirect Illumination

lecture 18 - ray tracing - environment mapping - refraction

Global Illumination. Global Illumination. Direct Illumination vs. Global Illumination. Indirect Illumination. Soft Shadows.

x ~ Hemispheric Lighting

MIT Monte-Carlo Ray Tracing. MIT EECS 6.837, Cutler and Durand 1

Interactive Indirect Illumination Using Voxel Cone Tracing

Global Illumination in Real-Time using Voxel Cone Tracing on Mobile Devices

COSC 448: REAL-TIME INDIRECT ILLUMINATION

Computer Graphics. Lecture 14 Bump-mapping, Global Illumination (1)

Irradiance Caching in Pixar s RenderMan

Computer Graphics. Lecture 10. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura 12/03/15

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

Enabling immersive gaming experiences Intro to Ray Tracing

DEFERRED RENDERING STEFAN MÜLLER ARISONA, ETH ZURICH SMA/

Global Illumination That Scales

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

Spherical Harmonic Lighting: The Gritty Details Robin Green

Enhancing Traditional Rasterization Graphics with Ray Tracing. March 2015

Lecture 11 - GPU Ray Tracing (1)

Game Architecture. 2/19/16: Rasterization

A bit more Deferred - CryEngine 3. Triangle Game Conference 2009 Martin Mittring Lead Graphics Programmer

After the release of Maxwell in September last year, a number of press articles appeared that describe VXGI simply as a technology to improve

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

Local vs. Global Illumination & Radiosity

Precomputed Radiance Transfer: Theory and Practice

Deus Ex is in the Details

CS4620/5620: Lecture 14 Pipeline

Today. Anti-aliasing Surface Parametrization Soft Shadows Global Illumination. Exercise 2. Path Tracing Radiosity

Realtime Shading of Folded Surfaces

Advanced Graphics. Global Illumination. Alex Benton, University of Cambridge Supported in part by Google UK, Ltd

Bringing Hollywood to Real Time. Abe Wiley 3D Artist 3-D Application Research Group

Global Illumination CS334. Daniel G. Aliaga Department of Computer Science Purdue University

Ambien Occlusion. Lighting: Ambient Light Sources. Lighting: Ambient Light Sources. Summary

Accelerated Ambient Occlusion Using Spatial Subdivision Structures

Reusing Shading for Interactive Global Illumination GDC 2004

Multiresolution Radiosity Caching for Global Illumination in Movies

CMSC427 Advanced shading getting global illumination by local methods. Credit: slides Prof. Zwicker

VAO++: Practical Volumetric Ambient Occlusion for Games

Photorealism vs. Non-Photorealism in Computer Graphics

TSBK03 Screen-Space Ambient Occlusion

Schedule. MIT Monte-Carlo Ray Tracing. Radiosity. Review of last week? Limitations of radiosity. Radiosity

Shadows. COMP 575/770 Spring 2013

Level of Details in Computer Rendering

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

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

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

Shadows for Many Lights sounds like it might mean something, but In fact it can mean very different things, that require very different solutions.

Many-Light Real-Time Global Illumination using Sparse Voxel Octree

Review for Ray-tracing Algorithm and Hardware

Models and Architectures

Graphics for VEs. Ruth Aylett

Interactive Light Mapping with PowerVR Ray Tracing

Anti-aliasing. Images and Aliasing

Designing the look and feel for Smoke and Neon powers The creation of a new toolset and pipeline for I:SS Pros and cons from our new workflow and

Spring 2009 Prof. Hyesoon Kim

Spatial Data Structures

Illumination Under Trees. Nelson Max University of Tokyo, and University of California, Davis

Topic 12: Texture Mapping. Motivation Sources of texture Texture coordinates Bump mapping, mip-mapping & env mapping

Soft Shadow Volumes for Ray Tracing Samuli Laine, Timo Aila, Ulf Assarsson, Jaakko Lethinen, Tomas Akenine-Möller presented by Manuel Lang

CS 563 Advanced Topics in Computer Graphics Spherical Harmonic Lighting by Mark Vessella. Courtesy of

Computer Graphics 1. Chapter 7 (June 17th, 2010, 2-4pm): Shading and rendering. LMU München Medieninformatik Andreas Butz Computergraphik 1 SS2010

Spring 2011 Prof. Hyesoon Kim

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

Advanced Ray Tracing

Lecture 18: Primer on Ray Tracing Techniques

Transcription:

How to create a second level global light baking software Li Wenyao Game engine researcher, Netease Game

Outline Development background Baking direct lighting Baking indirect lighting

Starting point 1 Global lighting Direct lighting Direct lighting + Indirect lighting

Starting point 1 Global lighting L o x, ω o = L e x, ω o + f r x, ω o, ω i L i x, ω i Ω cos θ i dω i

Exploration of real-time global lighting SSAO [Kajalin09, Bavoil08; Filion08, Mittring07] SSIL [RGS09]

Exploration of real-time global lighting Reflective shadow maps Radiance volume gathering Iterative propagation VPL VPL A set of regularly sampled VPLs of the scene from light position VPL Discretize initial VPL distribution by the regular grid and SH Propagate light iteratively going from one cell to another

Exploration of real-time global lighting Sparse Voxel Octree + Cone Trace LPV (37ms) SVO (32ms)

Light Map Real-time global lighting is a next next generation technology Light Map Precomputed lighting

Art production Baking software Real-time rendering

Starting point 2 low-end graphics We hope the frame rate of games running with integrated graphics can reach 30 frames Deferred Lighting Forward Lighting Light Map + Forward For 3D mobile games, light map is the only option Power VR G6450, 249.6 GFLOPS

Why developed by ourselves? Commercial baking software currently available on the market Very slow baking Patch more than one G Fixed material

CloudGI panorama Client Google Protobuffer Cloud Scene each model Direct Lighting Indirect Lighting CloudGI

Video Demo 1

Baking direct lighting 100 point light sources casting Deferred Shading shadows?

Sunlight shadow Strategies for camera frustum are not longer effective Strategies for perspective are not longer effective

Sunlight shadow Every model has a ShadowMap A huge ShadowMap 5000 X 4000 10000X10000 = 200M graphics memory Memory for Cache + Shadow Mask

LightMap crack

LightMap crack Continuous in the world space, discontinuous in the uv space

LightMap crack Continuous in the world space, discontinuous in the uv space Gutter, using the color of nearest baking point to fill the background

LightMap crack 在世界空间连续, 在 uv 空间不连续

LightMap crack 在世界空间连续, 在 uv 空间不连续

LightMap crack Fine edge in lightmap is smaller than one pixel Super Sample->Gutter->Down Sample

Point Cloud based GI L o x, ω o = L e x, ω o + f r x, ω o, ω i L i x, ω i Ω cos θ i dω i

Point Cloud based GI Raytrace O(n*mk) * O(s) Can do all the effects Exponential growth Noise

Point Cloud based GI Radiosity Does not distinguish light and object Every surfel is lighted by all the other surfels

2 bounce

16 bounce

Point Cloud based GI Radiosity O(n*n*k) Linear growth Without noise Only can do diffuse reflectance GI effects

Point Cloud based GI Radiosity How to calculate visible diagram of surfel Hemicube, raster 5 times

Point Cloud based GI Radiosity How to calculate visible diagram of surfel Hemispherical, raster one time

Point Cloud based GI Point cloud generation Creation of Octree Calculation of indirect lighting

Point Cloud Generation How to generate a point cloud Same as direct lighting Deferred Shading DX11 Unordered Access View + Atomic Add CUDA Memory

Point Cloud Generation How to calculate Area? Area = Geometry Shader Triangle Area UV Area UV per pixel

Video Demo 2

Octree Building CPU top, from top to bottom Unfriendly concurrency Dynamic memory allocation Need synchronization or atomic operation

Octree Building CPU top, from bottom to top Natural concurrency Does not need synchronization Graphics memory is not wasted

Octree Building Creation of leaf node 3 bits for one layer coding, so 32-bit means 10 layers key 7 1 1 5 3 5 7 3 0 7 sort 0 1 1 3 3 5 5 7 7 7 unique compact 0 1 1 3 3 5 5 7 7 7 0 1 3 5 7 Thrust CUDA based STL leaf node 0 1 3 5 7 Key << 3 0 0 0 0 0

Video Demo 3, Octree

Octree Building Why to build Octree O(n*n*k)->O(n*logn*k) What is the area and color of this node? Hemispherical, raster 1 time

Octree Building Spherical Harmonics A set of orthogonal basis functions defined in the sphere Y l m θ, φ = ; l N, l m l f θ, φ n l=0 l m= l f l m Y l m θ, φ f l m = f θ, φ Y l m θ, φ dω

Octree Building Spherical Harmonics into several parameters Turn sum of two functions into sum of several parameters Turn one function f θ, φ n f θ, φ f m l Y m l θ, φ l l=0 m= l f l m = f θ, φ Y l m θ, φ dω a l m = A i dot d, n Y l m θ, φ dω p l m = B i A i dot d, n + Y l m θ, φ dω

Indirect Lighting Calculation of indirect lighting Get id map by examining the whole Octree calcradiancefromid Average * PI n f θ, φ l l=0 m= l f l m Y l m θ, φ Hemispherical, raster 1 time

Algorithm Optimization Baking a small scene needs half an hour!!! Baking accuracy == Indirect lighting accuracy 1 oversampled lightmap has 16 million point clouds Separate baking accuracy, indirect lighting accuracy K-near interpolation, considering normal, position Preset threshold

Video Demo 4

Block Baking 1000W point clouds=400m A square of 1000m 1000m 4G graphics memory Block baking is necessary The whole scene, rough point cloud Within the block + safe area, fine point cloud

Translucent material 1 line of code is enough surfel.area *= alpha; Translucent shadow Traditional method is using two shadow maps Write depth map with alpha probability 0.5/4 1.5/4 2.5/4 3.5/4

Translucent material

Custom material The calculation time of Radiosity has nothing to do with the complexity of material

Summary Real-time GI is a next next generation technology CloudGI is faster than cpu raytrace by 1000 times Practical function suitable for online games (realtime preview, minpatch, custom material) Use Octree to accelerate Radiosityal gorithm K-near interpolation acceleration Block baking solves the problem of graphics memory

References Per H. Christensen, Point-Based Approximate Color Bleeding, Pixar Animation Studios. KUN ZHOU, MINMIN, XIN, and BAININ 2010. Data-Parallel Octrees for Surface Reconstruction.

Thank you