CS 4731: Computer Graphics Lecture 19: Shadows Emmanuel Agu.

Slides:



Advertisements
Similar presentations
Computer Graphics An Introduction. What’s this course all about? 05/10/2014 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data.
Advertisements

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.
Ray tracing. New Concepts The recursive ray tracing algorithm Generating eye rays Non Real-time rendering.
Graphics Pipeline.
Computer Graphic Creator: Mohsen Asghari Session 2 Fall 2014.
Computer Graphics methods
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.
Projective Texture Mapping
Week 7 - Monday.  What did we talk about last time?  Specular shading  Aliasing and antialiasing.
3D Graphics Rendering and Terrain Modeling
Lecture Fall 2001 Visibility Back-Face Culling Painter’s Algorithm.
Week 9 - Wednesday.  What did we talk about last time?  Fresnel reflection  Snell's Law  Microgeometry effects  Implementing BRDFs  Image based.
Real-Time Rendering SPEACIAL EFFECTS Lecture 03 Marina Gavrilova.
Rasterization and Ray Tracing in Real-Time Applications (Games) Andrew Graff.
CS 4731: Computer Graphics Lecture 18: Hidden Surface Removal Emmanuel Agu.
1/12/09 1 Introduction Computer Graphics COMP 770 (236) Spring 2009 Instructor: Dinesh Manocha.
Advanced lighting and rendering Multipass rendering.
Vertices and Fragments III Mohan Sridharan Based on slides created by Edward Angel 1 CS4395: Computer Graphics.
Computer Graphics Shadows
09/18/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Bump Mapping Multi-pass algorithms.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Computer Graphics Mirror and Shadows
Computer Graphics An Introduction. Computer Graphics 26/9/2008Lecture 12 What’s this course all about? We will cover… Graphics programming and algorithms.
1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 19 Other Graphics Considerations Review.
1 Computer Graphics Week13 –Shading Models. Shading Models Flat Shading Model: In this technique, each surface is assumed to have one normal vector (usually.
Course Overview, Introduction to CG Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Friday, September 5, 2003.
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
Advanced Computer Graphics March 06, Grading Programming assignments Paper study and reports (flipped classroom) Final project No written exams.
Week 2 - Wednesday CS361.
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.
Shading & Texture. Shading Flat Shading The process of assigning colors to pixels. Smooth Shading Gouraud ShadingPhong Shading Shading.
09/09/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Event management Lag Group assignment has happened, like it or not.
CS 450: COMPUTER GRAPHICS REVIEW: INTRODUCTION TO COMPUTER GRAPHICS – PART 2 SPRING 2015 DR. MICHAEL J. REALE.
Week 2 - Friday.  What did we talk about last time?  Graphics rendering pipeline  Geometry Stage.
Foundations of Computer Graphics (Fall 2012) CS 184, Lectures 13,14: Reviews Transforms, OpenGL
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Computer Graphics Using Direct 3D Introduction. 2 What are we doing here? Simply, learning how to make the computer draw.
Real-time Shadow Mapping. Shadow Mapping Shadow mapping uses two-pass rendering - render depth texture from the light ’ s point-of-view - render from.
Lecture 6: 3D graphics Concepts 1  Principles of Interactive Graphics  CMSCD2012  Dr David England, Room 718,  ex 2271 
Computer Graphics The Rendering Pipeline - Review CO2409 Computer Graphics Week 15.
CS-378: Game Technology Lecture #4: Texture and Other Maps Prof. Okan Arikan University of Texas, Austin V Lecture #4: Texture and Other Maps.
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.
Games Development 1 Camera Projection / Picking CO3301 Week 8.
1 Perception and VR MONT 104S, Fall 2008 Lecture 21 More Graphics for VR.
Computer Graphics Basic 3D Geometry CO2409 Computer Graphics Week 5-1.
Binary Space Partitioning Trees Ray Casting Depth Buffering
Mark Nelson 3d projections Fall 2013
Image Synthesis Rabie A. Ramadan, PhD 4. 2 Review Questions Q1: What are the two principal tasks required to create an image of a three-dimensional scene?
Global Illumination. Local Illumination  the GPU pipeline is designed for local illumination  only the surface data at the visible point is needed to.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
CS 445 / 645: Introductory Computer Graphics Review.
Shadows David Luebke University of Virginia. Shadows An important visual cue, traditionally hard to do in real-time rendering Outline: –Notation –Planar.
Some Notes on 3-D Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Friday, October 24, 2003.
Introduction to 3-D Viewing Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Monday, October 27, 2003.
Applications and Rendering pipeline
Model Optimization Wed Nov 16th 2016 Garrett Morrison.
- Introduction - Graphics Pipeline
Week 7 - Monday CS361.
Week 2 - Friday CS361.
Deferred Lighting.
3D Graphics Rendering PPT By Ricardo Veguilla.
Introduction to Computer Graphics with WebGL
Texture and Shadow Mapping
Computer Graphics Module Overview
Computer Graphics 4Practical Lesson
CS 4731: Computer Graphics Final review
Computer Graphics Introduction to Shaders
Presentation transcript:

CS 4731: Computer Graphics Lecture 19: Shadows Emmanuel Agu

Introduction to Shadows Basic idea:

Introduction to Shadows

Shadows: Make image more realistic Important visual cues on relative positions of objects in scene Rendering shadows: Points in shadow: use only ambient component Points NOT in shadow: use all lighting components Simple illumination models == simple shadows Two methods: Shadow buffer Shadows as texture (projection) Third method used in ray-tracing (in advanced graphics class)

Shadow Buffer Approach Uses second depth buffer called shadow buffer Pros: not limited to plane surfaces Cons: needs lots of memory Theory: Establish object-light path Other objects in object-light path = object in shadow Otherwise, not in shadow

Shadow Buffer Approach Shadow buffer records object distances from light source Shadow buffer element = distance of closest object in a direction Rendering in two stages: Loading shadow buffer Rendering the scene

Loading Shadow Buffer Initialize each element to 1.0 Position a camera at light source Rasterize each face in scene updating pseudo-depth Shadow buffer tracks smallest pseudo-depth so far

Loading Shadow Buffer Shadow buffer calculation is independent of eye position In animations, shadow buffer loaded once If eye moves, no need for recalculation If objects move, recalculation required

Shadow Buffer (Rendering Scene) Render scene using camera as usual While rendering a pixel find: pseudo-depth D from light source to P Index location [i][j] in shadow buffer, to be tested Value d[i][j] stored in shadow buffer If d[i][j] < D (other object on this path closer to light) point P is in shadow set lighting using only ambient Otherwise, not in shadow

Shadows as Texture Paint shadows as a texture Works for flat surfaces illuminated by point light source Problem: compute shape of shadow

Shadows as Texture Project light-object edges onto plane Want shadow of entire object Theory: union of projections of individual faces = projection of entire object Algorithm: First, draw plane using specular-diffuse-ambient components Then, draw shadow projections (face by face) using only ambient component

Shadows as Texture Problem: find outline of shadow by calculating projections of object vertices onto plane Example: want to project vertex V to find V’ Plane passes through point A and has normal, n

Shadows as Texture Note: can express projection in homogeneous coordinates and use matrices

Other Issues Point light sources => simple but a little unrealistic Extended light sources => more realistic Shadow has two parts: Umbra (Inner part) => no light Penumbra (outer part) => some light

References Hill, 8.6

Preview of Projects Project 4 due today (Friday) Still to be done: Project 5: on class website later today Final Exam Project 5 Write portions of graphics pipeline Example: used calls like glTranslate, glrotate Learnt matrices and math with numerical problems Project 5: apply these in graphics pipeline to build your own glTranslate, glrotate

Preview of Projects Project 5 Previously ran application using pure -openGL switch E.g cs4731app –openGL –hw02 mgl.mglTranslate simply called glTranslate Now run using –cs4731GL switch E.g cs4731app –cs4731GL –hw02 Program now calls your glTranslate, emmanuel_glTranslate Project 5 goal: to give taste of what goes into building a language like openGL Application of theory, matrix and vector math

Preview of Projects Project 5: final words Some people view this as hardest project Start early, you will have problems Check calculations frequently Will organize help session on Tuesday/Wednesday next week

Final Exam Similar to midterm Non-cumulative, covers lectures Posted powerpoint slides on website Most similar to midterm, last year’s final Same rules: In-class: Thursday, October 16 Review session: Tuesday, October 14 1 cheat sheet, 1 calculator Less mathy, more algorithmic, conceptual For some reasons students find it harder to describe things Also comes in finals week, so less time to prepare