Archived

This topic is now archived and is closed to further replies.

Shadow Volumes or Shadow Maps?

This topic is 4946 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m interested in implementing a "shadow" engine into my current game engine i''m working on. I''m looking to be able to do shadows for point lights and spotlights. I''ve heard that the Post-Projection Shadow Map technique is great for outdoors since it can be used when the light is the "sun." However, i''m not interested in going that far quite yet, i simply want to be able to do the basic things: spot light shadows point light shadows shadows onto arbitrary objects From what research i''ve done, both of them /can/ do this, but i''m really interested in which one would be most beneficial for me. Also, i''m unable to find any good tutorials on how to do shadow maps and shadows with them, if anyone can supply links to good tutorials that would be much appreciated.

Share this post


Link to post
Share on other sites
what hardware are you targeting?
shadow maps needs pixel shaders, and shadow volume without a vertex shader would be very slow, so I think you should be targeting the DX8.1 hardware.

For a good engine, you should support both types.for some scenes or objects,one method cann''t be used.
for example when rendering a tree, you cannot build a shadow volume for each leaf or branch,this would kill the fill rate, so shadow maps should be used in this situation.
see the thread called unreal 3 lighting, where Daniel vogel from epic talked about the situations to use shadow volume or shadow maps in Unreal 3 engine.Unreal 3 engine supports both of them,and also supports projective shadows.

Share this post


Link to post
Share on other sites
http://www.gamedev.net/reference/articles/article1990.asp

amazing how simply you can do everything on the GPU

but i wonder up to how many lightsources one can implement shadowvolumes at decent speeds

Share this post


Link to post
Share on other sites
I''m targetting DX8.1 or better cards, definetly. I myself will be coding on a Radeon 9700.

It looks like the Shadow Volume will work quite well for what i''m trying to do, but i will also look into Shadow Maps as an alternative such that one can toggle them depending on situation (indoor vs outdoor, spotlight vs "room" light, etc).

A few questions:
As for the shadow volume itself being extruded, i''m not sure what type of computation to do to reach this. In other words, what does one do to extrude along the light ray like that? Is it a matrix multiplication?

Thanks for everything.

Share this post


Link to post
Share on other sites
look at a model from the light`s position and extrude those edges that make up the boundary of the model


you have a quad made up of 2 triangles the diagonal edge can be removed the others make up the shadowvolume when you extrude them to infinity pretty easy

to represent edges us quadrics so you can trick the vertex shader and do all the edge extrusion in the GPU *much faster*

Share this post


Link to post
Share on other sites