Perspective Shadow Maps. Shadow Map Aliasing. in particular for large scenes shadow maps impossible for infinite scenes

Similar documents
Michael Wimmer, Daniel Scherzer and Werner Purgathofer. Presentation by: Nikolas Rodarakis, Stavros Tsikinas

Computer Graphics Shadow Algorithms

Shadow Mapping. Marc Stamminger, University of Erlangen-Nuremberg

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo

Practical Shadow Mapping

Lecture 3 Sections 2.2, 4.4. Mon, Aug 31, 2009

Rasterization Overview

Models and The Viewing Pipeline. Jian Huang CS456

Computer Graphics. Bing-Yu Chen National Taiwan University

Hard Shadows Aliasing and Remedies

03 RENDERING PART TWO

CSE528 Computer Graphics: Theory, Algorithms, and Applications

Viewing. Reading: Angel Ch.5

Today. Rendering pipeline. Rendering pipeline. Object vs. Image order. Rendering engine Rendering engine (jtrt) Computergrafik. Rendering pipeline

Models and Architectures. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

Projection Matrix Tricks. Eric Lengyel

Texture. Texture Mapping. Texture Mapping. CS 475 / CS 675 Computer Graphics. Lecture 11 : Texture

CS 475 / CS 675 Computer Graphics. Lecture 11 : Texture

CSE328 Fundamentals of Computer Graphics

3D Viewing. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

3D Viewing. Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

Rigid Body Motion and Image Formation. Jana Kosecka, CS 482

CSE 167: Introduction to Computer Graphics Lecture #4: Vertex Transformation

Game Architecture. 2/19/16: Rasterization

Shadows in Computer Graphics

Practical Shadows. Outline

C P S C 314 S H A D E R S, O P E N G L, & J S RENDERING PIPELINE. Mikhail Bessmeltsev

Orthogonal Projection Matrices. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015

Spatial Data Structures

High-quality Shadows with Improved Paraboloid Mapping

Computer Viewing. Prof. George Wolberg Dept. of Computer Science City College of New York

Real-Time Shadows. Last Time? Today. Why are Shadows Important? Shadows as a Depth Cue. For Intuition about Scene Lighting

Pipeline Operations. CS 4620 Lecture 10

Lecture 17: Shadows. Projects. Why Shadows? Shadows. Using the Shadow Map. Shadow Maps. Proposals due today. I will mail out comments

CS 498 VR. Lecture 18-4/4/18. go.illinois.edu/vrlect18

Geometry: Outline. Projections. Orthographic Perspective

Perspective Projection and Texture Mapping

Introduction to Computer Graphics with WebGL

CS 381 Computer Graphics, Fall 2012 Midterm Exam Solutions. The Midterm Exam was given in class on Tuesday, October 16, 2012.

Real-Time Perspective Optimal Shadow Maps

Viewing with Computers (OpenGL)

Models and Architectures

Overview. By end of the week:

Advanced Shading I: Shadow Rasterization Techniques

GO PROCEDURAL. OpenVDB Adoption in Houdini. Edward Lam Senior Software Architect SIGGRAPH 2013

Real-Time Shadows. Computer Graphics. MIT EECS Durand 1

Real-Time Shadows. MIT EECS 6.837, Durand and Cutler

Here s the general problem we want to solve efficiently: Given a light and a set of pixels in view space, resolve occlusion between each pixel and

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

Spatial Data Structures

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

Last Time. Why are Shadows Important? Today. Graphics Pipeline. Clipping. Rasterization. Why are Shadows Important?

Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11

Last Time. Reading for Today: Graphics Pipeline. Clipping. Rasterization

Virtual Cameras and The Transformation Pipeline

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane

A Conceptual and Practical Look into Spherical Curvilinear Projection By Danny Oros

Shadow Algorithms. CSE 781 Winter Han-Wei Shen

Spatial Data Structures

What for? Shadows tell us about the relative locations. Vienna University of Technology 2

Depth. Common Classification Tasks. Example: AlexNet. Another Example: Inception. Another Example: Inception. Depth

Rendering If we have a precise computer representation of the 3D world, how realistic are the 2D images we can generate? What are the best way to mode

For Intuition about Scene Lighting. Today. Limitations of Planar Shadows. Cast Shadows on Planar Surfaces. Shadow/View Duality.

Real-Time Shadows. Last Time? Schedule. Questions? Today. Why are Shadows Important?

Pipeline Operations. CS 4620 Lecture 14

Problem Set 4 Part 1 CMSC 427 Distributed: Thursday, November 1, 2007 Due: Tuesday, November 20, 2007

CHAPTER 1 Graphics Systems and Models 3

Robust Stencil Shadow Volumes. CEDEC 2001 Tokyo, Japan

On-Line Computer Graphics Notes CLIPPING

5.8.3 Oblique Projections

Point Cloud Filtering using Ray Casting by Eric Jensen 2012 The Basic Methodology

Transforms 3: Projection Christian Miller CS Fall 2011

Viewing. Announcements. A Note About Transformations. Orthographic and Perspective Projection Implementation Vanishing Points

Perspective transformations

CSE 167: Introduction to Computer Graphics Lecture #5: Projection. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017

The Traditional Graphics Pipeline

Spatial Data Structures

Three-Dimensional Viewing Hearn & Baker Chapter 7

Chapter 2 A top-down approach - How to make shaded images?

Shadows for Many Lights sounds like it might mean something, but In fact it can mean very different things, that require very different solutions.

3D Viewing. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 9

EECS 487: Interactive Computer Graphics

3D Viewing. CS 4620 Lecture 8

The Traditional Graphics Pipeline

