Jump to content
  • Advertisement
Sign in to follow this  
Funkymunky

AO or SS

This topic is 4464 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 looking into doing my shadows/shading and whatnot. I'm planning on doing mostly outdoor scenes with either a distant directional light or a localized point light. Should I try to implement Ambient Occlusion? Or should I look into one of those shadow map techniques to get soft shadows. As I understand it you basically render the vew from the light into a depth map and then project the texture onto the scene. Which do you think is easier to implement and is the better effect in the end?

Share this post


Link to post
Share on other sites
Advertisement
Ambient Occlusion is hardly suitable for dynamic shadows. It's fine for static scenes because it is a very exhaustive computational pass, which for static scenes can just be baked into a texture ahead of time and you just multiply it by your lighting. Baking an AO map onto a rigid object is actually a pretty good way to get some self-shadowing without extra work.

In general, though, shadow maps for dynamic scenery is relatively simple and generic. And the idea is just render a depth map from the light view, and when you render the scene, you take every point and transform it into light view space and then compare its distance from the light against the distance in the light depth map -- if it's farther than what's in the depth map, the point is in shadow. Obviously, you need to tune the depth-bias just right or you get some nasty self-shadowing errors.

Soft shadows with PCF filtering simply implies that when you do your scene render pass, you take multiple tests nearby and average the result for a "partial shadow" darkening factor. Other soft shadow variants like Variance Shadow Maps have the same effect except that the softening doesn't have to be done in your shader.

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!