How can 3dsmax use more than 8 lights?

We know that 3dsmax support OpenGL, and we know that 3dsmax support more than 8 light
s. But openGL only support 8 lights, then, the question is: How can 3dsmax use more than 8 lights?

I thought the 8 lights in opengl (default) was only based on that implementation of opengl which is being used. I thought it was usually 8 lights in hardware and any more you would have to drop back to software mode and hence take a perfromance hit.

This is my understanding of this subject (I could be very very wrong on this tho).

Chris

No, I think the 8 light thing is a max. The light names GL_LIGHT0…GL_LIGHT7 are hardcoded in the header, after all.

AFAIK 3dsmax only uses OpenGL for the preview renderer - not for the actual production render. So maybe they don’t support >8 lights in preview mode. Or maybe they do their vertex lighting in software and just use GL for rasterization, same as most games do.

I am wondering… why did they RESTRICT us to eight lights? Was there a design problem? or what? This seems more like MS programming than good programming (they are two entirely different things) on the surface…

anyone know the reason?

The OpenGl specs says eight lights is the minimum number of lights for an OpenGL implementation.
The GL_LIGHT defines allow to specify those simply by GL_LIGHT0+(your_light_index_here).
Read out the number of supported lights with glGetIntegerv(GL_MAX_LIGHTS).
There are actually implementations with more lights, like the 3Dlabs GAMMA based boards which have 16, and I think I have read the Wildcat 4210 has 24.
Any implementation without HW geometry could easily specify any desired number of lights. It’s just a loop in the lighting calculation.

Nonetheless, the 3DS MAX production renderer is pure software and can handle as many lights as the software allows (I dunno the #).