Exploration of advanced lighting and shading techniques

Slides:



Advertisements
Similar presentations
Accelerating Real-Time Shading with Reverse Reprojection Caching Diego Nehab 1 Pedro V. Sander 2 Jason Lawrence 3 Natalya Tatarchuk 4 John R. Isidoro 4.
Advertisements

POST-PROCESSING SET09115 Intro Graphics Programming.
CS123 | INTRODUCTION TO COMPUTER GRAPHICS Andries van Dam © 1/16 Deferred Lighting Deferred Lighting – 11/18/2014.
Technische Universität München Computer Graphics SS 2014 Graphics Effects Rüdiger Westermann Lehrstuhl für Computer Graphik und Visualisierung.
Parallax-Interpolated Shadow Map Occlusion
Ray tracing. New Concepts The recursive ray tracing algorithm Generating eye rays Non Real-time rendering.
Exploration of bump, parallax, relief and displacement mapping
Graphics Pipeline.
Game Programming 09 OGRE3D Lighting/shadow in Action
CSL 859: Advanced Computer Graphics Dept of Computer Sc. & Engg. IIT Delhi.
1 Graphics CSCI 343, Fall 2013 Lecture 18 Lighting and Shading.
Week 9 - Friday.  What did we talk about last time?  Area lighting  Environment mapping  Blinn and Newell's method  Sphere mapping  Cubic environmental.
GAM532 DPS932 – Week 7 Introduction to shadows. Shadow Effects Light Surface No Shadows Shadows.
Computer graphics & visualization Global Illumination Effects.
Lecture 14 Illumination II – Global Models
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 10 - Monday.  What did we talk about last time?  Global illumination  Shadows  Projection shadows  Soft shadows.
 Engineering Graphics & Introductory Design 3D Graphics and Rendering REU Modeling Course – June 13 th 2014.
Real-Time Rendering SPEACIAL EFFECTS Lecture 03 Marina Gavrilova.
Rasterization and Ray Tracing in Real-Time Applications (Games) Andrew Graff.
(conventional Cartesian reference system)
Final Gathering on GPU Toshiya Hachisuka University of Tokyo Introduction Producing global illumination image without any noise.
1 Dynamic Shadows and Lighting for Walkthrus of Large Models Brandon Lloyd COMP 258 December 2002.
Real-Time High Quality Rendering COMS 6160 [Fall 2004], Lecture 4 Shadow and Environment Mapping
4.2. D EFERRED S HADING Exploration of deferred shading (rendering)
Computer Graphics Shadows
09/18/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Bump Mapping Multi-pass algorithms.
9/20/2001CS 638, Fall 2001 Today Finishing Up Reflections More Multi-Pass Algorithms Shadows.
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.
Ray Tracing Primer Ref: SIGGRAPH HyperGraphHyperGraph.
Ray Tracing and Photon Mapping on GPUs Tim PurcellStanford / NVIDIA.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
Computer Graphics An Introduction. What’s this course all about? 06/10/2015 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data.
CS447/ Realistic Rendering -- Radiosity Methods-- Introduction to 2D and 3D Computer Graphics.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Week 10 - Wednesday.  What did we talk about last time?  Shadow volumes and shadow mapping  Ambient occlusion.
Shadow Mapping Chun-Fa Chang National Taiwan Normal University.
4.1. R ENDERING Aspects of Game Rendering. From Wikipedia: Rendering is the process of generating an image from a model. The model is a description.
Rendering Fake Soft Shadows with Smoothies Eric Chan Massachusetts Institute of Technology.
Sample Based Visibility for Soft Shadows using Alias-free Shadow Maps Erik Sintorn – Ulf Assarsson – uffe.
Emerging Technologies for Games Deferred Rendering CO3303 Week 22.
Global Illumination. Local Illumination  the GPU pipeline is designed for local illumination  only the surface data at the visible point is needed to.
Pure Path Tracing: the Good and the Bad Path tracing concentrates on important paths only –Those that hit the eye –Those from bright emitters/reflectors.
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.
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
Real-Time Dynamic Shadow Algorithms Evan Closson CSE 528.
Shadows David Luebke University of Virginia. Shadows An important visual cue, traditionally hard to do in real-time rendering Outline: –Notation –Planar.
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.
Ambient Occlusion Patrick Cozzi University of Pennsylvania CIS Fall 2013.
David Luebke3/12/2016 Advanced Computer Graphics Lecture 3: More Ray Tracing David Luebke
09/23/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Reflections Shadows Part 1 Stage 1 is in.
Advanced Lighting With Spherical Harmonics. What Is the Algorithm.
Shuen-Huei Guan Seminar in CMLab, NTU
Real-Time Soft Shadows with Adaptive Light Source Sampling
Aspects of Game Rendering
Deferred Lighting.
3D Graphics Rendering PPT By Ricardo Veguilla.
The Graphics Rendering Pipeline
Jim X. Chen George Mason University
Lighting.
UMBC Graphics for Games
UMBC Graphics for Games
Selective material rendering
Patrick Cozzi University of Pennsylvania CIS Fall 2012
Chapter XV Shadow Mapping
Frame Buffer Applications
Directional Occlusion with Neural Network
Presentation transcript:

Exploration of advanced lighting and shading techniques

Shadowing Techniques Exploration of different shadowing techniques

Video not available in on-line slides

Shadowing Techniques Applying shadows to a rendered scene increases realism and provides an important visual cue for object depth and position. The two most common shadowing approaches within real-time game engines are: Shadow maps Shadow volumes

