PDA

View Full Version : more than 8 lights



Lev
06-12-2001, 02:54 AM
Can I "reuse" the lights in some way to support more than 8 opengl lights per frame?

Cheers,
-Lev

IsaackRasmussen
06-12-2001, 03:04 AM
No, you can't have more than 8 lights simultaneously.

Are you checking if 8 lights really is the max, some implementations have more.

davepermen
06-12-2001, 03:11 AM
yep, you can "reuse" them.. for example find out for every mesh while rendering wich 8 are the nearest ones and just set those 8 up for it, but simultaneously, you can just use 8 ( or vertex_program.. )

Michail Bespalov
06-12-2001, 03:22 AM
I think it is possible to use more than 8 lights simultaneously using multiple passes.
something like



for all lights{
render only diffuse and ambient
}
modulate with decal
blendFunc add

for all lights{
render only specular
}

I have never tried it, but think this should work.

paddy
06-12-2001, 05:55 AM
I may be wrong, but it must be possible to render as much lights as needed using multipass and additive blending ...

Anonymous Coward
06-12-2001, 07:58 AM
Lev, I recommend you to look for a white paper called: "Virtualized OpenGL Lights sources for blah blah blah", from Mark Kilgard. It explains a very good way to have 'infinite' num of lights.

davepermen
06-12-2001, 09:54 AM
Originally posted by Don't Disturb:
More than 16 passes? That's an amusing idea.
If you need more than 8 lights simultaneously it would be better to implement lighting yourself in software.

hm.. you can use up to 8 lights in one pass.. means if you have 16passes, you would have 128 lights.. much http://www.opengl.org/discussion_boards/ubb/smile.gif

IainR
06-13-2001, 03:43 AM
Haven't looked into it myself, but this link gives some info and some source code:
http://reality.sgi.com/mjk/tips/VirtualizedLights/VirtualizedLights.html

Don't Disturb
06-14-2001, 02:49 AM
Whoops, forgot that you do many lights in each pass :P

Still, more than 4 passes (2 or more for ambient/diffuse, 2 or more for specular) is too much for most applications, so software lighting might be faster.

[This message has been edited by Don't Disturb (edited 06-14-2001).]