Archived

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

light question

This topic is 5515 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

can anyone answer this quick question about lights? when a light "shines" on something, that is, an object has a material on it, and reflects the light''s color dynamically, is that always a D3DLIGHT (or OpenGL equivalent) object? or can this be done some other way? (via dynamic light mapping or something??) thanks.

Share this post


Link to post
Share on other sites
You could use light mapping: You use a second texture (the light map) which is usually some sort of greyscale image of the ''shape'' the light makes on the object (round, oblong, you get the idea), and then modulate that with the actual texture you want to use. The result is a texture that''s visible in the light areas of the light map, and darker in the dark areas of the light map. This works great on walls behind torches and such, and saves a lot of expensive light calculation.

Share this post


Link to post
Share on other sites