Dynamic Sky Dome GDC March 2nd, 2011 by Igor Lobanchikov

Slides:



Advertisements
Similar presentations
Exploration of advanced lighting and shading techniques
Advertisements

POST-PROCESSING SET09115 Intro Graphics Programming.
Compositing and Blending Ed Angel Professor Emeritus of Computer Science University of New Mexico 1 E. Angel and D. Shreiner: Interactive Computer Graphics.
CS123 | INTRODUCTION TO COMPUTER GRAPHICS Andries van Dam © 1/16 Deferred Lighting Deferred Lighting – 11/18/2014.
Parallax-Interpolated Shadow Map Occlusion
ADVANCED SKIN SHADING WITH FACEWORKS Nathan Reed — NVIDIA March 24, 2014.
Computer graphics & visualization Global Illumination Effects.
Week 5 - Friday.  What did we talk about last time?  Quaternions  Vertex blending  Morphing  Projections.
Announcements Project 2 due today Project 3 out today –demo session at the end of class.
Environment Mapping CSE 781 – Roger Crawfis
Real-Time Rendering Self-Shadowing
The Art and Technology Behind Bioshock’s Special Effects
Course Note Credit: Some of slides are extracted from the course notes of prof. Mathieu Desburn (USC) and prof. Han-Wei Shen (Ohio State University). CSC.
Week 11 - Wednesday.  Image based effects  Skyboxes  Lightfields  Sprites  Billboards  Particle systems.
Week 10 - Monday.  What did we talk about last time?  Global illumination  Shadows  Projection shadows  Soft shadows.
A Practical Analytic Model for Daylight
Rendering Outdoor Light Scattering in Real Time
1. SIGGRAPH 2010 Single Scattering in Heterogeneous Participating media Cyril Delalandre Pascal Gautron Jean-Eudes MarvieGuillaume François Technicolor.
 Engineering Graphics & Introductory Design 3D Graphics and Rendering REU Modeling Course – June 13 th 2014.
