Reflections, Shadows, Transparency, and Fog

Size: px
Start display at page:

Download "Reflections, Shadows, Transparency, and Fog"

Transcription

1 GDC Tutorial: Advanced OpenGL Game Development Reflections, Shadows, Transparency, and Fog March 8, 2000

2 Mark J. Kilgard Graphics Software Engineer NVIDIA Corporation

3 Quick Tutorial on Stencil Testing An extra test for fine-grain pixel control Standard OpenGL and DirectX 6 feature Per-pixel test similar to depth buffering Tests fragment against pixel s stencil value, rejects fragments that fail Also, can modify pixel s stencil buffer value based on stencil/depth test results Hardware accelerates stencil testing Typically free when depth testing too

4 Stencil Testing in the Fragment Pipeline Fragment + Associated Data Pixel Ownership Test Scissor Test Alpha Test Depth Test Stencil Test Blending Dithering Logic Op Frame buffer

5 Stencil Testing Similar to Depth Testing but Compares current reference value to pixel s stencil buffer value Same comparison functions as depth test: NEVER, ALWAYS LESS, LEQUAL GREATER, GEQUAL EQUAL, NOTEQUAL Stencil bit mask controls comparison (( ref & mask ) op ( svalue & mask )

6 Stencil Operations Way stencil buffer values are controlled Stencil side effects of Stencil test fails Depth test fails Depth test passes Possible operations Increment, Decrement (saturates) Increment, Decrement (wraps, DX6 option) Keep, Replace, Zero, Invert

7 Stencil Write Mask Controlling stencil buffer updates Bit mask for controlling write back of stencil value to the stencil buffer Applies to the clear too! Stencil compare & write masks allow stencil values to be treated as sub-fields

8 OpenGL Stencil API Stencil-related Routines glenable/gldisable(gl_stencil_test); glstencilfunc(function, reference, mask); glstencilop(stencil_fail, depth_fail, depth_pass); glstencilmask(mask); glclear( GL_STENCIL_BUFFER_BIT);

9 Requesting a Stencil Buffer Have to request one to use one! If using stencil, request sufficient bits of stencil Implementations may support from zero to 32 bits of stencil 8, 4, or 1 bit are common possibilities Easy for GLUT programs: glutinitdisplaymode(glut_double GLUT_RGB GLUT_DEPTH GLUT_STENCIL); glutcreatewindow( stencil example );

10 Stencil Performance Cheaper than you think With today s 32-bit graphics accelerator modes, 24-bit depth and 8-bit 8 stencil packed in same memory word TNT2 and GeForce are examples Performance implication: if using depth testing, stenciling is at NO PENALTY

11 Planar Reflections Dinosaur reflected in the floor Easy hack. Draw dino twice, second time has glscalef(1, -1, 1) to reflect through the floor.

12 Confining the Reflection Reflection should be limited to reflective surface Bad Good, stencil used to limit reflection.

13 How to do it Draw floor with a unique stencil value Clear stencil to zero. Draw floor polygon and set stencil to one. Only draw reflection where stencil is one.

14 Recursive planar mirrors Reflection idea can be applied repeatedly Requires more bits of stencil. Note bogus illumination.

15 A Magician reveals the Trick A Bird s Eye View

16 Shadows Important visual cue All real world scenes have shadows Lack of shadows = big clue that an image is computer generated! Occlusion from light s point-of-view of-view instead of viewer s Cue for light-object-object relationships Artistic effect Soft vs. hard feel, dramatic or spooky feel

17 Interactive Lighting Models Typically lack shadow support So-called local lighting models ignore occlusion of light sources that create shadows Except trivial self-shadowing shadowing (i.e., clamping L N) L Global lighting models account for shadows Examples: radiosity, ray tracing But too expensive for interactive use Interactive shadow algorithms typically operate independent of local lighting models

18 Interactive Shadow Simplications True shadows are expensive, cut corners Simple geometry tricks Projection Volume intersection Pre-compute static shadow results where possible Make simplifying assumptions Treat area light sources as points Exploit hardware features such as stencil

19 Interactive Shadow Rendering Techniques Different approaches, different tradeoffs Planar projected shadows Stenciled shadow volumes Pre-computed shadow textures (lightmaps) Shadow textures Shadow maps

20 Planar Projected Shadows So-called fake shadows Uses projective geometry trick Flattens 3D model into ground plane Shadow effect only can be applied to planes Supports either positional or directional lights

21 Projected Planar Shadow Example

22 Projected Planar Shadows Classic computer graphics trick Given Ground plane equation, Ax + By + Cz + D = 0 Light position (x, y, z, w) Construct projective transform that squishes vertices into ground plane based on light position Concatenate this with view transform Rendering 3D object creates shadow-like pile of polygons in ground plane

23 Projected Planar Shadow Matrix 4x4 Projective Matrix P - Lx A -Ly A -Lz A -Lw A -Lx B P - Ly B -Lz B -Lw B -Lx C -Ly C P - Lz C -Lw C -Lx D -Ly D -Lz D P - Lw D where P = Lx A + Ly B + Lz C + Lw D

24 Projected Planar Shadow Issues Shadow must be cast on infinite planes Stencil can limit shadow to finite planar region Pile of polygons creates Z-fighting Z artifacts Polygon offset fixes this, but disturbs Z values Stencil testing is better solution Difficult to blend shadow with ground texture Just blending creates double blends But stencil testing can eliminate double blends Specular highlights can show in shadow

25 Planar Projected Shadow Artifacts Bad Good extends off ground region Z fighting double blending

26 The Shadow Volume Concept Volumetric shadows, not just planar A single point light source splits the world in two shadowed regions unshadowed regions A shadow volume is the boundary between these shadowed and unshadowed regions First described by [Crow 77]

27 Visualizing Shadow Volumes Occluder and light projects a shadow volume

28 Shadow Volume Result Objects within the volume are shadowed

29 Shadow Volume Algorithm High-level view of the algorithm Given the scene and a light source position, determine the shadow volume (harder than it sounds) Render the scene in two passes Draw scene with the light enabled, updating only fragments in unshadowed region Draw scene with the light disabled, updated only fragments in shadowed region But how to control update of regions?

30 2D Cutaway of a Shadow Volume light source shadowing object surface outside shadow volume (illuminated) shadow volume (infinite extent) eye position partially shadowed object surface inside shadow volume (shadowed)

31 Tagging Pixels as Shadowed or Unshadowed Using stencil testing High-level algorithm does not say how to update only either pixels in or out of the shadow volume! The stenciling approach Clear stencil buffer to zero and depth buffer to 1.0 Render scene to leave depth buffer with closest Zs Render shadow volume into frame buffer with depth testing but without updating color and depth, but inverting a stencil bit This leaves stencil bit set within shadow!

32 Stencil Inverting of Shadow Volume Why it works light source shadowing object two inverts, left zero one invert, left one eye position zero inverts, left zero

33 Visualizing Stenciled Shadow Volume Tagging Shadowed scene Stencil buffer red = stencil value of 1 green = stencil value of 0

34 Computing Shadow Volumes Harder than you might think Easy for a single triangle, just project out three infinite polygons from the triangle, opposite the light position But shadow volume polygons should not intersect each other for invert trick to work This makes things hard For complex objects, projecting object s 2D silhouette is a good approximation (flat objects are easy) Static shadow volumes can be pre-compiled

35 For Shadow Volumes With Intersecting Polygons Use a stencil enter/leave counting approach Draw shadow volume twice using face culling 1st pass: render front faces and increment when depth test passes 2nd pass: render back faces and decrement when depth test passes This two-pass way is more expensive than invert And burns more fill rate drawing shadow volumes Inverting is better if no polygon intersections

36 Why Increment/Decrement Works Example in 2D light source shadowing object zero +1 zero eye position

37 Shadow Volume Issues Practical considerations [Bergeron 86] If eye is in shadow volume, need to determine this and flip enabled & disabled lighting passes Shadow volume only as good as its tessellation Shadows tend to magnify limited tessellation of curved surfaces Must cap the shadow volume s intersection with the near clipping plane Open models and non-planar polygons

38 Reconstructing Shadow Volume From a Depth Buffer Very clever idea [McCool 98] Render scene from light source with depth testing Read back the depth buffer Use computer vision techniques to reconstruct the shadow volume geometry from the depth buffer image Very reasonable results for complex scenes

39 Multiple Lights and Shadow Volumes Requires still more rendering passes, but can work! Shadows from different light sources overlap correctly

40 Shadow Volumes from Area Light Sources Make soft shadows Shadow volumes work for point light sources Area light sources are common and make soft shadows Model an area light source as a collection of point light sources [Brotman & Badler 84] Use accumulation buffer or additive blending to accumulate soft shadow Linear cost per shadow volume sample

41 Soft Shadow Example Eight samples (more would be better) Note the banding artifacts

42 Combined Shadow Approaches Two Approaches at Once just logo shadow volume logo lacks shadow on the teapot teapot lacks shadow on the floor just planar projected shadows combined approach

43 Pre-computed Shadow Textures Lightmaps are static shadow textures Compute lightmaps off-line with radiosity solver local lighting models evaluated on tight grid can work well too Lightmaps with soft shadows can be built faster with convolution approach, accelerated using the Fast Fourier Transform [Soler & Silion 98] Pre-computed shadow textures work well for building interior with lots of diffuse surfaces

44 Rendering Soft Shadow Textures Fast soft shadows [Heckbert & Herf 96] Render a shadow texture For each shadowed polygon, project all light-source-occluding occluding polygons into the shadowed polygon s plane * Similar to projected planar shadows * Model area light sources as multiple jittered points * Use additive blending to accumulate all contributions Copy resulting image to the shadow texture Draw polygon in final scene with shadow texture

45 Rendered Soft Shadow Texture Example Shadow Texture and Final Result Shadow texture, accumulation of nine jittered occluder projections Final resulting scene, shadow texture modulated with wooden floor

46 Hardware Shadow Mapping Shadowing with a depth map texture Software version described by [Reeves 89] Requires hardware support [Segal, et.al. 92] for A depth texture (see SGIX_depth_texture) A depth compare texture filter operator (see SGIX_shadow) Uses eye-linear texgen to generate texture coordinates (s/q,t/q,r/q) in light s coordinate space

47 Hardware Shadow Mapping Algorithm Two pass approach First, render scene from light s point-of-view of-view with depth testing Copy the depth buffer to a depth texture Second, render scene from eye s point-of-view of-view as follows Configure eye-linear texgen to generate (s,t,r,q) coordinates in light s coordinate space ( r is z-planar z distance to the light) Configure special shadow texture filter operator Texture filter tests if r is less than depth texture texel Texture color is one if tests passes, zero if test fails Modulate fragment color with one or zero texture

48 Hardware Shadow Mapping Issues Why it works and problems Shadow map texturing is effectively a second occlusion test done with respect to the light Modulate with zero if inside shadow Modulate with one if outside shadow Traditional mipmap texture filtering not suited for filtering a depth map Explicit hardware support currently limited to InfiniteReality and RealityEngine

49 Transparency See-through objects Multiple objects contribute to pixel s final color Order of objects relative to view affects color Unsorted depth buffering insufficient for hidden surface removal Internal structure of object geometry can become visible With caveats, alpha blending enables transparency

50 Some Blending is Commutative Order independent blends Filter blending glblendfunc(gl_dst_color, GL_ZERO) Additive blending glblendfunc(gl_one, GL_ONE) But transparency blending is non-commutative glblendfunc(gl_src_alpha, GL_ONE_MINUS_SRC_ALPHA)

51 Transparency Ordering Rendering order matters Orange sphere in front of blue cone. Overlap should be more orange. Blue cone in front of orange sphere. Overlap should be more blue. Depth testing can mess up transparency. WRONG: Overlap should be blended!

52 Sorting for Transparency Ensuring proper blending ordering Draw all opaque objects first When transparent object do not intersect, back-to-front sort of transparent objects works Inexact sort may be acceptable When transparent objects intersect, must subdivide and sort intersecting primitives

53 Sorting Optimizations Transparency shortcuts Take advantage of face culling Draw back faces, then draw front faces Works for non-overlapping overlapping closed convex objects Disable depth testing Prevents front faces from hiding back faces For closed, convex, constant-colored colored objects, order of front and back face drawing does not matter

54 Screen Door Transparency Example Stipple simulates semi-opacity

55 Screen Door Transparency Implementation Polygon Stipple OpenGL supports 32x32 binary stipple pattern Percentage of 1 s in screen door pattern should match the object s opacity percentage Different objects should use distinct patterns Limitations Polygon stipple only applies to polygons Stipple pattern tied to window origin

56 Screen Door Transparency With Alpha Textures Alternative to polygon stipple Place screen door pattern in alpha texture Generate window-space texture coordinates Enable GL_EYE_LINEAR texgen with texgen plane equations mimicking the projection & viewport transforms Projective texturing s division by q will mimic vertex coordinate s division by w Use alpha testing to discard fragments based on screen door alpha texture Applies to both lines and polygons

57 Multiple Levels of Screen Door Transparency Opacity control 18% 56% 93% 25% 25% 25% Right image shows no sense of transparency between objects! Screen door transparency is defeated if multiple objects share the same stipple pattern.

58 Sub-pixel Screen Door Transparency Multisample masking SGIS_multisample extension supports multiple color samples per pixel SGI high-end only feature for antialiasing glsamplemasksgis specifies a multisample sub-pixel screen door pattern enabled via glenable(gl_sample_mask_sgis) Because sub-pixel, stipple pattern is not visible Limited number of samples (4 or 8 typical)

59 Atmospheric Effects Fog, Haze, Smoke As light travels through an atmosphere Some light is extinguished (absorbed) Some light may also be added due to scattering An atmospheric model tells how the atmosphere affects the appearance of objects viewed through the atmosphere

60 Fog Example Common in Games and Visual Simulation

61 OpenGL s Built-in Fog Model Assumptions Uniform fog color ( color of the atmosphere) Uniform fog density throughout scene Fog is essentially a weighted blend C = f C r + (1 - f) C f where C r = pre-fog fragment color, C f = uniform fog color, and f = fog factor Fog factor computed per-fragment based on eye-distance of given fragment

62 Computing the Fog Factor Based on Beer s Law Fog factor has an exponential drop-off off with the distance from the viewer f = e -(d z) Intuition: Clarity is 100% at 0 meters,, but at x + 10 meters is 99% of the clarity at x meters at 30 meters,, the clarity is ( )% continuous version of this idea is an exponential drop-off off

63 Standard OpenGL Fog Models Fog factor equations f GL_EXP2 f = e-(d z) GL_EXP f = e-(d z) 2 Zeye Given the fog model (EXP2 or EXP), fog density (d), and Z eye-distance (z), compute fog factor (f)

64 OpenGL Fog Limitations Emissive objects are over-attenuated Headlights should break through the fog, but don t OpenGL permits implementations to use window Z (a planar distance) instead of the radial eye-distance Objects at sides of the view frustum under-fogged Real world fog is not so uniform Fog varies with altitude, patchy fog

65 Planar Eye-distance Fog Artifacts Why they occur B planar eye-distance eye position view frustum A radial eye-distance Points A and B have the same Z planar distance but different radial distances.

66 Texture Fog Methods Textures to encode fog 1D, 2D, or 3D texture as fog lookup table Map eye position to texture coordinates with GL_EYE_LINEAR texgen Use luminance texture with GL_BLEND texture environment and set fog color in texture environment color Or an RGBA texture with GL_DECAL mode can encode the fog factor in A and the fog color in RGB

67 OpenGL Fog Coordinate Extension User-supplied supplied per-vertex fog distance Normally, OpenGL computes the fog distance automatically EXT_fog_coord extension allows application to supply the fog distance at each vertex via glfogcoord1fext OpenGL interpolates fog distance and computes the fog factor per-fragment using OpenGL fog mode (exponentiates)

68 A More Complex Fog Model Height-based fog Described by [Perlin 85, Legakis 98] Height-based fog factor equation b α(t) dt a f = e - The extension rate α (density) is integrated over the optical path from point A to point B This integral is the optical depth Assume α varies solely with height (altitude)

69 Height-based Fog Scenario Consider the optical depth from A to B Y Y 2 Y 1 C A B A = eye position B = fogged position C = position above A at height of B D 1 D 1 D D = (Bx - Ax) 2 + (Bz - Az) 2

70 Height-based Optical Depth Nice solution, good for glfogcoord b α(t) dt = a D α(y1), Y = 0 Y 1 + ( D / Y ) 2, 2 α(y) dy, Y 0 Y 1 Y 2 α(y) dy = α(y) dy - α(y) dy Y 1 Y 2 - This can be implemented as two 1D table lookups. Y 1 -

71 Height-based Fog Examples Foggy city normal uniform fog layered fog layered fog

Acknowledgement: Images and many slides from presentations by Mark J. Kilgard and other Nvidia folks, from slides on developer.nvidia.

Acknowledgement: Images and many slides from presentations by Mark J. Kilgard and other Nvidia folks, from slides on developer.nvidia. Shadows Acknowledgement: Images and many slides from presentations by Mark J. Kilgard and other Nvidia folks, from slides on developer.nvidia.com Practical & Robust Stenciled Shadow Volumes for Hardware-Accelerated

More information

Robust Stencil Shadow Volumes. CEDEC 2001 Tokyo, Japan

Robust Stencil Shadow Volumes. CEDEC 2001 Tokyo, Japan Robust Stencil Shadow Volumes CEDEC 2001 Tokyo, Japan Mark J. Kilgard Graphics Software Engineer NVIDIA Corporation 2 Games Begin to Embrace Robust Shadows 3 John Carmack s new Doom engine leads the way

More information

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

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

More information

Shadow Algorithms. CSE 781 Winter Han-Wei Shen

Shadow Algorithms. CSE 781 Winter Han-Wei Shen Shadow Algorithms CSE 781 Winter 2010 Han-Wei Shen Why Shadows? Makes 3D Graphics more believable Provides additional cues for the shapes and relative positions of objects in 3D What is shadow? Shadow:

More information

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

Last Time. Reading for Today: Graphics Pipeline. Clipping. Rasterization Last Time Modeling Transformations Illumination (Shading) Real-Time Shadows Viewing Transformation (Perspective / Orthographic) Clipping Projection (to Screen Space) Scan Conversion (Rasterization) Visibility

More information

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

Last Time. Why are Shadows Important? Today. Graphics Pipeline. Clipping. Rasterization. Why are Shadows Important? Last Time Modeling Transformations Illumination (Shading) Real-Time Shadows Viewing Transformation (Perspective / Orthographic) Clipping Projection (to Screen Space) Graphics Pipeline Clipping Rasterization

More information

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

For Intuition about Scene Lighting. Today. Limitations of Planar Shadows. Cast Shadows on Planar Surfaces. Shadow/View Duality. Last Time Modeling Transformations Illumination (Shading) Real-Time Shadows Viewing Transformation (Perspective / Orthographic) Clipping Projection (to Screen Space) Graphics Pipeline Clipping Rasterization

More information

Advanced Shading and Texturing

Advanced Shading and Texturing Real-Time Graphics Architecture Kurt Akeley Pat Hanrahan http://www.graphics.stanford.edu/courses/cs448a-01-fall Advanced Shading and Texturing 1 Topics Features Bump mapping Environment mapping Shadow

More information

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

Real-Time Shadows. Last Time? Today. Why are Shadows Important? Shadows as a Depth Cue. For Intuition about Scene Lighting Last Time? Real-Time Shadows Today Why are Shadows Important? Shadows & Soft Shadows in Ray Tracing Planar Shadows Projective Texture Shadows Shadow Maps Shadow Volumes Why are Shadows Important? Depth

More information

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

Real-Time Shadows. MIT EECS 6.837, Durand and Cutler Real-Time Shadows Last Time? The graphics pipeline Clipping & rasterization of polygons Visibility the depth buffer (z-buffer) Schedule Quiz 2: Thursday November 20 th, in class (two weeks from Thursday)

More information

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

Real-Time Shadows. Last Time? Schedule. Questions? Today. Why are Shadows Important? Last Time? Real-Time Shadows The graphics pipeline Clipping & rasterization of polygons Visibility the depth buffer (z-buffer) Schedule Questions? Quiz 2: Thursday November 2 th, in class (two weeks from

More information

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

Real-Time Shadows. Last Time? Textures can Alias. Schedule. Questions? Quiz 1: Tuesday October 26 th, in class (1 week from today! Last Time? Real-Time Shadows Perspective-Correct Interpolation Texture Coordinates Procedural Solid Textures Other Mapping Bump Displacement Environment Lighting Textures can Alias Aliasing is the under-sampling

More information

Shadows. Real-Time Hard Shadows. Collected by Ronen Gvili. Most slides were taken from : Fredu Durand Stefan Brabec

Shadows. Real-Time Hard Shadows. Collected by Ronen Gvili. Most slides were taken from : Fredu Durand Stefan Brabec Shadows Real-Time Hard Shadows Collected by Ronen Gvili. Most slides were taken from : Fredu Durand Stefan Brabec Hard Shadows Planar (Projected) Shadows Shadow Maps Volume (Stencil) Shadows 1 Soft Shadows

More information

Computergrafik. Matthias Zwicker. Herbst 2010

Computergrafik. Matthias Zwicker. Herbst 2010 Computergrafik Matthias Zwicker Universität Bern Herbst 2010 Today Bump mapping Shadows Shadow mapping Shadow mapping in OpenGL Bump mapping Surface detail is often the result of small perturbations in

More information

Shadows in the graphics pipeline

Shadows in the graphics pipeline Shadows in the graphics pipeline Steve Marschner Cornell University CS 569 Spring 2008, 19 February There are a number of visual cues that help let the viewer know about the 3D relationships between objects

More information

Shadow Mapping. Render Scene and Access the Depth Texture. What is Projective Texturing? About Projective Texturing (1) About Projective Texturing (3)

Shadow Mapping. Render Scene and Access the Depth Texture. What is Projective Texturing? About Projective Texturing (1) About Projective Texturing (3) Render Scene and Access the Depth Texture Shadow Mapping Cass Everitt NVIDIA Corporation cass@nvidia.com Realizing the theory in practice Fragment s light position can be generated using eye-linear texture

More information

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

Real-Time Shadows. Computer Graphics. MIT EECS Durand 1 Real-Time Shadows Computer Graphics MIT EECS 6.837 Durand 1 Why are Shadows Important? Depth cue Scene Lighting Realism Contact points 2 Shadows as a Depth Cue source unknown. All rights reserved. This

More information

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

CMSC427 Advanced shading getting global illumination by local methods. Credit: slides Prof. Zwicker CMSC427 Advanced shading getting global illumination by local methods Credit: slides Prof. Zwicker Topics Shadows Environment maps Reflection mapping Irradiance environment maps Ambient occlusion Reflection

More information

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

Overview. A real-time shadow approach for an Augmented Reality application using shadow volumes. Augmented Reality. Overview A real-time shadow approach for an Augmented Reality application using shadow volumes Introduction of Concepts Standard Stenciled Shadow Volumes Method Proposed Approach in AR Application Experimental

More information

The Traditional Graphics Pipeline

The Traditional Graphics Pipeline Last Time? The Traditional Graphics Pipeline Participating Media Measuring BRDFs 3D Digitizing & Scattering BSSRDFs Monte Carlo Simulation Dipole Approximation Today Ray Casting / Tracing Advantages? Ray

More information

Computer Graphics. Shadows

Computer Graphics. Shadows Computer Graphics Lecture 10 Shadows Taku Komura Today Shadows Overview Projective shadows Shadow texture Shadow volume Shadow map Soft shadows Why Shadows? Shadows tell us about the relative locations

More information

Computer Graphics 10 - Shadows

Computer Graphics 10 - Shadows Computer Graphics 10 - Shadows Tom Thorne Slides courtesy of Taku Komura www.inf.ed.ac.uk/teaching/courses/cg Overview Shadows Overview Projective shadows Shadow textures Shadow volume Shadow map Soft

More information

Computer Graphics Shadow Algorithms

Computer Graphics Shadow Algorithms Computer Graphics Shadow Algorithms Computer Graphics Computer Science Department University of Freiburg WS 11 Outline introduction projection shadows shadow maps shadow volumes conclusion Motivation shadows

More information

Shadow Volume History (1) Shadow Volumes. Shadow Volume History (2) Shadow Volume History (3) Shadow Volume Basics. Shadow Volume History (4)

Shadow Volume History (1) Shadow Volumes. Shadow Volume History (2) Shadow Volume History (3) Shadow Volume Basics. Shadow Volume History (4) Shadow Volume History (1) Shadow Volumes Invented by Frank Crow [ 77] Software rendering scan-line approach Brotman and Badler [ 84] Software-based depth-buffered approach Used lots of point lights to

More information

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

Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11 Pipeline Operations CS 4620 Lecture 11 1 Pipeline you are here APPLICATION COMMAND STREAM 3D transformations; shading VERTEX PROCESSING TRANSFORMED GEOMETRY conversion of primitives to pixels RASTERIZATION

More information

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1 graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1 graphics pipeline sequence of operations to generate an image using object-order processing primitives processed one-at-a-time

More information

CHAPTER 1 Graphics Systems and Models 3

CHAPTER 1 Graphics Systems and Models 3 ?????? 1 CHAPTER 1 Graphics Systems and Models 3 1.1 Applications of Computer Graphics 4 1.1.1 Display of Information............. 4 1.1.2 Design.................... 5 1.1.3 Simulation and Animation...........

More information

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1 graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1 graphics pipeline sequence of operations to generate an image using object-order processing primitives processed one-at-a-time

More information

Texture Mapping II. Light maps Environment Maps Projective Textures Bump Maps Displacement Maps Solid Textures Mipmaps Shadows 1. 7.

Texture Mapping II. Light maps Environment Maps Projective Textures Bump Maps Displacement Maps Solid Textures Mipmaps Shadows 1. 7. Texture Mapping II Light maps Environment Maps Projective Textures Bump Maps Displacement Maps Solid Textures Mipmaps Shadows 1 Light Maps Simulates the effect of a local light source + = Can be pre-computed

More information

Pipeline Operations. CS 4620 Lecture 10

Pipeline Operations. CS 4620 Lecture 10 Pipeline Operations CS 4620 Lecture 10 2008 Steve Marschner 1 Hidden surface elimination Goal is to figure out which color to make the pixels based on what s in front of what. Hidden surface elimination

More information

Motivation. Culling Don t draw what you can t see! What can t we see? Low-level Culling

Motivation. Culling Don t draw what you can t see! What can t we see? Low-level Culling Motivation Culling Don t draw what you can t see! Thomas Larsson Mälardalen University April 7, 2016 Image correctness Rendering speed One day we will have enough processing power!? Goals of real-time

More information

Rasterization Computer Graphics I Lecture 14. Scan Conversion Antialiasing Compositing [Angel, Ch , ]

Rasterization Computer Graphics I Lecture 14. Scan Conversion Antialiasing Compositing [Angel, Ch , ] 15-462 Computer Graphics I Lecture 14 Rasterization March 13, 2003 Frank Pfenning Carnegie Mellon University http://www.cs.cmu.edu/~fp/courses/graphics/ Scan Conversion Antialiasing Compositing [Angel,

More information

Pipeline Operations. CS 4620 Lecture 14

Pipeline Operations. CS 4620 Lecture 14 Pipeline Operations CS 4620 Lecture 14 2014 Steve Marschner 1 Pipeline you are here APPLICATION COMMAND STREAM 3D transformations; shading VERTEX PROCESSING TRANSFORMED GEOMETRY conversion of primitives

More information

The Traditional Graphics Pipeline

The Traditional Graphics Pipeline Last Time? The Traditional Graphics Pipeline Reading for Today A Practical Model for Subsurface Light Transport, Jensen, Marschner, Levoy, & Hanrahan, SIGGRAPH 2001 Participating Media Measuring BRDFs

More information

CS4620/5620: Lecture 14 Pipeline

CS4620/5620: Lecture 14 Pipeline CS4620/5620: Lecture 14 Pipeline 1 Rasterizing triangles Summary 1! evaluation of linear functions on pixel grid 2! functions defined by parameter values at vertices 3! using extra parameters to determine

More information

CSE 167: Introduction to Computer Graphics Lecture #18: More Effects. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

CSE 167: Introduction to Computer Graphics Lecture #18: More Effects. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016 CSE 167: Introduction to Computer Graphics Lecture #18: More Effects Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016 Announcements TA evaluations CAPE Final project blog

More information

Soft shadows. Steve Marschner Cornell University CS 569 Spring 2008, 21 February

Soft shadows. Steve Marschner Cornell University CS 569 Spring 2008, 21 February Soft shadows Steve Marschner Cornell University CS 569 Spring 2008, 21 February Soft shadows are what we normally see in the real world. If you are near a bare halogen bulb, a stage spotlight, or other

More information

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

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane Rendering Pipeline Rendering Converting a 3D scene to a 2D image Rendering Light Camera 3D Model View Plane Rendering Converting a 3D scene to a 2D image Basic rendering tasks: Modeling: creating the world

More information

Discrete Techniques. 11 th Week, Define a buffer by its spatial resolution (n m) and its depth (or precision) k, the number of

Discrete Techniques. 11 th Week, Define a buffer by its spatial resolution (n m) and its depth (or precision) k, the number of Discrete Techniques 11 th Week, 2010 Buffer Define a buffer by its spatial resolution (n m) and its depth (or precision) k, the number of bits/pixel Pixel OpenGL Frame Buffer OpenGL Buffers Color buffers

More information

Computer Graphics Lecture 11

Computer Graphics Lecture 11 1 / 14 Computer Graphics Lecture 11 Dr. Marc Eduard Frîncu West University of Timisoara May 15th 2012 2 / 14 Outline 1 Introduction 2 Transparency 3 Reflection 4 Recap 3 / 14 Introduction light = local

More information

The Traditional Graphics Pipeline

The Traditional Graphics Pipeline Final Projects Proposals due Thursday 4/8 Proposed project summary At least 3 related papers (read & summarized) Description of series of test cases Timeline & initial task assignment The Traditional Graphics

More information

E.Order of Operations

E.Order of Operations Appendix E E.Order of Operations This book describes all the performed between initial specification of vertices and final writing of fragments into the framebuffer. The chapters of this book are arranged

More information

Optimized Stencil Shadow Volumes. Cass Everitt & Mark J. Kilgard

Optimized Stencil Shadow Volumes. Cass Everitt & Mark J. Kilgard Optimized Stencil Shadow Volumes Cass Everitt & Mark J. Kilgard Outline: Complete Lecture Review of Stenciled Shadow Volumes Stenciled Shadow Volumes Optimizations More Information Outline: Review of Stenciled

More information

Deferred Rendering Due: Wednesday November 15 at 10pm

Deferred Rendering Due: Wednesday November 15 at 10pm CMSC 23700 Autumn 2017 Introduction to Computer Graphics Project 4 November 2, 2017 Deferred Rendering Due: Wednesday November 15 at 10pm 1 Summary This assignment uses the same application architecture

More information

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

Chapter 2 A top-down approach - How to make shaded images? Chapter 2 A top-down approach - How to make shaded images? Comp. Graphics (U), Chap 2 Global View 1 CGGM Lab., CS Dept., NCTU Jung Hong Chuang Graphics API vs. application API Graphics API Support rendering

More information

VISIBILITY & CULLING. Don t draw what you can t see. Thomas Larsson, Afshin Ameri DVA338, Spring 2018, MDH

VISIBILITY & CULLING. Don t draw what you can t see. Thomas Larsson, Afshin Ameri DVA338, Spring 2018, MDH VISIBILITY & CULLING Don t draw what you can t see. Thomas Larsson, Afshin Ameri DVA338, Spring 2018, MDH Visibility Visibility Given a set of 3D objects, which surfaces are visible from a specific point

More information

Computing Visibility. Backface Culling for General Visibility. One More Trick with Planes. BSP Trees Ray Casting Depth Buffering Quiz

Computing Visibility. Backface Culling for General Visibility. One More Trick with Planes. BSP Trees Ray Casting Depth Buffering Quiz Computing Visibility BSP Trees Ray Casting Depth Buffering Quiz Power of Plane Equations We ve gotten a lot of mileage out of one simple equation. Basis for D outcode-clipping Basis for plane-at-a-time

More information

INF3320 Computer Graphics and Discrete Geometry

INF3320 Computer Graphics and Discrete Geometry INF3320 Computer Graphics and Discrete Geometry The OpenGL pipeline Christopher Dyken and Martin Reimers 12.10.2011 Page 1 Pipeline operations Page 2 OpenGL fixed-function pipeline: Implements a fixed

More information

TDA362/DIT223 Computer Graphics EXAM (Same exam for both CTH- and GU students)

TDA362/DIT223 Computer Graphics EXAM (Same exam for both CTH- and GU students) TDA362/DIT223 Computer Graphics EXAM (Same exam for both CTH- and GU students) Saturday, January 13 th, 2018, 08:30-12:30 Examiner Ulf Assarsson, tel. 031-772 1775 Permitted Technical Aids None, except

More information

Shadows. Shadows. Spatial relationship between objects. Shadows as depth cue. Spatial relationship between objects

Shadows. Shadows. Spatial relationship between objects. Shadows as depth cue. Spatial relationship between objects Shadows Thanks to: Frédo Durand and Seth Teller MIT Shadows Realism Depth cue 1 2 Shadows as depth cue Spatial relationship between objects 3 Michael McCool Univ of Waterloo 4 Spatial relationship between

More information

Creating soft shadows

Creating soft shadows A Hybrid Approach One more shadow algorithm which deserves mention is McCool s clever idea shadow volume reconstruction from depth maps [McCool 2000]. This algorithm is a hybrid of the shadow map and shadow

More information

Shadow Techniques. Sim Dietrich NVIDIA Corporation

Shadow Techniques. Sim Dietrich NVIDIA Corporation Shadow Techniques Sim Dietrich NVIDIA Corporation sim.dietrich@nvidia.com Lighting & Shadows The shadowing solution you choose can greatly influence the engine decisions you make This talk will outline

More information

GUERRILLA DEVELOP CONFERENCE JULY 07 BRIGHTON

GUERRILLA DEVELOP CONFERENCE JULY 07 BRIGHTON Deferred Rendering in Killzone 2 Michal Valient Senior Programmer, Guerrilla Talk Outline Forward & Deferred Rendering Overview G-Buffer Layout Shader Creation Deferred Rendering in Detail Rendering Passes

More information

Basic GPU techniques Josef Pelikán CGG MFF UK Praha.

Basic GPU techniques Josef Pelikán CGG MFF UK Praha. Basic GPU techniques 2005-2018 Josef Pelikán CGG MFF UK Praha pepca@cgg.mff.cuni.cz http://cgg.mff.cuni.cz/~pepca/ Basic GPU 2018 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 1 / 22 Content visibility

More information

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

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo Computer Graphics Bing-Yu Chen National Taiwan University The University of Tokyo Hidden-Surface Removal Back-Face Culling The Depth-Sort Algorithm Binary Space-Partitioning Trees The z-buffer Algorithm

More information

Buffers, Textures, Compositing, and Blending. Overview. Buffers. David Carr Virtual Environments, Fundamentals Spring 2005 Based on Slides by E.

Buffers, Textures, Compositing, and Blending. Overview. Buffers. David Carr Virtual Environments, Fundamentals Spring 2005 Based on Slides by E. INSTITUTIONEN FÖR SYSTEMTEKNIK LULEÅ TEKNISKA UNIVERSITET Buffers, Textures, Compositing, and Blending David Carr Virtual Environments, Fundamentals Spring 2005 Based on Slides by E. Angel Compositing,

More information

This work is about a new method for generating diffusion curve style images. Although this topic is dealing with non-photorealistic rendering, as you

This work is about a new method for generating diffusion curve style images. Although this topic is dealing with non-photorealistic rendering, as you This work is about a new method for generating diffusion curve style images. Although this topic is dealing with non-photorealistic rendering, as you will see our underlying solution is based on two-dimensional

More information

FROM VERTICES TO FRAGMENTS. Lecture 5 Comp3080 Computer Graphics HKBU

FROM VERTICES TO FRAGMENTS. Lecture 5 Comp3080 Computer Graphics HKBU FROM VERTICES TO FRAGMENTS Lecture 5 Comp3080 Computer Graphics HKBU OBJECTIVES Introduce basic implementation strategies Clipping Scan conversion OCTOBER 9, 2011 2 OVERVIEW At end of the geometric pipeline,

More information

The Rasterization Pipeline

The Rasterization Pipeline Lecture 5: The Rasterization Pipeline (and its implementation on GPUs) Computer Graphics CMU 15-462/15-662, Fall 2015 What you know how to do (at this point in the course) y y z x (w, h) z x Position objects

More information

CS452/552; EE465/505. Clipping & Scan Conversion

CS452/552; EE465/505. Clipping & Scan Conversion CS452/552; EE465/505 Clipping & Scan Conversion 3-31 15 Outline! From Geometry to Pixels: Overview Clipping (continued) Scan conversion Read: Angel, Chapter 8, 8.1-8.9 Project#1 due: this week Lab4 due:

More information

Programming Graphics Hardware

Programming Graphics Hardware Tutorial 5 Programming Graphics Hardware Randy Fernando, Mark Harris, Matthias Wloka, Cyril Zeller Overview of the Tutorial: Morning 8:30 9:30 10:15 10:45 Introduction to the Hardware Graphics Pipeline

More information

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

CSE 167: Introduction to Computer Graphics Lecture #9: Visibility. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2018 CSE 167: Introduction to Computer Graphics Lecture #9: Visibility Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2018 Announcements Midterm Scores are on TritonEd Exams to be

More information

CS 354R: Computer Game Technology

CS 354R: Computer Game Technology CS 354R: Computer Game Technology Texture and Environment Maps Fall 2018 Texture Mapping Problem: colors, normals, etc. are only specified at vertices How do we add detail between vertices without incurring

More information

Fog and Cloud Effects. Karl Smeltzer Alice Cao John Comstock

Fog and Cloud Effects. Karl Smeltzer Alice Cao John Comstock Fog and Cloud Effects Karl Smeltzer Alice Cao John Comstock Goal Explore methods of rendering scenes containing fog or cloud-like effects through a variety of different techniques Atmospheric effects make

More information

S U N G - E U I YO O N, K A I S T R E N D E R I N G F R E E LY A VA I L A B L E O N T H E I N T E R N E T

S U N G - E U I YO O N, K A I S T R E N D E R I N G F R E E LY A VA I L A B L E O N T H E I N T E R N E T S U N G - E U I YO O N, K A I S T R E N D E R I N G F R E E LY A VA I L A B L E O N T H E I N T E R N E T Copyright 2018 Sung-eui Yoon, KAIST freely available on the internet http://sglab.kaist.ac.kr/~sungeui/render

More information

Interactive Computer Graphics A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL

Interactive Computer Graphics A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL International Edition Interactive Computer Graphics A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL Sixth Edition Edward Angel Dave Shreiner Interactive Computer Graphics: A Top-Down Approach with Shader-Based

More information

Introduction to Visualization and Computer Graphics

Introduction to Visualization and Computer Graphics Introduction to Visualization and Computer Graphics DH2320, Fall 2015 Prof. Dr. Tino Weinkauf Introduction to Visualization and Computer Graphics Visibility Shading 3D Rendering Geometric Model Color Perspective

More information

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

Lecture 17: Shadows. Projects. Why Shadows? Shadows. Using the Shadow Map. Shadow Maps. Proposals due today. I will mail out comments Projects Lecture 17: Shadows Proposals due today I will mail out comments Fall 2004 Kavita Bala Computer Science Cornell University Grading HW 1: will email comments asap Why Shadows? Crucial for spatial

More information

CPSC GLOBAL ILLUMINATION

CPSC GLOBAL ILLUMINATION CPSC 314 21 GLOBAL ILLUMINATION Textbook: 20 UGRAD.CS.UBC.CA/~CS314 Mikhail Bessmeltsev ILLUMINATION MODELS/ALGORITHMS Local illumination - Fast Ignore real physics, approximate the look Interaction of

More information

Ray Tracing Basics I. Computer Graphics as Virtual Photography. camera (captures light) real scene. photo. Photographic print. Photography: processing

Ray Tracing Basics I. Computer Graphics as Virtual Photography. camera (captures light) real scene. photo. Photographic print. Photography: processing Ray Tracing Basics I Computer Graphics as Virtual Photography Photography: real scene camera (captures light) photo processing Photographic print processing Computer Graphics: 3D models camera model (focuses

More information

Pixels and Buffers. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science

Pixels and Buffers. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science Pixels and Buffers CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science 1 Objectives Introduce additional OpenGL buffers Learn to read from / write to buffers Introduce

More information

Real-Time Rendering (Echtzeitgraphik) Michael Wimmer

Real-Time Rendering (Echtzeitgraphik) Michael Wimmer Real-Time Rendering (Echtzeitgraphik) Michael Wimmer wimmer@cg.tuwien.ac.at Walking down the graphics pipeline Application Geometry Rasterizer What for? Understanding the rendering pipeline is the key

More information

1.2.3 The Graphics Hardware Pipeline

1.2.3 The Graphics Hardware Pipeline Figure 1-3. The Graphics Hardware Pipeline 1.2.3 The Graphics Hardware Pipeline A pipeline is a sequence of stages operating in parallel and in a fixed order. Each stage receives its input from the prior

More information

Performance OpenGL Programming (for whatever reason)

Performance OpenGL Programming (for whatever reason) Performance OpenGL Programming (for whatever reason) Mike Bailey Oregon State University Performance Bottlenecks In general there are four places a graphics system can become bottlenecked: 1. The computer

More information

Scan line algorithm. Jacobs University Visualization and Computer Graphics Lab : Graphics and Visualization 272

Scan line algorithm. Jacobs University Visualization and Computer Graphics Lab : Graphics and Visualization 272 Scan line algorithm The scan line algorithm is an alternative to the seed fill algorithm. It does not require scan conversion of the edges before filling the polygons It can be applied simultaneously to

More information

CS 130 Final. Fall 2015

CS 130 Final. Fall 2015 CS 130 Final Fall 2015 Name Student ID Signature You may not ask any questions during the test. If you believe that there is something wrong with a question, write down what you think the question is trying

More information

A Shadow Volume Algorithm for Opaque and Transparent Non-Manifold Casters

A Shadow Volume Algorithm for Opaque and Transparent Non-Manifold Casters jgt 2008/7/20 22:19 page 1 #1 Vol. [VOL], No. [ISS]: 1?? A Shadow Volume Algorithm for Opaque and Transparent Non-Manifold Casters Byungmoon Kim 1, Kihwan Kim 2, Greg Turk 2 1 NVIDIA, 2 Georgia Institute

More information

Adaptive Point Cloud Rendering

Adaptive Point Cloud Rendering 1 Adaptive Point Cloud Rendering Project Plan Final Group: May13-11 Christopher Jeffers Eric Jensen Joel Rausch Client: Siemens PLM Software Client Contact: Michael Carter Adviser: Simanta Mitra 4/29/13

More information

TSBK03 Screen-Space Ambient Occlusion

TSBK03 Screen-Space Ambient Occlusion TSBK03 Screen-Space Ambient Occlusion Joakim Gebart, Jimmy Liikala December 15, 2013 Contents 1 Abstract 1 2 History 2 2.1 Crysis method..................................... 2 3 Chosen method 2 3.1 Algorithm

More information

Computer Graphics I Lecture 11

Computer Graphics I Lecture 11 15-462 Computer Graphics I Lecture 11 Midterm Review Assignment 3 Movie Midterm Review Midterm Preview February 26, 2002 Frank Pfenning Carnegie Mellon University http://www.cs.cmu.edu/~fp/courses/graphics/

More information

Class of Algorithms. Visible Surface Determination. Back Face Culling Test. Back Face Culling: Object Space v. Back Face Culling: Object Space.

Class of Algorithms. Visible Surface Determination. Back Face Culling Test. Back Face Culling: Object Space v. Back Face Culling: Object Space. Utah School of Computing Spring 13 Class of Algorithms Lecture Set Visible Surface Determination CS56 Computer Graphics From Rich Riesenfeld Spring 13 Object (Model) Space Algorithms Work in the model

More information

Virtual Reality for Human Computer Interaction

Virtual Reality for Human Computer Interaction Virtual Reality for Human Computer Interaction Appearance: Lighting Representation of Light and Color Do we need to represent all I! to represent a color C(I)? No we can approximate using a three-color

More information

Module 13C: Using The 3D Graphics APIs OpenGL ES

Module 13C: Using The 3D Graphics APIs OpenGL ES Module 13C: Using The 3D Graphics APIs OpenGL ES BREW TM Developer Training Module Objectives See the steps involved in 3D rendering View the 3D graphics capabilities 2 1 3D Overview The 3D graphics library

More information

Volume Shadows Tutorial Nuclear / the Lab

Volume Shadows Tutorial Nuclear / the Lab Volume Shadows Tutorial Nuclear / the Lab Introduction As you probably know the most popular rendering technique, when speed is more important than quality (i.e. realtime rendering), is polygon rasterization.

More information

Advanced Shading I: Shadow Rasterization Techniques

Advanced Shading I: Shadow Rasterization Techniques Advanced Shading I: Shadow Rasterization Techniques Shadow Terminology umbra: light totally blocked penumbra: light partially blocked occluder: object blocking light Shadow Terminology umbra: light totally

More information

Page 1. Area-Subdivision Algorithms z-buffer Algorithm List Priority Algorithms BSP (Binary Space Partitioning Tree) Scan-line Algorithms

Page 1. Area-Subdivision Algorithms z-buffer Algorithm List Priority Algorithms BSP (Binary Space Partitioning Tree) Scan-line Algorithms Visible Surface Determination Visibility Culling Area-Subdivision Algorithms z-buffer Algorithm List Priority Algorithms BSP (Binary Space Partitioning Tree) Scan-line Algorithms Divide-and-conquer strategy:

More information

Models and Architectures

Models and Architectures Models and Architectures Objectives Learn the basic design of a graphics system Introduce graphics pipeline architecture Examine software components for an interactive graphics system 1 Image Formation

More information

Visible-Surface Detection Methods. Chapter? Intro. to Computer Graphics Spring 2008, Y. G. Shin

Visible-Surface Detection Methods. Chapter? Intro. to Computer Graphics Spring 2008, Y. G. Shin Visible-Surface Detection Methods Chapter? Intro. to Computer Graphics Spring 2008, Y. G. Shin The Visibility Problem [Problem Statement] GIVEN: a set of 3-D surfaces, a projection from 3-D to 2-D screen,

More information

Applications of Explicit Early-Z Culling

Applications of Explicit Early-Z Culling Applications of Explicit Early-Z Culling Jason L. Mitchell ATI Research Pedro V. Sander ATI Research Introduction In past years, in the SIGGRAPH Real-Time Shading course, we have covered the details of

More information

Announcements. Written Assignment 2 out (due March 8) Computer Graphics

Announcements. Written Assignment 2 out (due March 8) Computer Graphics Announcements Written Assignment 2 out (due March 8) 1 Advanced Ray Tracing (Recursive) Ray Tracing Antialiasing Motion Blur Distribution Ray Tracing Ray Tracing and Radiosity Assumptions Simple shading

More information

Ray tracing. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd 3/19/07 1

Ray tracing. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd 3/19/07 1 Ray tracing Computer Graphics COMP 770 (236) Spring 2007 Instructor: Brandon Lloyd 3/19/07 1 From last time Hidden surface removal Painter s algorithm Clipping algorithms Area subdivision BSP trees Z-Buffer

More information

Last Time: Acceleration Data Structures for Ray Tracing. Schedule. Today. Shadows & Light Sources. Shadows

Last Time: Acceleration Data Structures for Ray Tracing. Schedule. Today. Shadows & Light Sources. Shadows Last Time: Acceleration Data Structures for Ray Tracing Modeling Transformations Illumination (Shading) Viewing Transformation (Perspective / Orthographic) Clipping Projection (to Screen Space) Scan Conversion

More information

Introduction to Computer Graphics with WebGL

Introduction to Computer Graphics with WebGL Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science Laboratory University of New Mexico Models and Architectures

More information

Shadow Rendering EDA101 Advanced Shading and Rendering

Shadow Rendering EDA101 Advanced Shading and Rendering Shadow Rendering EDA101 Advanced Shading and Rendering 2006 Tomas Akenine-Möller 1 Why, oh why? (1) Shadows provide cues about spatial relationships among objects 2006 Tomas Akenine-Möller 2 Why, oh why?

More information

Shadows. Shadows. Spatial relationship between objects. Shadows as depth cue. Spatial relationship between objects

Shadows. Shadows. Spatial relationship between objects. Shadows as depth cue. Spatial relationship between objects Shadows Thanks to: Frédo Durand and Seth Teller MIT Shadows Realism Depth cue 1 2 Shadows as depth cue Spatial relationship between objects 3 Michael McCool Univ of Waterloo 4 Spatial relationship between

More information

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

Models and Architectures. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico Models and Architectures Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico 1 Objectives Learn the basic design of a graphics system Introduce

More information

lecture 21 volume rendering - blending N layers - OpenGL fog (not on final exam) - transfer functions - rendering level surfaces

lecture 21 volume rendering - blending N layers - OpenGL fog (not on final exam) - transfer functions - rendering level surfaces lecture 21 volume rendering - blending N layers - OpenGL fog (not on final exam) - transfer functions - rendering level surfaces - 3D objects Clouds, fire, smoke, fog, and dust are difficult to model with

More information

Order Independent Transparency with Dual Depth Peeling. Louis Bavoil, Kevin Myers

Order Independent Transparency with Dual Depth Peeling. Louis Bavoil, Kevin Myers Order Independent Transparency with Dual Depth Peeling Louis Bavoil, Kevin Myers Document Change History Version Date Responsible Reason for Change 1.0 February 9 2008 Louis Bavoil Initial release Abstract

More information

Advanced Ray Tracing

Advanced Ray Tracing Advanced Ray Tracing Thanks to Fredo Durand and Barb Cutler The Ray Tree Ni surface normal Ri reflected ray Li shadow ray Ti transmitted (refracted) ray 51 MIT EECS 6.837, Cutler and Durand 1 Ray Tree

More information

Textures. Texture coordinates. Introduce one more component to geometry

Textures. Texture coordinates. Introduce one more component to geometry Texturing & Blending Prof. Aaron Lanterman (Based on slides by Prof. Hsien-Hsin Sean Lee) School of Electrical and Computer Engineering Georgia Institute of Technology Textures Rendering tiny triangles

More information