CSE452 Computer Graphics

INTRODUCTION TO COMPUTER GRAPHICS. It looks like a matrix Sort of. Viewing III. Projection in Practice. Bin Sheng 10/11/ / 52

Lecture 4. Viewing, Projection and Viewport Transformations

CMSC427 Advanced shading getting global illumination by local methods. Credit: slides Prof. Zwicker

Visual cues to 3D geometry. Light Reflection and Advanced Shading. Shading. Recognizing materials. size (perspective) occlusion shading

Culling. Computer Graphics CSE 167 Lecture 12

Shadows in the graphics pipeline

CS5620 Intro to Computer Graphics

Overview. A real-time shadow approach for an Augmented Reality application using shadow volumes. Augmented Reality.

One or more objects A viewer with a projection surface Projectors that go from the object(s) to the projection surface

Projection and viewing. Computer Graphics CSE 167 Lecture 4

Speeding up your game

Real-Time Shadows. Last Time? Textures can Alias. Schedule. Questions? Quiz 1: Tuesday October 26 th, in class (1 week from today!

calibrated coordinates Linear transformation pixel coordinates

CS 4204 Computer Graphics

Mouse Ray Picking Explained

Transcription:

Perspective Shadow Maps Marc Stamminger, University of Erlangen-Nuremberg Shadow Map Aliasing in particular for large scenes shadow maps impossible for infinite scenes 1

Shadow Map Aliasing perspective aliasing shadow map shadow map pixel #1 shadow map pixel #2 parallel light shadow map pixel projection projected shadow map pixel small in image no perspective aliasing projected shadow map pixel large in image perspective aliasing Shadow Map Aliasing perspective aliasing view dependent parallel light aliased okay aliased okay 2

Shadow Map Aliasing perspective aliasing view dependent close to camera: perspective aliasing distant regions: oversampling aliased oversampled Shadow Map Aliasing projection aliasing depends on angle of light incidence very local parallel light 3

Shadow Map Aliasing projection aliasing very local aliased okay Perspective Shadow Maps Idea: generate and apply shadow map in postperspective space (clip space) Perspective Shadow Maps see the world after the perspective projection account for perspective aliasing cannot account for projective aliasing 4

Post-Perspective Space perspective transformation (gluperspective) post-perspective world space Post-Perspective Space properties of perspective transformation camera view view frustum from side 5

Post-Perspective Space properties of perspective transformation view frustum from side after perspective transformation Post-Perspective Space properties of perspective transformation demo: rotate object move object forwards/backwards change field of view PERSPECTIVE change near/far value demo application 6

Post-Perspective Space properties of perspective transformation objects close to camera are enlarged distant objects are shrunk camera Post-Perspective Space properties of perspective transformation non-linear mapping: z 1-1/z near-value critical! too little near value post-perspective cube mostly empty waste of depth precision far value not critical little influence can become infinity! near = 1 near = 0.3 7

Post-Perspective Space properties of perspective transformation camera rays become parallel! camera moved to infinity camera camera Post-Perspective Space vice versa: infinite points can be mapped to finite ones parallel lights become point lights 8

PSM idea uniform shadow map perspective shadow map world space post-perspective Perspective Shadow Maps standard shadow map perspective shadow map 9

Perspective Shadow Maps standard shadow map perspective shadow sees normal world map sees world in postperspective view frustum space Perspective Shadow Maps standard shadow map perspective aliasing close to camera oversampling in distant regions perspective shadow map uniform perspective aliasing over entire frustum aliased oversampled 10

Parallel Light Transformation post-perspective world space Point Light Transformation post-perspective world space 11

Point Light Transformation Discussion ideal case: parallel light in postperspective space ( no perspective aliasing) directional light parallel to image plane point light in camera plane (miner s lamp) 12

Discussion worst case: point light in postperspective space close to unit cube ( severe new distortions) e.g. parallel light from front or behind Results 13

Problems of original paper robustness quality changes for moving lights/camera swimming shadows depth bias constructions of original paper lead to singularities idea is simple, but robust implementation awkward Issues and extensions camera near/far selection shadows from the back deep light sources usage of cube maps generalization 14

Near/Far Selection close near plane strong perspective distortion Near/Far Selection solutions: select near plane as far as possible (e.g. read back depth buffer slow) virtually move camera back, compute psm for slightly larger frustum move near plane forward to original plane [Kozlov04] 15

Shadows From the Back object behind viewer casts shadow wrap around at infinity 1 2 3 2 3 1 Shadows From the Back solution 1: virtually move back camera until no shadows from behind 16

Shadows From the Back surprising solution 2 [Kozlov04]: set near plane to a negative value eye rays start at near, go to infinity, wrap to infinity and end at far sign of homogenous w happens to be correct! 2 3 far near 1 Deep Light Sources deep lights close to post-persp. cube wide frustum large distortions 17

Deep Light Sources however: scene s bounding box shrinks towards the far plane intersection of bounding box and cube much smaller close to light bounding volume of scene intersected with cube Cube Maps [Kozlov04]: use cube maps to better sample the unit cube one shadow map for every backfacing side of the unit cube can be achieved with cube maps: text.coord = vertex coord light pos much better quality also useful for point lights generation of cube maps requires multiple passes 18

Thesis of Hamilton Yu-Ik Chong generalization of PSM idea observation: shadow maps have a degree of freedom that have been unused before PSMs: the orientation of the image plane Thesis of Hamilton Yu-Ik Chong optimal angle for single plane geometry project camera to plane (parallel to image plane) C light plane parallel to connection camera of light and C minimal perspective aliasing on plane C light plane 19