Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Shadow Occlusion Rendering  (Read 2312 times)

0 Members and 1 Guest are viewing this topic.

lolz123

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
Shadow Occlusion Rendering
« on: September 14, 2011, 11:20:27 pm »
Hello,

I create a 2D dynamic shadows algorithm that uses a quad tree to store lights and shadow hulls.

For those unfamiliar with what 2D dynamic shadows are check this out:

http://archive.gamedev.net/archive/reference/articles/article2032.html

This allows me to quickly access which lights are affecting which hulls. However, I would now also like to do something similar to occlusion culling except with shadows.

If a hull is in a shadow of another hull, it doesn't have to render the shadow since it is already dark anyways. In the image below, the shadow of the shadow hull on the bottom left doesn't actually need to be rendered since it is in the shadow of the hull to the top left of it:



However, to do this effectively, I need to perform a "reverse painter" algorithm with the quad tree somehow, where things closer to the light are drawn first. Any ideas on how to do this would be helpful.

Also, for the shadow occlusion itself, is there a way to detect if a certain z buffer value is currently in a particular region in the z buffer? I believe that that this is how hardware accelerated occlusion culling systems work, but I do not know how to do it in OpenGL.

Any help would be appreciated.

[EDIT]:

Well, I found out a way to do the occlusion culling part. However, the problem of sorting the objects according to the distance from the light source still remains.
Have you heard about the new Cray super computer?  It’s so fast, it executes an infinite loop in 6 seconds.

 

anything