General Lighting with OpenGL

To illumiate a polygonal object that looks similar to a Star Destroyer (from Star Wars), how would one setup the lighting to get everything lit up and actually make it look 3-D? And am I limited to 8 lights?

If you were being proper realistic you’d have one really fecking bright light about 500,000,000km from the ship and another one perhaps on a nearby planet to do reflection. Both lights are so far away and so huge compared to your object you can use directional lighting which can be fractionally cheaper to calculate.

But to make things actually look good you wouldn’t actually use plain opengl lighting, you’d use those two lights to plug into a bump mapping shader of some sort.

You are technically limited to 8 lights but your implementation may support more (I doubt it). But 8 is easily enough. Normally what you do is sort the scene into clusters of bits which are lit by the brightest 8 nearby lights. Or use a hack light dynamic lightmaps for little lights and just use GL lights for the really big lightsources (nearby star, planetary reflection).

Cas :slight_smile: