GAM532 DPS932 – Week 7 Introduction to shadows. Shadow Effects Light Surface No Shadows Shadows.

Slides:



Advertisements
Similar presentations
A Real Time Radiosity Architecture for Video Games
Advertisements

Exploration of advanced lighting and shading techniques
Technische Universität München Computer Graphics SS 2014 Graphics Effects Rüdiger Westermann Lehrstuhl für Computer Graphik und Visualisierung.
Frame Buffer Postprocessing Effects in DOUBLE-S.T.E.A.L (Wreckless)
Optimized Stencil Shadow Volumes
Optimized Stencil Shadow Volumes
Game Programming 09 OGRE3D Lighting/shadow in Action
The Art and Technology Behind Bioshock’s Special Effects
Texture Mapping. Texturing  process that modifies the appearance of each point on a surface using an image or function  any aspect of appearance can.
Week 10 - Monday.  What did we talk about last time?  Global illumination  Shadows  Projection shadows  Soft shadows.
UW EXTENSION CERTIFICATE PROGRAM IN GAME DEVELOPMENT 2 ND QUARTER: ADVANCED GRAPHICS Shadows.
Week 9 - Wednesday.  What did we talk about last time?  Fresnel reflection  Snell's Law  Microgeometry effects  Implementing BRDFs  Image based.
1 Dr. Scott Schaefer Shadows. 2/40 Shadows Shadows provide clues about depth Make scenes appear more realistic.
黃聰賢. Light Position Mesh Polygon Shadow Polygon  Clear color buffer and stencil buffer  Render the scene with ambient only.
(conventional Cartesian reference system)
Skin Rendering GPU Graphics Gary J. Katz University of Pennsylvania CIS 665 Adapted from David Gosselin’s Power Point and article, Real-time skin rendering,
1 Dynamic Shadows and Lighting for Walkthrus of Large Models Brandon Lloyd COMP 258 December 2002.
1 Lecture 9 Lighting Light Sources Reflectance Camera Models.
Computer Graphics 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
Shadow Algorithms Ikrima Elhassan.
GAM532 DPS932 – Week 1 Rendering Pipeline and Shaders.
Computer Graphics Texture Mapping
CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps.
TERRAIN SET09115 Intro to Graphics Programming. Breakdown  Basics  What do we mean by terrain?  How terrain rendering works  Generating terrain 
Advanced Computer Graphics Depth & Stencil Buffers / Rendering to Textures CO2409 Computer Graphics Week 19.
GAM532 DPS932 – Week 8 Texture Shadow Implementation.
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.
Computer Graphics The Rendering Pipeline - Review CO2409 Computer Graphics Week 15.
GAM532 DPS932 – Week 2 Vertex Shaders. The Shader Pipeline Vertex Processing Primitive Assembly / Processing Rasterization Fragment Process Pixel Output.
Shadows. Shadows is important in scenes, consolidating spatial relationships “Geometric shadows”: the shape of an area in shadow Early days, just pasted.
Advanced Computer Graphics Advanced Shaders CO2409 Computer Graphics Week 16.
Shader Study 이동현. Vision engine   Games Helldorado The Show Warlord.
Advanced Computer Graphics Shadow Techniques CO2409 Computer Graphics Week 20.
Computer graphics & visualization Shadows / Transparency.
09/16/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Environment mapping Light mapping Project Goals for Stage 1.
Emerging Technologies for Games Deferred Rendering CO3303 Week 22.
Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba.
What are shaders? In the field of computer graphics, a shader is a computer program that runs on the graphics processing unit(GPU) and is used to do shading.
Module 06 –environment mapping Module 06 – environment mapping Module 06 Advanced mapping techniques: Environment mapping.
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.
Stencil Shadows Garrett Weng. What are stencil shadows? Also known as shadow volumes Relies on use of the stencil buffer Create volumes of the shadows.
09/23/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Reflections Shadows Part 1 Stage 1 is in.
Module 05 –Bump mapping Module 05 – Bump mapping Module 05 Advanced mapping techniques: Bump mapping.
Texturing CMSC 435/ What is Texturing? 2 Texture Mapping Definition: mapping a function onto a surface; function can be: – 1, 2, or 3D – sampled.
Discrete Techniques.
Reflective Shadow Mapping By: Mitchell Allen.
Deferred Lighting.
Robust Shadow Maps for Large Environments
The Graphics Rendering Pipeline
Understanding Theory and application of 3D
Jim X. Chen George Mason University
Computer Animation System Overview
Introduction to Computer Graphics with WebGL
Real-time Rendering Shadow Maps
Chapter XVI Texturing toward Global Illumination
UMBC Graphics for Games
UMBC Graphics for Games
Computer Graphics Module Review
Texture and Shadow Mapping
Illumination and Shading
Computer Graphics Introduction to Shaders
Chapter XV Shadow Mapping
Frame Buffer Applications
Frame Buffers Fall 2018 CS480/680.
Introduction to Ray Tracing
Presentation transcript:

