Jump to content
  • Advertisement
Sign in to follow this  
fazekaim

OpenGL fast shadows? projected or stencil or something else?

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

Hello! I would like to render shadow to my models. I read this tutorial about projected shadows: http://frustum.org/3d/index.php?demo=7 Using FrameBuffer Object could be an easy way. It is efficient for approx. 50 models too? Or is there any faster shadow rendering method? I'm using fbo to render water and it is fast. Better then switching opengl context. Can I render shadows with fbo? I hope, i explained my problem clearly. So, i'm looking for a fast and efficient method to render animated models ( a lot of models). Thanks...

Share this post


Link to post
Share on other sites
Advertisement
Quote:

It is efficient for approx. 50 models too?


Shadow mapping technique scales very well with increased scene complexity. With shadow mapping, the number of rendering passes required is 1 per light perspective. 1 for a spotlight, but 6 for a point light (projects shadows in every direction). So a scene with many models probably won't be as slow as a scene with 10 models, but more then a few shadow-projecting lights.

Share this post


Link to post
Share on other sites
The problem is that ideally most lights you want in a first or third person environment to be point lights making normal shadow mapping severely lacking. If you restrict your viewpoint however to some sort of locked overhead view, this might be feasible.

Cubic shadow buffers are not feasible for games right now but in a few years with more powerful hardware they may become viable.

I think right now shadow volumes are the best current solution, however they have the very annoying requirement that your models be closed 2-manifold surfaces which for amateurs is a big deal since you can't just pop in a random model and expect it to work.

Share this post


Link to post
Share on other sites
Quote:
I think right now shadow volumes are the best current solution, however they have the very annoying requirement that your models be closed 2-manifold surfaces which for amateurs is a big deal since you can't just pop in a random model and expect it to work.


So true... having that same struggle with my current project.

Share this post


Link to post
Share on other sites
Oh, thanks guys. Actually, i write an turn based fantasy strategy game. So, I have only a sun that creates shadow for my models.

I checked the nvidia site for fbo usage for shadow mapping, and i don't fully understand why the demo doesn't attach depth render buffer to the fbo. Has anybody used fbo to shadow mapping? Can help me a little bit?

Share this post


Link to post
Share on other sites
whilst u can use FBO to help with shadowmaps its not exactly faster (only ~%10) what it does buy you though is the shadowmap size is not tied to the screensize
check out example number 7 in the FBO spec

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!