Shadow Volumes Revisited Stefan Roettger Alexander Irion Thomas Ertl University of Stuttgart, VIS Group.

Slides:



Advertisements
Similar presentations
CS123 | INTRODUCTION TO COMPUTER GRAPHICS Andries van Dam © 1/16 Deferred Lighting Deferred Lighting – 11/18/2014.
Advertisements

Technische Universität München Computer Graphics SS 2014 Graphics Effects Rüdiger Westermann Lehrstuhl für Computer Graphik und Visualisierung.
An Architecture Extension for Efficient Geometry Processing Radhika Thekkath, Mike Uhler, Chandlee Harrell, Ying-wai Ho MIPS Technologies, Inc Charleston.
Understanding the graphics pipeline Lecture 2 Original Slides by: Suresh Venkatasubramanian Updates by Joseph Kider.
Graphics Pipeline.
Game Programming 09 OGRE3D Lighting/shadow in Action
RealityEngine Graphics Kurt Akeley Silicon Graphics Computer Systems.
Computer Graphic Creator: Mohsen Asghari Session 2 Fall 2014.
CSL 859: Advanced Computer Graphics Dept of Computer Sc. & Engg. IIT Delhi.
Computer graphics & visualization Global Illumination Effects.
Week 10 - Monday.  What did we talk about last time?  Global illumination  Shadows  Projection shadows  Soft shadows.
Lecture 6: 3D Rendering Pipeline (III) Prof. Hsien-Hsin Sean Lee School of Electrical and Computer Engineering Georgia Institute of Technology.
UW EXTENSION CERTIFICATE PROGRAM IN GAME DEVELOPMENT 2 ND QUARTER: ADVANCED GRAPHICS Shadows.
Cell-Projection of Convex Polyhedra Stefan Roettger Thomas Ertl University of Erlangen.
1 Dr. Scott Schaefer Shadows. 2/40 Shadows Shadows provide clues about depth Make scenes appear more realistic.
Real-Time Rendering SPEACIAL EFFECTS Lecture 03 Marina Gavrilova.
黃聰賢. Light Position Mesh Polygon Shadow Polygon  Clear color buffer and stencil buffer  Render the scene with ambient only.
Rasterization and Ray Tracing in Real-Time Applications (Games) Andrew Graff.
Practical and Robust Stenciled Shadow Volumes for Hardware-Accelerated Rendering Cass Everitt and Mark J. Kilgard Speaker: Alvin Date: 5/28/2003 NVIDIA.
Point Rendering for Impostors Andreas Bærentzen IMM.
3D Graphics Processor Architecture Victor Moya. PhD Project Research on architecture improvements for future Graphic Processor Units (GPUs). Research.
1 Dynamic Shadows and Lighting for Walkthrus of Large Models Brandon Lloyd COMP 258 December 2002.
Shadow Algorithms Gerald Matzka Computer Science Seminar.
IN4151 Introduction 3D graphics 1 Introduction to 3D computer graphics part 2 Viewing pipeline Multi-processor implementation GPU architecture GPU algorithms.
Approximate Soft Shadows on Arbitrary Surfaces using Penumbra Wedges Tomas Akenine-Möller Ulf Assarsson Department of Computer Engineering, Chalmers University.
Paper by Alexander Keller
© 2004 Tomas Akenine-Möller1 Shadow Generation Hardware Vision day at DTU 2004 Tomas Akenine-Möller Lund University.
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.
Realtime 3D Computer Graphics Computer Graphics Computer Graphics Software & Hardware Rendering Software & Hardware Rendering 3D APIs 3D APIs Pixel & Vertex.
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
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
Stefan Roettger University of Stuttgart A Two-Step Approach for Interactive Pre-Integrated Volume Rendering of Unstructured Grids VolVis '02 A Two-Step.
NVIDIA PROPRIETARY AND CONFIDENTIAL Occlusion (HP and NV Extensions) Ashu Rege.
Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures Vision, Modeling, Visualization Erlangen, Germany November 16-18,
UW EXTENSION CERTIFICATE PROGRAM IN GAME DEVELOPMENT 2 ND QUARTER: ADVANCED GRAPHICS Textures.
Project Raytracing. Content Goals Idea of Raytracing Ray Casting – Therory – Practice Raytracing – Theory – Light model – Practice Output images Conclusion.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Chapter 6 Special Effects 강 신 진강 신 진
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.
VIS Group, University of Stuttgart Tutorial T4: Programmable Graphics Hardware for Interactive Visualization Adaptive Terrain Slicing (Stefan Roettger)
CHAPTER 11 Shadows © 2008 Cengage Learning EMEA. LEARNING OBJECTIVES In this chapter you will learn about: – –Shadow rendering algorithms – –Blinn’s shadow.
CS 638, Fall 2001 Multi-Pass Rendering The pipeline takes one triangle at a time, so only local information, and pre-computed maps, are available Multi-Pass.
Lecture 4 Pixels, Images and Image Files 1. In this Lecture, you will learn the following concepts: Image files (in particular, the BMP file format) How.
Pixels, Images and Image Files 1 By Dr. HANY ELSALAMONY.
Week 10 - Wednesday.  What did we talk about last time?  Shadow volumes and shadow mapping  Ambient occlusion.
Multi-pass Rendering. © 2002 James K. Hahn, N.H. Baek2 Multi-pass Rendering Repeat: image  Rendering pass  result imageRepeat: image  Rendering pass.
1 The Rendering Pipeline. CS788 Topic of HCI 2 Outline  Introduction  The Graphics Rendering Pipeline  Three functional stages  Example  Bottleneck.
Hardware-accelerated Rendering of Antialiased Shadows With Shadow Maps Stefan Brabec and Hans-Peter Seidel Max-Planck-Institut für Informatik Saarbrücken,
Accelerated Stereoscopic Rendering using GPU François de Sorbier - Université Paris-Est France February 2008 WSCG'2008.
3D Computer Graphics in a Nutshell Guillaume Caumon, January 2002.
09/16/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Environment mapping Light mapping Project Goals for Stage 1.
11/24/ :45 Graphics II Shadow Maps Reflections Session 5.
Hardware Accelerated Volume Rendering Using PC Hardware CSE564 Final Demo Evan Closson.
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.
1 Shadow Rendering Techniques: Hard and Soft Author: Jamiur Rahman Supervisor: Mushfiqur Rouf Department of CSE BRAC University.
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.
Buffers Ed Angel Professor Emeritus of Computer Science
The Graphic PipeLine
Real-time Rendering Shadow Maps
UMBC Graphics for Games
Texture and Shadow Mapping
Buffers Ed Angel Professor Emeritus of Computer Science
Unreal Engine 短期課程 指導老師: 資訊工程系 胡敏君 老師 教育部資通訊軟體創新人才推升推廣計畫
Frame Buffer Applications
Presentation transcript:

