1 / 14

Shadow

Shadow. No, not the Hank Marvin kind!. Go to:. http://developer.nvidia.com/object/doc_shadows.html Particularly, read the paper “shadow considerations” from 2004. Shadow solutions: 5 Categories. Pre computed (texture based) Volume based Depth based Hybrid Raytrace. Pre computed shadows.

kamea
Download Presentation

Shadow

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Shadow No, not the Hank Marvin kind!

  2. Go to: • http://developer.nvidia.com/object/doc_shadows.html • Particularly, read the paper “shadow considerations” from 2004

  3. Shadow solutions: 5 Categories • Pre computed (texture based) • Volume based • Depth based • Hybrid • Raytrace

  4. Pre computed shadows • Lightmaps • Use textures to store lighting information • “Bake” textures using an offline process • Modulate the base texture with the lighting texture to get the final result • Used in many games since Quake made the technique popular

  5. Pre computed shadows • The “baking” process can be computationally heavy (using global illumination, radiosity) • Have a look at “Turtle” http://www.illuminatelabs.com/ • They used an SGI machine for Quake • Textures take up memory (console issue) • Quality of lighting can be very nice because all computation is done “offline” • Interesting factoid: Halo3 uses banks of XBOX360’s to compute the lighting

  6. Volume based shadows • Uses a buffer called a “stencil buffer” • Often called stencil shadows • What we need to know, is whether a surface is being shadowed by another surface • This involves a test to determine whether the surface in question is occluded by the volume of the blocker surface • We can do this by determining the volume of the space behind the blocker (with respect to the light source)

  7. Volume based shadows • First implementation seems to be “Severance blade of darkness” • Actually, there was one called “into the shadows” by scavenger, but the company folded • Carmack popularised them • Read Mark Kilgards slides on the zpass/zfail issues • There are new techniques working with them (see nvidia site)

  8. Depth based shadows • Use some kind of buffer to store a depth per light • This depth is the closest surface the light can “see” • Its basically a depth buffer (like the z buffer we use for surface sorting) • If the distance from the light to the surface > than the closest depth in the depth buffer, then the object is in shadow (i.e. Something is in front of it when looking towards the light) • This all happens when rendering the object, basically it is a texture lookup • BUT, its not without limitations (primarily sampling) • http://developer.nvidia.com/object/hwshadowmap_paper.html • http://developer.nvidia.com/object/cedec_shadowmap.html

  9. Depth based shadows • Good for complex geometry (because we are rendering with hardware, which is fast) • Can be complex to handle the sampling issues properly in a scene

  10. Hybrid shadows • Take the better parts of precomputed, volume and image based shadows • Use the appropriate method for the type of scene and shadowing requirements • Can be complicated to get into an engine/shader • Ideally, we’d prefer to have a single solution that just works!

  11. Raytracing • Physically correct • Handles complex light interactions with a scene, for instance sub-surface scattering, reflection and refraction • Computationally expensive • But seems we are getting more horsepower all the time! • http://developer.nvidia.com/docs/IO/8230/GDC2003_Gaffer2GameEngine.pdf • Consider that new hardware is going to offer more in this area

  12. Side issue: Deferred rendering • See Hargreaves GDC presentation (2004) • http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter09.html • I’ve seen interviews with videocard vendors that state that deferred shading is going to be used a lot more in the future. • Crytek uses it for Cryengine • http://ati.amd.com/developer/siggraph06/Wenzel-Real-time_Atmospheric_Effects_in_Games.pdf

  13. Different types of shadow map • PSSM (Parallel split) • CSM (Cascaded) • Have a look at a few others too!

More Related