Shadows

Started by
4 comments, last by Geometrian 16 years, 5 months ago
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

[size="1"]And a Unix user said rm -rf *.* and all was null and void...|There's no place like 127.0.0.1|The Application "Programmer" has unexpectedly quit. An error of type A.M. has occurred.
[size="2"]

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).

My current blog on programming, linux and stuff - http://gameprogrammerdiary.blogspot.com

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

[size="1"]And a Unix user said rm -rf *.* and all was null and void...|There's no place like 127.0.0.1|The Application "Programmer" has unexpectedly quit. An error of type A.M. has occurred.
[size="2"]

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?

[size="1"]And a Unix user said rm -rf *.* and all was null and void...|There's no place like 127.0.0.1|The Application "Programmer" has unexpectedly quit. An error of type A.M. has occurred.
[size="2"]

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.

NBA2K, Madden, Maneater, Killing Floor, Sims http://www.pawlowskipinball.com/pinballeternal

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.

[size="1"]And a Unix user said rm -rf *.* and all was null and void...|There's no place like 127.0.0.1|The Application "Programmer" has unexpectedly quit. An error of type A.M. has occurred.
[size="2"]

This topic is closed to new replies.

Advertisement