Shadow Volumes This is a geometry based approach, extruding geometry in the forward direction of the light to generate a closed ‘shadow’ volume. By testing against the shadow volume the shadowed portions of the scene can be determined (the stencil buffer can be used to record the lit area). Shadow volumes are pixel- accurate and don’t suffer from any aliasing problems. However, the computational cost is geometry dependent and the approach is fill-rate intensive (shadow maps are often faster).

Shadow Volumes View the DirectX SDK Shadow Volume sample

Shadow Maps A shadow map is a rendering from the light’s perspective where the depths to ‘lit’ fragments are stored. The shadow map texture is used, when rendering the scene from the camera’s perspective, to compare the distance from the pixel to be lit with the depth value encoded in the shadow map. If the depth is larger than the value stored in the shadow map then the pixel is in shadow.

Shadow Maps The quality of the shadow map is dependent upon the size of the generated shadow map.

Shadow Maps: Creating the Shadow Map Render the scene from the light's point of view (point light - suitable perspective projection, directional - orthographic projection). The depth map is typically stored as a texture. As only the depth information is needed, all unnecessary lighting, texturing, etc. can be excluded from the shadow map render. Not all objects need be drawn to the shadow map, with only important ‘shadow casting’ objects selected.

Shadow Maps: Creating the Shadow Map If the light does not move and the shadow casting geometry does not move, then the shadow map need not be recalculated and can be cached/reused. Multiple lights require multiple depth maps. A depth offset shifting the objects away from the light is typically applied to remove stitching problems (where the depth map value is very close to the depth of the surface being drawn).

Shadow Maps: Using the Shadow Map When drawing the scene from the normal camera viewpoint the shadow map is used to: Find the position of the pixel as seen from the light Compares the position-to-light distance to the stored depth map value Draw the pixel as in shadow or in light, as needed

Shadow Mapping View the DirectX SDK Shadow Mapping example

Shadow Maps: Extensions The principle behind shadow mapping is straightforward. The implementation can be problematic as: It can be difficult to select an appropriate bias value It can be hard to remove artefacts at shadow edges or handle small viewing angles.

Shadow Maps: Extensions Screen Space Blurred Shadow Mapping Shadows are rendered to a texture (in screen space) and the texture then blurred and later applied to the screen. Very easy to implement, but can suffer from shadow bleeding and the cost of the extra passes. Percentage Closer Filtering The result of the depth comparison are filtered, e.g. when comparing depths, some depths around the target position are also compared, with the result averaged.

Shadow Maps: Extensions

Cascaded Shadow Mapping View the DirectX SDK Cascaded Shadow Maps and Variance Shadows examples

Ambient Occlusion Exploration of in-game ambient occlusion

Ambient Occlusion Ambient occlusion adds realism by taking into account attenuation of light due to occlusion. It attempts to approximate the way light radiates in real life (including off what are normally considered non-reflective surfaces). Ambient occlusion is a global method (unlike Phong shading which is a local method), meaning the illumination at each point is a function of other geometry in the scene.

Ambient Occlusion Ambient occlusion is most often calculated by casting rays in every direction from the surface. Rays which reach the background or “sky” increase the brightness of the surface, whereas a ray which hits any other object contributes no illumination. As a result, points surrounded by a large amount of geometry are rendered dark, whereas points with little geometry on the visible hemisphere appear well lit.

Video not available in on-line slides

Screen Space Ambient Occlusion SSAO is a recent technique (introduced within the game Crysis) which is capable of creating an approximation of ambient occlusion by using the depth of the rendered scene. It works by comparing the current fragment depth with a selection of random sample depths around it to see if the current depth is occluded or not. The current fragment is occluded if the sample is closer to the eye than the surrounding fragments. Whilst the approach is very simple, it is also highly effective.

Screen Space Ambient Occlusion: Approach For every pixel, a shader samples the surrounding depth values to measure occlusion from each of the sampled points. Sampling is performed using a randomly- rotated kernel (repeated every N screen pixels), ensuring that only high-frequency noise is introduced in the final output. The noise can be mostly removed using a NxN post-process blurring step taking into account depth discontinuities. The approach permits the number of depth samples to be reduced to about 16 per pixel (enabling real-time application) whilst providing a high quality result.

Directed Reading Directed reading concerning lighting and shadowing

Directed reading: Shadowing Read Projective Texture Mapping – for information on projective texturing (underpinning shadow mapping) Read DevMaster - Shadow Mapping and Shadow Volumes – for an excellent introduction to shadowing Read GDC - Shadow Mapping GPU-based Tips and Techniques – exploring different approaches to shadow mapping

Directed reading: Shadowing Read GPU Gems - Efficient Shadow Volume Rendering – for information on how to render shadow volumes Read GDC - Advanced Soft Shadow Mapping Techniques – exploring shadow map softening techniques Read High-Quality Adaptive Soft Shadow Mapping – for an example of ongoing research Read GPU Gems - Shadow Map Antialiasing – for information on efficient dithering

Directed reading: Ambient Occlusion Read GPU Gems – Ambient Occlusion – providing a good overview of AO Read GPU Gems 2 – Ambient Occlusion and Indirect Lighting – exploring forms of indirect lighting Read Hardware Accelerated Ambient Occlusion Techniques on GPUs – provided an excellent account of GPU screen-space AO More generally explore gamerendering.com on other aspects of lighting: http://www.gamerendering.com/category/lighting/

To do: Summary Read the directed reading Today we explored: Different types of shadow techniques Ambient occulusion To do: Read the directed reading Think if you would like to explore lighting / shading for your project