Archived

This topic is now archived and is closed to further replies.

Krippy2k

OpenGL OpenGL Lighting

Recommended Posts

Hi all Anybody know where I can find some goodies about the way lighting works (i.e. how to get a spotlight to illuminate where I want it to. and how to create an area light.). Also, I see it limits you to 8 light sources. Any tricks for getting more light sources? I know how to do some simulated lighting with alpha blending and light maps but I was curious about using more than 8 actual opengl light sources. Thanks Krippy

Share this post


Link to post
Share on other sites
That''s 8 lights per glBegin(); / glEnd(); understand?

you can draw something, do glEnd(), reset the lights, and draw something else...

cya,
Phil


Visit Rarebyte!
and no!, there are NO kangaroos in Austria (I got this questions a few times over in the states

Share this post


Link to post
Share on other sites
Aha!

Thanks alot man I knew there was something I was missing there... lol

1 more question

I don''t know if you have ever played Swat 3... but in that game there are these little glow-sticks that you can throw on the ground and they will illuminate a small area.

I was wondering if anybody knew how to create a light that will just illuminate a small area like that?

Have been playing around and have come up with some cool effects but can''t get that one yet.

Thanks
Krippy

Share this post


Link to post
Share on other sites
I think Swat 3 uses lightmaps for its lighting. I bet they use it for the lightstick too. You can also perform something that is similar but looks much better and that is per-pixel lighting attenuation. NVIDIA on their developer page has an example of this. Just make the attenuation real low and you should get a nice illuminated spot like the swat 3 lightstick.

-SirKnight

Edited by - SirKnight on June 11, 2001 11:34:06 PM

Share this post


Link to post
Share on other sites
Ingenu: Thanks I don''t have the red book but I have the blue book and it covers only the basic lighting model with ambient and spotlights. Not much on area lights although it does say that you can create them somehow... lol

SirKnight: Thanks I was just thinking about trying to play with the different attenuations. I haven''t found alot of good information on it but I did find a couple of goodies on SGI web site. Along with some goodies on accumulation buffer and stencil buffer that I will play with soon

The mirror effect in Swat is pretty cool too but I think it''s what snails the framerate on me the most. I have to be able to find a faster way to do it

Seeya
Krippy

Share this post


Link to post
Share on other sites