Shadow and Shadow Maps [5]. Object without shadow seem floating above the scene Shadow gives the depth information Shadow gives the information of the.

Slides:



Advertisements
Similar presentations
Advanced Light and Shadow Culling Methods Eric Lengyel.
Advertisements

Computer Graphics methods
Direct Volume Rendering. What is volume rendering? Accumulate information along 1 dimension line through volume.
Week 10 - Monday.  What did we talk about last time?  Global illumination  Shadows  Projection shadows  Soft shadows.
3D Graphics Rendering and Terrain Modeling
CAP4730: Computational Structures in Computer Graphics Visible Surface Determination.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Hidden Surface Removal 고려대학교 컴퓨터 그래픽스 연구실.
Part I: Basics of Computer Graphics
Projection Matrix Tricks Eric Lengyel Outline  Projection Matrix Internals  Infinite Projection Matrix  Depth Modification  Oblique Near Clipping.
Introduction to 3D Graphics Lecture 5: From Realism to Real-Time Anthony Steed University College London.
1 Dr. Scott Schaefer Shadows. 2/40 Shadows Shadows provide clues about depth Make scenes appear more realistic.
CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Object-Order vs. Screen-Order Rendering April 24, 2003.
CGDD 4003 THE MASSIVE FIELD OF COMPUTER GRAPHICS.
Computer Graphics (Fall 2005) COMS 4160, Lecture 21: Ray Tracing
Course Website: Computer Graphics 9: Clipping In 3D.
1 Dynamic Shadows and Lighting for Walkthrus of Large Models Brandon Lloyd COMP 258 December 2002.
Perspective Shadow Maps Marc Stamminger and George Drettakis Speaker: Alvin Date: 5/28/2003 SIGGRAPH 2002.
Shadow Algorithms Gerald Matzka Computer Science Seminar.
1 CSCE 441: Computer Graphics Hidden Surface Removal (Cont.) Jinxiang Chai.
Perspective Shadow Maps Marc Stamminger REVES/INRIA, Sophia-Antipolis, France now at: Bauhaus-Universität, Weimar, Germany George Drettakis REVES/INRIA,
LOGO Shadows On the GPU Presented by Lukai Lan. LOGO Contents  Introductions  Recent Shadow Maps  What we are NOT covering today  Perspective Shadow.
Part I: Basics of Computer Graphics Rendering Polygonal Objects (Read Chapter 1 of Advanced Animation and Rendering Techniques) Chapter
Basic Ray Tracing CMSC 435/634. Visibility Problem Rendering: converting a model to an image Visibility: deciding which objects (or parts) will appear.
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.
Computer Graphics Shadows
1 A Hierarchical Shadow Volume Algorithm Timo Aila 1,2 Tomas Akenine-Möller 3 1 Helsinki University of Technology 2 Hybrid Graphics 3 Lund University.
09/18/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Bump Mapping Multi-pass algorithms.
Shadows Computer Graphics. Shadows Shadows Extended light sources produce penumbras In real-time, we only use point light sources –Extended light sources.
Erdem Alpay Ala Nawaiseh. Why Shadows? Real world has shadows More control of the game’s feel  dramatic effects  spooky effects Without shadows the.
Computer Graphics Mirror and Shadows
Shadow Algorithms Ikrima Elhassan.
Ray Tracing Primer Ref: SIGGRAPH HyperGraphHyperGraph.
1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 19 Other Graphics Considerations Review.
1 Perception and VR MONT 104S, Spring 2008 Lecture 22 Other Graphics Considerations Review.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
CSE 381 – Advanced Game Programming Basic 3D Graphics
The Visibility Problem In many environments, most of the primitives (triangles) are not visible most of the time –Architectural walkthroughs, Urban environments.
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.
David Luebke10/9/2015 CS 551 / 645: Introductory Computer Graphics David Luebke
C O M P U T E R G R A P H I C S Guoying Zhao 1 / 14 C O M P U T E R G R A P H I C S Guoying Zhao 1 / 14 Going-through.
MIT EECS 6.837, Durand and Cutler Real-Time Shadows.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Rendering Geometry with Relief Textures L.Baboud X.Décoret ARTIS-GRAVIR/IMAG-INRIA.
1 Shadows (2) ©Anthony Steed Overview n Shadows – Umbra Recap n Penumbra Analytical v. Sampling n Analytical Aspect graphs Discontinuity meshing.
Basic Ray Tracing CMSC 435/634. Visibility Problem Rendering: converting a model to an image Visibility: deciding which objects (or parts) will appear.
2 COEN Computer Graphics I Evening’s Goals n Discuss application bottleneck determination n Discuss various optimizations for making programs execute.
Perspective Shadow Maps Marc Stamminger REVES/INRIA, Sophia-Antipolis, France now at: Bauhaus-Universität, Weimar, Germany George Drettakis REVES/INRIA,
Hardware-accelerated Rendering of Antialiased Shadows With Shadow Maps Stefan Brabec and Hans-Peter Seidel Max-Planck-Institut für Informatik Saarbrücken,
1 Perception and VR MONT 104S, Fall 2008 Lecture 21 More Graphics for VR.
David Luebke11/26/2015 CS 551 / 645: Introductory Computer Graphics David Luebke
Advanced Computer Graphics Shadow Techniques CO2409 Computer Graphics Week 20.
- Laboratoire d'InfoRmatique en Image et Systèmes d'information
Basic Ray Tracing CMSC 435/634.
Basic Perspective Projection Watt Section 5.2, some typos Define a focal distance, d, and shift the origin to be at that distance (note d is negative)
Handle By, S.JENILA AP/IT
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.
Advanced topics Advanced Multimedia Technology: Computer Graphics Yung-Yu Chuang 2006/01/04 with slides by Brian Curless, Zoran Popovic, Mario Costa Sousa.
1 Perception and VR MONT 104S, Fall 2008 Lecture 20 Computer Graphics and VR.
Real-Time Dynamic Shadow Algorithms Evan Closson CSE 528.
1 CSCE 441: Computer Graphics Hidden Surface Removal Jinxiang Chai.
Shadows David Luebke University of Virginia. Shadows An important visual cue, traditionally hard to do in real-time rendering Outline: –Notation –Planar.
1 Shadow Rendering Techniques: Hard and Soft Author: Jamiur Rahman Supervisor: Mushfiqur Rouf Department of CSE BRAC University.
Hierarchical Occlusion Map Zhang et al SIGGRAPH 98.
David Luebke3/12/2016 Advanced Computer Graphics Lecture 3: More Ray Tracing David Luebke
Computer Graphics One of the central components of three-dimensional graphics has been a basic system that renders objects represented by a set of polygons.
Shuen-Huei Guan Seminar in CMLab, NTU
Scene Manager Creates and places movable objects like lights and cameras so as to access them efficiently, e.g. for rendering. Loads and assembles world.
3D Graphics Rendering PPT By Ricardo Veguilla.
Jim X. Chen George Mason University
Computer Graphics.
Presentation transcript:

Shadow and Shadow Maps [5]

Object without shadow seem floating above the scene Shadow gives the depth information Shadow gives the information of the relative position of lights and objects in the scene What kind of visual cues does shadow give? [1]

Shadow increases scene realism Shadow makes the scene conceivable What kind of visual cues does shadow give?

Some Shadow Algorithms Shodow Polygon (Blinn) Basically project polygon vertices to a flat plane Shadow Polygon Scanline (Appel; Bouknight, Kelly) Shadow Volume (F. C. Crow) [1]

Some Shadow Algorithms Shodow Polygon (Blinn) Shadow Polygon Scanline (Appel; Bouknight, Kelly) Figure out all the polygons involved in shadowing. Pair each polygon that cast shadow with each polygon that it casts shadow upon Process shadow at each scanline for those polygons Shadow Volume (F. C. Crow)

Some Shadow Algorithms Shodow Polygon (Blinn) Shadow Polygon Scanline (Appel; Bouknight, Kelly) Shadow Volume (F. C. Crow) Create a volume polygon for the intersection of view frustum and semi-infinite shadow volume Collision test for the shadow volume and polygons [2]

Shadow Algorithms Pros: Precision Good for production / static scenes Cons: Requires non-trivial data structures Requires large amount of memory Lack hardware support Too slow for interactive rendering

