Skip to main content
gamedev.net
🔒 Locked

light question

Started by _stupid_ 0 replies 200+ views
Original Post
_stupid_
_stupid_
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.
CountOfMonteChristo
CountOfMonteChristo
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.