Shadow Volumes Revisited Stefan Roettger Alexander Irion Thomas Ertl University of Stuttgart, VIS Group

Outline of the Talk 1. Motivation: Shadow volumes on PS2 2. Shadow volumes by Crow (1977) 3. Methods w/o stencil buffer 4. Demonstration movie 5. Conclusion

Motivation Shadow volumes: + Dynamic shadows in real-time + Dynamic shadows in real-time + Utilization of graphics hardware (stencil buffer) + Utilization of graphics hardware (stencil buffer)Problem: - Restricted to graphics accelerators of latest generation (no stencil buffer on Voodoo3 and PS2 for example) - Restricted to graphics accelerators of latest generation (no stencil buffer on Voodoo3 and PS2 for example) Solution: Utilization of the screen buffer Result: Shadow volumes supported by Voodoo1!

Shadow Volumes [Crow 77] Step 1: Render scene  Z-values

Shadow Volumes [Crow 77] Front face: +1 Step 2: Render shadow volume faces Back face: -1

Shadow Volumes [Crow 77] Front face: ±0 (Depth test) Back face:±0 (Depth test)  =±0

Shadow Volumes [Crow 77] Front face: +1 Back face:±0 (Depth test)  =+1 ±0

Shadow Volumes [Crow 77] Front face: +1 Back face:-1  =±0 ±0 +1

