Jump to content
  • Advertisement

Archived

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

Marty666

shadow mapping problems

This topic is 5327 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 going to do some realtime shadowmapping in my simple game engine. It''ll be a 3D space shooter. I''d like some dynamic lights (weapons fire, etc) and shadow mapping (sun, maybe explosions) in it. I''ve never done any shadowmapping, so i read through some articles. I''ve got 3 problems to solve: 1: The resolution of the shadowmap should be very high for shadows cast near the camera and far from the light. (Problem when i use it for the sun which is pretty far away I could split the shadowmap in smaller portions with different resultions (better culling in problem 2 too, but big problem if i have to do ''m all) 2: The shadowmap is only one fustrum big. Should i make more for all directions (fore, back, left, right, up, down)? I could cull away the sides I don''t need. 3: All lights cast infinite shadows this way. Can I fix this by only taking z value''s within the lights range or set the near plane closer? And would a close near plane result in more accurate depth values of the shadowmap? Thanx, Marty

Share this post


Link to post
Share on other sites
Advertisement
I also was a big fan of the shadow mapping method but after some experiments with them, I figured out they''re way far from being pratical.

If you could search back the forums maybe you''ll be able to find the original post. The point of it is that updating the shadowmap is usually way too expensive using pbuffers due to context switches. It goes something better with render-to-backbuffer and copy-to-texture but other problems arises.

I suggest you to let shadowmaps alone (at least until uberbuffers are out) and go for shadow volumes instead.

To made the light attenuated, I was planning to use a fragment program to lookup an attenuation table.

Share this post


Link to post
Share on other sites
Ok, since i''m making a 3D space shooter where the shadows only drop from and onto spaceships the geometry won''t be too complex. I figured calculating all the silhouettes would take far too long for like 100 ships (because they''re all visible in space since there is nothing in between them).
I might render the ship to a texture from the lights point of view in b&w. Then project the texture on the other ship. I''d only need to to this if the ships are close enough to cast shadows on eachother (no need for infinite shadows). Maybe i can even find a fast algho to blur the textures edges to create fake soft shadows. Well i''ll leave the softshadows for now and try to do the projected shadow textures.
Anyone thinks this sounds good? Rendering a ship to a b&w texture should be fast enough. Projecting would be slower with complex geometry ships though and has it''s own problems.

Please comment,
Marty

Share this post


Link to post
Share on other sites

  • 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!