Lights

Started by
3 comments, last by nes8bit 23 years, 10 months ago
Ok, I''ve asked this one before, but how would I calculate the color of any point in space when I define a light source? Somethings I wonder about is: 1. What datatype should I use? Would D3DLIGHT do it? 2. What is the best equation for calculating the color given that there are no light collisions in the world. I''ve looked everywhere and when I find pseudo code, I get a bunch of math equations. I just say ewww and click on the {x}. Please, explain this to me as if I were a newbie. (that does dx) ------------------------ Captured Reality.
Advertisement
Why not using the DX7 / OGL lighting engine? it has the ability to handle coloured lights (at least DX7 does). In the DX7Help document all the equations and formulae are given, so that''s a good reference if you want to code your own.



No no, not vertex lighting. Vertex lighting looks like crap for most engines. Also, those equations are a little complex. I just need something simple.

------------------------
Captured Reality.
Witchlord, do YOU have any good pages with pseudo lighting samples?


So far I''ve been applying light with just the distance formula and it doesn''t work too good.

------------------------
Captured Reality.
quote: ''Vertex lighting looks like crap for most engines. ''
I know... Perhaps you can find some ideas in all the lightmap-tutorials, they often describe how to calculate the lightmaps, and normally they are pre-calculated and with per-pixel accuracy.

This topic is closed to new replies.

Advertisement