05-07-2002, 05:15 AM
I'm currently working on a simple engine.
What are the pro's and cons of using the Direct3D lights as opposed to vertex lighting?
How would I manage to override the hardware T&L eight light limit in terms of using any kinds of trickery?
Is there any point using Direct3D Lights at all or should I just stick with vertex and lightmap?
Does anyone know whether the pro's use Direct3D lights or not?
05-07-2002, 05:37 AM
Well, the pros are shorter code, and faster running. The cons are less flexibility, and the hardware must support it. :-\
Personally, I use vertex lighting when dealing with raw polygons, but D3D lights when dealing with meshes. It just makes things much simpler that way.
As for your last question, I doubt the 'pros' use D3D lighting much, but thats just a guess.
05-07-2002, 06:21 AM
Sounds reasonable :D
So - how do you break the light Hardware T&L limit then?
My impressions are that I could turn them on and off dynamically as the player passes near to them but it's going to destroy long distance quality...
I guess light maps and vertex lights may be the only way!
05-07-2002, 06:23 PM
D3D Lights are good for doing dynamic lights, but for static lighting it's better to use lightmaps or vertex lighting.
If you want to break the HW limit on lights you can try using Vertex Shaders which will enable you to use any number of lights.
Vertex lighting is the fastest, but it's the least flexible since you're limited to the tesselation of your target mesh. So it's best for broad areas, or subtle effects where the lack of detail isn't a problem.
Lightmaps are very flexible and you can generally use very low res light maps (32x32 or even 16x16) to good effect (with filtering).
D3D lighting is essentially vertex lighting with the same limits it has, but with the benefit of being dynamic. Spotlights are also computationally expensive, so avoid them if possible.