1. What is Lighting? 2 Example 1. Find the cubic polynomial or that passes through the four points and satisfies 1.As a photon Metal Insulator.
Week 9 - Wednesday.  What did we talk about last time?  Fresnel reflection  Snell's Law  Microgeometry effects  Implementing BRDFs  Image based.
Shape-from-X Class 11 Some slides from Shree Nayar. others.
Real-Time Rendering SPEACIAL EFFECTS Lecture 03 Marina Gavrilova.
Direct Volume Rendering Joe Michael Kniss Scientific Computing and Imaging Institute University of Utah.
7M836 Animation & Rendering
Photometric Stereo Merle Norman Cosmetics, Los Angeles Readings R. Woodham, Photometric Method for Determining Surface Orientation from Multiple Images.
Introduction | Crepuscular rays and Caustics Caustics are high intensity highlights due to convergence of light via different paths Crepuscular rays (godrays)
A Simple, Efficient Method for Realistic Animation of Clouds
02/04/03 Page 1 Rendering Visibility Lighting Texturing.
A Simple, Efficient Method for Realistic Animation of Clouds Yoshinori Dobashi Kazufumi Kaneda Hideo Yamashita Tsuyoshi Okita Tomoyuki Nishita SIGGRAPH.
Introduction to 3D Graphics John E. Laird. Basic Issues u Given a internal model of a 3D world, with textures and light sources how do you project it.
Post-rendering Cel Shading & Bloom Effect
Computer graphics & visualization. Game Design - Rendering Smoke & Clouds Jürgen Treml Talk Overview 1.Introduction to Clouds.
1 Computer Graphics Week13 –Shading Models. Shading Models Flat Shading Model: In this technique, each surface is assumed to have one normal vector (usually.
CSS 522 Topics in Rendering March 01,2011 Scott and Lew.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
02/25/05© 2005 University of Wisconsin Last Time Meshing Volume Scattering Radiometry (Adsorption and Emission)
02/28/05© 2005 University of Wisconsin Last Time Scattering theory Integrating tranfer equations.
TERRAIN SET09115 Intro to Graphics Programming. Breakdown  Basics  What do we mean by terrain?  How terrain rendering works  Generating terrain 
Week 6 - Wednesday.  What did we talk about last time?  Light  Material  Sensors.
Week 10 - Wednesday.  What did we talk about last time?  Shadow volumes and shadow mapping  Ambient occlusion.
CS-378: Game Technology Lecture #4: Texture and Other Maps Prof. Okan Arikan University of Texas, Austin V Lecture #4: Texture and Other Maps.
Advanced Computer Graphics Advanced Shaders CO2409 Computer Graphics Week 16.
CS348B Lecture 16Pat Hanrahan, Spring 2005 Participating Media & Vol. Scattering Applications Clouds, smoke, water, … Subsurface scattering: paint, skin,
- Laboratoire d'InfoRmatique en Image et Systèmes d'information
Computer Graphics Lecture 08 Fasih ur Rehman. Last Class Ray Tracing.
Yoshinori Dobashi (Hokkaido University) Yusuke Shinzo (Hokkaido University) Tsuyoshi Yamamoto (Hokkaido University) Modeling of Clouds from a Single Photograph.
Real-Time Depth Buffer Based Ambient Occlusion
University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell Participating Media & Vol. Scattering Applications Clouds, smoke,
Computer Graphics (Spring 2003) COMS 4160, Lecture 18: Shading 2 Ravi Ramamoorthi Guest Lecturer: Aner Benartzi.
Lighting a 3D Scene Guilford County Sci Vis V part 1.
Local Illumination and Shading
Atmospheric Effects Interactive Rendering of Atmospheric Scattering Effects Using Graphics Hardware Tsuyoshi Yamamoto Tomoyuki Nishita Tokyo University.
Working Group « Pre-Filtering »
A Practical Analytic Single Scattering Model for Real Time Rendering
Real-Time Soft Shadows with Adaptive Light Source Sampling
Week 11 - Wednesday CS361.
Deferred Lighting.
Realtime Realistic Ocean Lighting
3D Graphics Rendering PPT By Ricardo Veguilla.
© 2003 University of Wisconsin
Merle Norman Cosmetics, Los Angeles
Chapter 14 Shading Models.
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL
Charles University Prague
Selective material rendering
CS-378: Game Technology Lecture #4: Texture and Other Maps
Announcements Project 3 out today demo session at the end of class.
Chapter XV Shadow Mapping
Presentation transcript:

Dynamic Sky Dome GDC March 2nd, 2011 by Igor Lobanchikov

Agenda Dynamic Sky Dome lighting model Dynamic clouds rendering Introduction into rendering equation Fog integration Sun shafts Dynamic clouds rendering Bonus trick Making dynamic – static ?????

Effects to Achieve Rayley scattering Mie scattering High chromatic dependency Reyley model – wavelength >> particle size. Light is only scattered. Works for air molecules. Shorter wavelenth blue light scatters more than longer wavekength green and red which makes the sky blue. * Mie model – wavelength <= 2πr (Prticle size). Light is both scattered and absorbed. Works for mist, smoke, dust and so on. Occurs mostly in the lower part of the atmosphere, where aerosols are mostly concentrated. © David Iliff Mie scattering Achromatic

Sky Dome Rendering History [PSS99][HP03][O’N05] Single scattering only Or viewable from ground only Or all of the above Or not real-time Atmospheric light scattering is complex phenomena. Hard to model, hard to calculate. Different model simplifications are used to make it real-time.

Current Approach Multiple scattering Aerial perspective Viewable from space LUTs are pre-computed on GPU

L(x,v,s)=(L0+R[L]+S[L])(x,v,s) Rendering Equation L(x,v,s)=(L0+R[L]+S[L])(x,v,s) x – position, v – view direction, s – sun direction Final lighting includes: L0 – attenuated direct sun light R[L] – light reflected at point (x0) and attenuated S[L] – light scattered toward the viewer between x and x0 Usually computed by numerical integration

Direct Sun Light L0(x,v,s)=T(x,x0)Lsun, or 0 Direct sunlight attenuated by the transmittance function T(x,x0) before reaching viewer at x Accounts for occlusion by the horizon Smooth shadow transition to hide sharp border on the clouds L0 eazily can be generalized to include all direct light coming from extra-terrestrial objects we see – light coming from the moon, stars, nebulas, etc..

R[L](x,v,s)=T(x,x0)I[L](x0,s) Reflected Light R[L](x,v,s)=T(x,x0)I[L](x0,s) Light reflected at x0 and attenuated by transmittance towards x I[L] == 0 at the top atmosphere boundary This stands for the light coming from solid and transparent objects such as clouds, ground, etc.. Additionally this should include illumination from sun and other light sources. Direct illumination is approximated using common techniques – general dynamic lighting with shadowmaps or other shadowing techniques.

S[L](x,v,s)=∫T(x,y)J[L](y,v,s)dy Inscattered Light x0 S[L](x,v,s)=∫T(x,y)J[L](y,v,s)dy x Light scattered between x and x0 toward x The very essence of visible sky color.

Look-up Tables (LUT) Re-parametrise functions and store them in LUT Pre-compute LUTs on GPU Transmittance (r, μ) Irradiance (r, μS) Inscatter (r, μ, μS, ν) Terms which need numerical integration and don’t have high spatial frequency details as direct lighting does are put into LUTs. Re-parametrisation is used to lower both lighting equation parameter space dimensions and LUT size. GPU is used to speed up LUT pre-computation. Still can’t do it real-time – too costly for that. But computational time is short.

View from Space Realistic atmosphere with fictional space objects.

Simple Fog vs Inscatter Fast Change parameters in real time Accounts for transmittance only Looks fine Slower Precompute Accounts for transmittance and inscatter Extremely realistic Fog both scatters (and extincts) light coming from solid and transparent objects and inscatters light coming from all other directions.

Inscatter

Sun shafts Use industry-standard mask generation Radial blur it Modulate inscattered light with the mask Cheap, known, works for all types of geometry Sun shafts effect is a scattered light coming from the sun shaped by the objects which occlude this light. Our approximation is far from being physically correct, but it delivers eye-pleasing results.

Sun shafts

Clouds Need volumetric realistically looking clouds Use group of particles to represent a single cloud Use the same lighting equation to blend nicely into the sky Use impostors to save on expensive per-pixel lighting computations Most current techniques simulate time-of-the-day lighting conditions for the clouds using artists-defined data. This data is per time of the day. While it gives good results, data doesn’t varies spatially, which allows much space for improvements. Using the same lighting equation naturally gives us spatially-dependant lighting conditions. Difference is especially noticeable at dawn at sunset time.

Clouds lighting Need x0 to apply lighting equation Use world-space impostor’s pixel position Apply inscattered light and irradiance as to a regular object. To simulate sun direct light scattering use similar to [WENZEL07] technique March in sun direction in impostor space to accumulate light extinction factor to attenuate sun light Add rim light to simulate scattering on the cloud’s edge

Clouds lighting

Impostor Pixel Position Special lighting conditions at dawns and sun sets. The sun light is partially blocked by the Earth resulting in shadow running on the cloud.

Impostor Pixel Position Need better pixel position reconstruction: Sun shadow is a crisp horizontal line Can’t pack a group of clouds into a single impostor or have a very large cloud Simple position reconstruction reveals the flat nature of the impostor.

Impostor Pixel Position Accumulate impostor-space linear depth per pixel Simple min doesn’t work well – must account for transparency, linear interpolation problem on borders Simple additive blend doesn’t work – depth on cloud edges blend with impostor clear depth value We could use another position reconstruction technique – assumption about cloud form could allow us to use analytical method to reconstruct position. Won’t work for arbitrary cloud or packed into a single impostor cloud group.

Impostor Pixel Position Min blend Additive blend Min blend behaves really bad for light transparent particle interleaves opaque particle situation additive blend fails when light and transparent particle interleaves clear sky.

Impostor Pixel Position Store both accumulated depth and normalization weight DepthAcc = OldDepthAcc*(1-newDepthWeight) + NewDepth*NewDepthWeight DepthWeightAcc=OldDepthWeightAcc*(1-newDepthWeight) + NewDepthWeight Final depth = DepthAcc/DepthWeightAcc Use particle transparency as DepthWeight => Need 2 FP16 channels to store both impostor depth and density Linear interpolation is not linear anymore, but it is monotonous and works Have two more spare channels – store normal or per-particle ambient occlusion for more sophisticated lighting? This method is a simple weighted sum. The trick is how the weight is calculated. If initial DepthWeightAcc is set to 1 we get common additive blending. Linear interpolation won’t fail on particle edges – it will deliver exact value until DepthAcc will become too small which anyway results into transparent pixel.

Impostor Pixel Position

Impostor Pixel Position

Polarization Sky light is polarized Max polarization at view-sun angle == 900 Min polarization at view-sun angle == 00 and 1800 Simulate effect of camera with polarized filter attached to add more contrast and depth to the scene * Mimics what we got used to see on photos.

Polarization ON OFF To emphasize effect completely physically incorrect polarization intensity dependency was used. Commonly used approximation doesn’t work well in our situation.

Questions ?

Reference [PSS99]Preetham, A. J., Shirley, P., and Smits., B. E.: A Practical Analytic Model for Daylight. In Siggraph 1999, Computer Graphics Proceedings (Los Angeles, 1999), Rockwood A., (Ed.), Addison Wesley Longman, pp. 91–100. [HP03] Hoffman, N., and Preetham, A. J.: Real-time Light-Atmosphere Interactions for outdoor scenes. Graphics Programming Methods (2003), pp. 337–352. [O’N05] O’NEIL S.: Accurate atmospheric scattering. In GPU Gems 2: Programming Techniques for High-Performance Graphics and General-Purpose Computation (2005), Addison-Wesley Professional. [BrunetonNeyret2008] Bruneton, E. and Neyret, F. 2008. Precomputed Atmospheric Scattering. EGSR 2008. Computer Graphics Forum, 27(4), June 2008, pp. 1079-1086. [WENZEL07] WENZEL C. 2007. Real-time Atmospheric Effects in Games Revisited. Conference Session. GDC 2007. March 5-9, 2007, San Francisco, CA.