Jump to content
  • Advertisement

Archived

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

jollyjeffers

Limit of shadow projections (3D shadow volumes)

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

hi all, I''m just trying to work out a bit of maths for a little terrain demo that I''ve got in the back of my mind (note: no code as of yet). For culling I''ve divided said terrain into sectors, and I can then use a quadtree to remove a large number of these sectors very efficiently. However, I need a new culling system to help with shadows. The problem is that sectors NOT on screen (ie, culled normally) can still cast shadows that affect geometry that is on screen. This isn''t a problem for point lights, but is a little tricky for directional lights (I only support the 2). Here is my idea for deciding which terrain sectors are used to cast shadows: For each sector, and given the current directional light.. if I take the highest point of the land in the sector (the peak) and then project a line (directional lights dir. vector) down to the height=0 plane I can get an X/Y coordinate. If I take this X/Y coordinate, along with the center of the terrain sector I can genereate a sphere (center+radius). If this sphere intersects the view frustum (simple test) then I know that the current sector potentially casts a shadow on-screen does this follow with y''all?? cheers, Jack DirectX 4 VB: All you need for multimedia programming in Visual Basic Formula 1 Championship Manager, My Game Project.

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!