Shadow Map (L. Williams 1978) Render from the view point of the light source. Use the depth buffer as shadow map [5]

Shadow Map (L. Williams 1978) Render from camera view point Project to light source and compare with shadow map If the depth are the same, it’s not under shadow (1) If the point is behind shadow map, it’s under shadow (2) 1 2 [5]

Shadow Map Aliasing It’s all because of undersampling [5]

Shadow Map Aliasing d s r s /r i becomes large  perspective aliasing cos  /cos  becomes large  projection aliasing [5]

Shadow Map Aliasing d s r s /r i becomes large  perspective aliasing cos  /cos  becomes large  projection aliasing [5]

Shadow Map Pros: Performance not constrained by number of polygons Shadow map = z-buffer. Supported in today’s graphic cards due to its simplicity Cons: Aliasing!

Adaptive Shadow Map (R. Fernando, S. Fernandez, K. Bala, D.P. Greenberg 2001) Transform as usual Analyze shadow map base on depth. Try to reduce d s r s /r i and cos  /cos  [4]

Adaptive Shadow Map Refined shadow map by building an hierarchical refinement map [4]

Adaptive Shadow Map Pros: Much better quality than uniform shadow map No manual intervention involved Uses mip-map feature on hardware Cons: Still a software solution (analyzer, data structure etc) Interactive drawbacks – need to refine a lot of data during interaction

Perspective Shadow Map – The Idea (Marc Stamminger, Gorge Drettakis 2002) Apply perspective transformation to the scene View frustum is now a cube instead of a pyramided [5]

Perspective Shadow Map – The Idea Now the size in this new scene is proportional to the final image We take the shadow map of the new scene instead The result is a shadow map with resolution same as the final image [5]

Uniform Shadow Map Shadow map has lower resolution than image plane Perspective Shadow Map Shadow map has exactly same resolution than image plane [5]

Is it really that easy? No! The light sources need perspective transformation too No! All objects casting shadow into view frustum must be included – need an optimization plan for bounding box

Perspective Shadow Map – Light Sources Light sources need to be relocated before shadow map is taken Directional light in world space becomes point lights in post perspective space on infinity plane [5]

Perspective Shadow Map – Light Sources Point lights are still point lights but not on the infinity plane Point lights on infinity plane in world space becomes directional light [5]

Perspective Shadow Map – Objects What happens if a shadow in view frustum is cast by an object outside of view frustum? In post-perspective space, the objects that needs to cast shadow appear beyond infinity plane. Transformed objects beyond infinity plane appears inverted [5]

Perspective Shadow Map – Objects Need to include more than just view frustum for perspective transformation M is all rays from light source to view frustum boundary The new world space to transform, H, is intersection of M, S(world space boundary) and light frustum Now we have a little more than just view frustum [5]

Perspective Shadow Map – Objects What about the inverted trees beyond infinity plane? Move the camera back in post perspective space so everything looks upright This solves the problem but we lose some resolution for taking a bigger picture [5]

Perspective Shadow Map Pros: Everything uniform shadow map does, this can do much better Way faster than adaptive shadow map Takes full advantage of hardware supported shadow map Cons: Transformations are not so trivial Slight computational overhead Occasional degradation when shadows are cast by objects behind camera (but always better than shadow map)

Perspective Shadow Map – Pictures [5]

Perspective Shadow Map – Pictures [5]

Perspective Shadow Map – Pictures cs2.machineroom.org/ media/doom3-2.jpg

References 1.J. Teng. Institute of automation. Chinese Academy of Science liama.ia.ac.cn/meeting/Archives/shadow.ppt F.C. Crow Shadow algorithms for computer graphics. ACM Press L. Williams. Casting curved shadows on curved surface. Computer Graphics SIGGRAPH R. Fernando, S. Fernndez, K. Bala, D.P. Greenberg. Adaptive shadow maps. SIGGRAPH M. Stamminger, G. Drettakis. Perspective shadow maps. SIGGRAPH 2002