Jump to content
  • Advertisement
Sign in to follow this  
Geometrian

Shadows

This topic is 3992 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, I'm making a flight simulator type thing, and I want the planes to have shadows. I tried to reverse engineer NeHe 27, but only the .exe ran, and I couldn't get the program to work otherwise. I program in Python, so any code in Python is more useful. What would be great is a Python version of something like NeHe 27 or at least the key function calls. Thanks, G

Share this post


Link to post
Share on other sites
Advertisement
NeHe's 27 lesson - Shadow Volumes - it's old approach, they are quite useless, try Shadow Mapping (very good technique, it's very useful, but it has few disadvantages).

Share this post


Link to post
Share on other sites
I'm working from:
http://www.cs.ualberta.ca/~ghali/courses/texts/redbook/html/09-10-shadowmap.c.html
which I translated into Python, but the glDrawPixels() call is really really slow. Why?
G

Share this post


Link to post
Share on other sites
I think I'm onto something with this other tutorial:
http://www.paulsprojects.net/tutorials/smt/smt.html
I've translated it from the C++ it's in to Python. I think that these lines don't work:
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE_ARB, GL_COMPARE_R_TO_TEXTURE)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC_ARB, GL_LEQUAL)
glTexParameteri(GL_TEXTURE_2D, GL_DEPTH_TEXTURE_MODE_ARB, GL_INTENSITY)
I see the torus and the spheres, but no shadow. I commented them out because I can't get the extensions. How would one do it without the extensions?

Share this post


Link to post
Share on other sites
Try setting up shaders. Because the methods using fixed function pipeline is both confusing and slow because you draw the scene 3 times. If you do a shader, it will only require 1 draw.

Share this post


Link to post
Share on other sites
I'm definitely willing to consider that.
A few problems, though:

a) I've never used shaders; I know nothing about them--not how to get them, how to program them, set them up, etc.
b) I'll need a tutorial.

Given that, I think that shaders would be good if they only require 1 pass.

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!