Jump to content
  • Advertisement
Sign in to follow this  
BlackBox

Shadows Performance?

This topic is 4977 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 trying to implement shadows in my program but I don't have a clue how many things I can add shadows to. For example: If I add stencil shadows to my world, what is the maximum shadowed polygon I can have? BTW Any benchmark about shadows will be greatly appreciated. Thanks a lot.

Share this post


Link to post
Share on other sites
Advertisement
Within reason, there really aren't any maximums. The performance will simply decrease as geometry and shadow complexity increases. I suggest you go ahead an implement it, then experiment with detail levels.

For a general idea of stencil shadow performance, you could have a play with Doom 3.

Share this post


Link to post
Share on other sites
There are many different ways of doing shadows, depending on how you want your game to look. They will all have different performance characteristics.

+ You could do stencil shadows like Doom3. There are plenty of tricks to make this faster. For example, you can use lower-resolution models to cast the shadows.
+ Or you could do lightmaps for static level geometry and shadow maps for characters etc., like HL2
+ Or just simple lightmaps plus a dark blob underneath players (actually works quite well!)
+ Old flight sims with completely (or mostly) flat ground could just project the plane onto the ground using some simple math. Very limited, but also very fast

Basically, you'll need to pick a method that you think will work well with YOUR game, and then see how well it runs. If it's too slow, you can attempt to optimize it, pick a simpler/faster method, or scale down something else instead. It's not easy to predict how fast things will go in one specific situation without trying it - in fact, it's hard to even tell what will be an acceptable speed.

Share this post


Link to post
Share on other sites
Quote:
Original post by uavfun

Basically, you'll need to pick a method that you think will work well with YOUR game, and then see how well it runs. If it's too slow, you can attempt to optimize it, pick a simpler/faster method, or scale down something else instead. It's not easy to predict how fast things will go in one specific situation without trying it - in fact, it's hard to even tell what will be an acceptable speed.


Great :) , more long nights for me :(

Well at least when its done I will know a little bit more about shadows.

Thanks.

Share this post


Link to post
Share on other sites
Quote:
Original post by yjh1982
why I downed the shadow map demo all are very slow.


which ones and on what card?
The biggest killer on shadow maps is the fact you have to render the scene n+1 times (where n is the number of lights which cast shadows) which can slow things down a fair amount if you have alot of lights and need to copy (ATI problem as you cant render directly to a depth buffer, there are ways around it however)

and frankly, shadow maps (and things like them) are the future (Unreal3 engine and whatever iD work on next are both using them), because they are ALOT easier to work with, more GPU based and you get automagical self shadowing.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!