Shadow Volumes [Crow 77] ±0 +1 ±0 Step 3: Apply shadow mask to scene

Methods w/o Stencil Buffer Idea: Compute shadow mask in screen buffer Problem:dstColor := dstColor - 1 not available Solution:Instead +1 :*2 (double values) Instead -1 :/2 (halve values) Blend functions for *2, /2: c dst := f*c src + g*c dst c dst := f*c src + g*c dst *2: f=c dst, c src =1, g=1  c dst := c dst *1 + 1*c dst *2: f=c dst, c src =1, g=1  c dst := c dst *1 + 1*c dst /2: f=0, g=0.5  c dst := 0 + c dst *0.5 /2: f=0, g=0.5  c dst := 0 + c dst *0.5

Pixel States  Initialize all pixels with color value 1/4  Initialize all pixels with color value 1/4 1/41/21 *2 /2 *2 /2 *2 (Clamping!) State changes: Point in shadow volume:*2 Point in shadow volume:*2 Point in front of shadow volume:no change Point in front of shadow volume:no change Point behind shadow solume:*2, /2 Point behind shadow solume:*2, /2  Clamping does not invalidate states!  Clamping does not invalidate states! States: 1/4 = lit, 1/2 & 1 = shadowed

Shadow Mask Normalization Apply the following operations to the shadow mask: 1/41/21 *2 1/2 1/ *2 LightShadow Invert(c:=1-c)

Shadow Mask Application Black shadows: Multiply b/w shadow mask with scene: render the scene with c dst := c dst * c srcBlack shadows: Multiply b/w shadow mask with scene: render the scene with c dst := c dst * c src Ambient shadows: Render scene again to add ambient lighting term with c dst := c dst + c srcAmbient shadows: Render scene again to add ambient lighting term with c dst := c dst + c src QuickNDirty shadows: Halve intensity of shadowed pixels by means of normalization to 0.5/1 and with c dst := c dst * c srcQuickNDirty shadows: Halve intensity of shadowed pixels by means of normalization to 0.5/1 and with c dst := c dst * c src

Example: Shadow Mask

Example: Normalization

Example: Shadowed Scene

Extensions to the Algorithm The shadow mask can also be computed in the alpha-channel which performs even faster than the original algorithm. The shadow mask can also be computed in the alpha-channel which performs even faster than the original algorithm. Then the shadow mask can be copied efficiently into an alpha texture map and applied afterwards. Then the shadow mask can be copied efficiently into an alpha texture map and applied afterwards. Advantages: Advantages: –Scene is rendered only once for quickndirty shadows. –Computation of shadow mask with lower resolution than screen buffer  shadow mask is rasterized much faster.

Demonstration Movie

Conclusion Efficient computation of dynamic shadows possible without stencil buffer.Efficient computation of dynamic shadows possible without stencil buffer. Shadow mask is computed either in screen buffer (Voodoo1/2/3) or in alpha-channel (PS2).Shadow mask is computed either in screen buffer (Voodoo1/2/3) or in alpha-channel (PS2). Idea: Utilize *2, /2 operations instead of +1, -1.Idea: Utilize *2, /2 operations instead of +1, -1. Different modes of application: Black, ambient, or quickndirty shadows (scene rendered only once in the latter case).Different modes of application: Black, ambient, or quickndirty shadows (scene rendered only once in the latter case). By copying the shadow mask into a alpha- texture the shadow mask can be computed at lower resoutions than the screen buffer  overcome rasterization bottleneck.By copying the shadow mask into a alpha- texture the shadow mask can be computed at lower resoutions than the screen buffer  overcome rasterization bottleneck.

Thank you! Questions? Questions?