Advertisement

lightsource positions

Started by November 03, 2004 03:55 AM
1 comment, last by _DarkWIng_ 20 years, 3 months ago
Hi. In my first opengl 3d engine I have lightsources, I've experimented lots of things with both directional and positional lights (position/vector): x, y, z, 0 or 1. 0 for positional, 1 for directional. Somehow I can't see the logics in my light's position when I add positional lights. Is there an easy way to setup a radius for a positional lightsource, so I can find out where the lightsources exactly are. Maybe I'm missing a part of the openGL lighting theory, if so, please tell me. Thanks.

Crealysm game & engine development: http://www.crealysm.com

Looking for a passionate, disciplined and structured producer? PM me

An easy way to see where your lightsources are, is to draw some simple GL_POINTS at the same coordinates... Also, don't forget that you must set the position of the light, after any tranformations you want applied.
| Stein Nygård - http://steinware.dk |
Advertisement
Quote:
Original post by cozzie
Maybe I'm missing a part of the openGL lighting theory, if so, please tell me. Thanks.

OpenGL Red Book has a whole chapter on lighting. Maybe you should read that to get some more information how lighting in opengl actualy works.
You should never let your fears become the boundaries of your dreams.

This topic is closed to new replies.

Advertisement