GAM532 DPS932 – Week 7 Introduction to shadows

Shadow Effects Light Surface No Shadows Shadows

Types of Shadow Techniques Baked LightingBlob ShadowsShadows VolumesDepth Map Shadows Performant Immersive

Baked Lighting and Static Lights Lights and actors cannot move Static lights are not part of the scene Computations happen during development Almost costless Cannot change at runtime Can be very high detail

Blob Shadows Scene without shadow Scene with blob applied to underlying geometry Static Shadow Texture Light Dir: [ 0, -1, 0 ] Light Dir: [ 0.7, -0.7, 0 ] Shadows can move with the scene Low performance cost Shadows cannot change at runtime Low detail approximations Only works well with single simple light

Shadows Volumes Extrude Shadow VolumeRender Scene DepthRender Volume Stencil Shadowed Scene

Extruding Shadow Volumes Shadowed Scene Light Actor Shadow Volumes

Rendering Depth and Stencil Render Depth Render Volume Stencil A Front Face: Fail (-1) Back Face: Fail (+1) Stencil = 0 B Front Face: Pass (0) Back Face: Fail (+1) Stencil = 1 C Front Face: Pass (0) Back Face: Pass (0) Stencil = 0

Final Result Additive Blocks the light for each light pass Modulative Darkens the geometry after lighting pass CPU Intensive Modulative darkens scene with multiple lights Self Shadowing Dynamically changing Shadow Detail limited by mesh detail High Detail (model limited) Very expensive with high polygon meshs

Depth Texture Shadows Render scene depth from each light Render Scene from main camera for each light Compare depth from light’s depth target to each fragment

Render from Shadow Camera Render scene depth from each light Bind each shadow camera to a depth target (no color needed) struct Light { float3 position; float4 diffuse; float4 specular; float3 attenuation; float3 spot; }; Texture2D shadowTex : register(t0); SamplerState shadowSamp : register(s0); Bind each depth target to a slot in the shader

Render from Main Camera Render scene from the main camera Project the fragment position into the light’s space, using modified x,y for uv texcoords Compare depth stored in texture vs projected distance from the light

Final Result Translucency effects easily added Expensive (re-render scene for each light) Self Shadowing Dynamically changing Shadow Detail limited by texture size High Detail (texture limited) Point lights are very expensive to cast shadows from (6 renders per light)

Some Advanced Stuff Texture resolution can cause aliasing Sampling adjacent texels and blending can soften shadows Sampling many adjacent texels and applying noise algorith

When to Use Each Technique Baked LightingBlob ShadowsShadows VolumesDepth Map Shadows Areas where lighting and geometry won’t change [ceiling of a tall building] Objects that are too far away to need detail, but close enough to need shadows [distant trees, buildings] When you need to cast from point lights or when depth maps are too expensive [Small light points, candles] Areas that need high quality shadows from directional or spot lights [light from a window]

To Do Begin work on your enhancement Begin work on OpenGL labs Update wiki with all team related information Prepare for Mid-term (read study guide)