Original Post
Well im trying to implement lighting into my framework and have come across the usual light limitation problem. The problem is that in my scene i would want to have anywhere from 1 - 100 lights. But the reality is that for every additional light for an object, there is a performance penalty. So some of my questions are: 1) What is the optimal number of lights that should be enabled for drawing each object before there is significant dive in performance? Ive heard it's somewhere near 3 for hardware accelerated vertex lighting. 2) I read the Virtualized OpenGL Light Sources for Efficient Multi-Light Source Lighting article by Mark Kilgard. It is what im trying to achieve but it appears that his method is pretty expensive if i am going to have to do that for (every object * every light). In a scene with 100 objects and 10 lights, im going to be calling it 1000 times per frame. 3) Now that more and more games are using only dynamic lights, how do they light up large objects such as terrain or entire levels. For example in a racing game, the track could be pretty huge and just using the closest 4 lights to the track is going to give very wrong results. I could break the track into many smaller seperate objects. How does Doom3 deal with this. 4) For per-pixel lighting, am i right to say that the closest/significant 4 lights to the object are used instead of 4 closest lights to every pixel? 5) Any articles on this topic?