Sign in to follow this  

ABTs or Octrees with many lights and shadowing

This topic is 4032 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

The main purpose of an octree or ABT would be to quickly cull geometry using a view frustum. However, shadow casting geometry that is culled in this way may still need to cast a shadow into the scene. My engine currently sorts and stores geometry that passes the culling phase into a list for each visible light, and renders one pass per light. Any suggestions on an effective way to cull and sort the geometry when there are many lights that use shadowing? Should I just go through the trees and cull nodes against each visible light radius/volume? Or is there a better way?

Share this post


Link to post
Share on other sites
There exists the concept of an extended frustum, where for each light the normal view frustum is extended to also include the light source. So shadow casting geometry isn't culled (or at least can be categorized especially).
See http://www.gamedev.net/columns/hardcore/shadowcast/

Some people rely on "deferred rendering" when many lights are involved. However, deferred rendering is a totally other approach than forward rendering is. If interested:
See http://www.beyond3d.com/articles/deflight/

Share this post


Link to post
Share on other sites
All of your light sources have their own frustum. It defines both what objects are affected by the light and what objects cast shadows. The standard way is to draw the scene from the light's view to produce the shadow map. I don't see a way how this could be done without traversing the node tree and testing all nodes against the light's frustum. Standard hierarchical optimisations apply.

A simple optimisation is to test the light frustum against the camera frustum. If even the light frustum is not visible, you can skip shadow map generation completely. This also works separately for the six cube map faces of a point light, for example.

Bye, Thomas

Share this post


Link to post
Share on other sites
That link is exactly what I was looking for.

I use culling with light frustums when shadow mapping is enabled, but the shadowing method is decided on a per light basis, when a light uses shadow volumes I have to cull against the light volume. I have been testing the light volumes against the camera frustum, but haven't tried testing light frustums against it. I'll have to look into how to do frustum-frustum intersection tests.

Thanks for the replies

Share this post


Link to post
Share on other sites

This topic is 4032 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this