View Full Version : Can I use more than 8 lights?
09-23-2003, 11:59 PM
I develop a helicopter simulator. It is military one and I can launch rockets. I want to light objects near my rocket's fly way with GL_LIGHTi. It's not hard. But in case I need to launch more than 8 rockets at one time I get a trouble. How can I solve it.
if you use standart gl lighting, then you need to render your scene multiple times, changing light position to next 8 lights, and so on!
ex: you have lights: l1,l2,l3,l4,l5 ... l16.
then you need to render scene with l1,l2,l3,l4,l5...l8 lights, then turn blending on and render with next 8 lights: l9,l10,l11,...l16 !
you could alse use vertex-program for vertex-lighting to make more than 8 lights!
[This message has been edited by gvm (edited 09-24-2003).]
09-25-2003, 01:30 AM
GVM, I think that's not the best solution.
For my engine, I'm using this :
- For the static lights, I use the Lightmapping
- For the Dynamic Lights, I use the Dynamic Lightmapping and if supported, Per Pixel Lighting
2Leyder: I didn't say that using of gl-lighting is good!
I use same things as you! I use 3d(or 1d+2d) textures+vp for dynamic lighting + arb_texture_dot3 for bump-mapping and result are good!
but it looks like that AlexanderSK is using standart GL Lighting for simulator and I given him solution to do more than 8 lights just with gl-lighting and multipass rendering...
hey! i saw your demo(the screenshot from it!)
but I hate register combiners! in my case I used blending to do "1-attenuation", but it's more simplier to use 3d texture(if avialable!)
[This message has been edited by gvm (edited 09-25-2003).]
What would be the best method for lighting models?
09-29-2003, 03:02 AM
Just to clarify,
the maximum number of lights supported in GL is the number of simultaneous lights. It has nothing to do with the number of lights you actually have in your scene. Lights can be redefined. For well tesselated objects(many triangles), vertex lighting works ok.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.