week 11 monday what did we talk about last time project 2
play

Week 11 - Monday What did we talk about last time? Project 2 work - PowerPoint PPT Presentation

Week 11 - Monday What did we talk about last time? Project 2 work day Before that: environment mapping Blinn and Newell's method Sphere mapping Cubic environmental mapping Environment mapping in MonoGame The


  1. Week 11 - Monday

  2.  What did we talk about last time?  Project 2 work day  Before that: environment mapping  Blinn and Newell's method  Sphere mapping  Cubic environmental mapping  Environment mapping in MonoGame

  3.  The reflectance equation we have been studying is: ∫ = ⊗ L ( p , v ) f ( l , v ) L ( p , l ) cos θ d ω o i i i Ω  The full rendering equation is: ∫ = ⊗ − L ( p , v ) f ( l , v ) L ( r ( p , l ), l ) cos θ d ω o o i i Ω  The difference is the L o ( r ( p , l ),- l ) term which means that the incoming light to our point is the outgoing light from some other point  Unfortunately, this is all recursive (and can go on nearly forever)

  4.  Real-time rendering uses local (non-recursive) lighting whenever possible  Global illumination causes all of our problems (unbounded object-object interaction)  Transparency  Reflections  Shadows

  5.  We can describe a path that light L makes to the eye E using the following notation Operator Description Example Explanation Zero or more specular S * * Zero or more bounces One or more diffuse D + + One or more bounces Zero or one specular S ? ? Zero or one bounces Either a diffuse or two D | SS | Either/or specular bounces Zero or more of diffuse or ( D | S )* () Group specular

  6.  Shadow terminology:  Occluder: object that blocks the light  Receiver: object the shadow is cast onto  Point lights cast hard shadows (regions are completely shadows or not)  Area lights cast soft shadows  Umbra is the fully shadowed part  Penumbra is the partially shadowed part

  7.  A planar shadow occurs when an object casts a shadow on a flat surface  Projection shadows are a technique for making planar shadows:  Render the object normally  Project the entire object onto the surface  Render the object a second time with all its polygons set to black  The book gives the projection matrix for arbitrary planes

  8.  We need to bias (offset) the plane just a little bit  Otherwise, we get z fighting and the shadows can be below the surface  Shadows can be draw larger than the plane  The stencil buffer can be used to fix this  Only opaque shadows work  Partially transparent shadows will make some parts too dark  Z -buffer and stencil buffer tricks can Hard to see example from Shogo: MAD help with this too

  9.  Another fix for projection shadows is rendering them to a texture, then rendering the texture  Effects like blurring the texture can soften shadow  If the light source is between the occluder and the receiver, an antishadow is generated

  10.  True soft shadows occur due to area lights  We can simulate area lights with a number of point lights  For each point light, we draw a shadow in an accumulation buffer  We use the accumulation buffer as a texture drawn on the surface  Alternatively, we can move the receiver up and down slightly and average those results  Both methods can require many passes to get good results

  11.  You can also blur based on the amount of distance from the occluder to the receiver  It doesn't always look right if the occluder touches the receiver  Haines's method is to paint the silhouette of the hard shadow with gradients  The width is proportional to the height of the silhouette edge casting the shadow

  12.  All you need is the appropriate matrix to flatten all the geometry of your model onto a plane Matrix shadow = Matrix.CreateShadow(Vector3.UnitY, new Plane(Vector3.UnitY, 100));  In this case, the shadow is cast from a light vector that's in positive y onto a plane with a normal that's also positive y , 100 units below the origin  All that's needed is to update the world matrix: world = world * shadow  Then draw the model with lighting off and a black color

  13.  More on shadows  Shadow volumes  Shadow mapping  Ambient occlusion

  14.  Start Assignment 4  Start Project 3  Keep reading Chapter 9

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend