Download presentation
Presentation is loading. Please wait.
Published byMelvin Randall Modified over 9 years ago
1
Shadow No, not the Hank Marvin kind!
2
Go to: http://developer.nvidia.com/object/doc_shad ows.html http://developer.nvidia.com/object/doc_shad ows.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
7
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)
8
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)
9
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
10
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
11
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!
12
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 http://developer.nvidia.com/docs/IO/8230/GDC2003_ Gaffer2GameEngine.pdf Consider that new hardware is going to offer more in this area
13
Side issue: Deferred rendering See Hargreaves GDC presentation (2004) http://http.developer.nvidia.com/GPUGems2/gp ugems2_chapter09.html http://http.developer.nvidia.com/GPUGems2/gp ugems2_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/Wenz el-Real-time_Atmospheric_Effects_in_Games.pdf http://ati.amd.com/developer/siggraph06/Wenz el-Real-time_Atmospheric_Effects_in_Games.pdf
14
Different types of shadow map PSSM (Parallel split) CSM (Cascaded) Have a look at a few others too!
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.