Skip to main content
GameDev.net gamedev.net
🔒 Locked

its a shadow thing..

Started by GliTch Apr 8, 2002 at 4:50 PM 1 replies 450+ views
Original Post
GliTch
GliTch
I just started reading articles about shadows, so my question might not make any sense. is it good idea to use shadow volume if you have complex scene, multiple lights. It look to me that its a lot of work to get a shadow from an object. when they talk about lightmap and stencil buffer, are they the same? if anyone know a good link on shadows, please let me know. thanks
juhaszt
juhaszt
I am not a shadow expert but I think YES, to use shadow volume in a complex scene is a lot of work and will work only with a super computer...

Lightmap and stencil buffer are not the same, I think light map is a kind of multitexturing technique.
programmer
Sorrow
Sorrow
quote:

to use shadow volume in a complex scene is a lot of work and will work only with a super computer...



Let''s not exagerate here You currently have to do one pass (or set of rendering passes) per light for stencil shadows. From what I''ve read it looks like stencil shadows are being used for doom3, which will run on a desktop (not a super computer.)

That said it is a potentially intensive task.



A Stencil buffer is kin to the color buffer or the z buffer, you have one stencil value per screen pixel. Then you can increment it or decrement it when the z buffer test passes, and you can also perform a stencil test to determine wether to write a pixel to the screen or not. To do stencil shadow volumes you use rendering techniques to fill the stencil buffer with 0 where the pixel is lit and >=1 where it is not, and then render the scene with the light (only drawing pixels where the stencil buffer contains 0).

That''s the cole''s notes version.



A light map has NOTHING to do with this. It involves precomputing the effects of light on static geometry and storing it to a low resolution texture. That texture is blended onto the geometry at run time.

Light maps look as good as you want them to, but only work well for static geometry with static lights.

Stencil shadows work for dyanmic objects and dynamic lights... but correspondingly require more work.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.