OpenGL Lighting

Started by
3 comments, last by Stalin_84 17 years, 9 months ago
For a few weeks now, i've been trying to add lighting to my game Project Phoenix (medevilenemy.f2o.org in the products section). So far, I havent been able to get it to work at all. The ships/torpedos are all OBJ models, the particles are all quads, and the background is a big textured quad. Anyone have any ideas/suggestons? [Edited by - medevilenemy on July 20, 2006 12:45:13 PM]
There was a saying we had in college: Those who walk into the engineering building are never quite the same when they walk out.
Advertisement
Well, what have you tried?

I hope you know all about GL_LIGHTING and the eight GL_LIGHTx (x = 0 to 7) as well as the glLight{i,f,fv} GL commands. If not, read up on those.

If you want good lighting, I suggest you look into GLSL (shaders) and per-fragment or per-vertex lighting.
I know about GL_LIGHTING and the predefined lights, and i've tried them. No effect. It might have something to do with the normals in my models, but I really have no clue.
There was a saying we had in college: Those who walk into the engineering building are never quite the same when they walk out.
The best way to make sure your normals are correct is to render them using GL_LINES.
Can you tell more about the problem you have?

Is everything ok when you don't use lighting?
Do you define your materials correct?
Are you using only spotlights? Because there can be a problem with them (and with specular highlights) when used with Gouraud shading and large polygons.

This topic is closed to new replies.

Advertisement