Archived

This topic is now archived and is closed to further replies.

Lights

This topic is 6390 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.



Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites