Jump to content
  • Advertisement
Sign in to follow this  
gazsux

Problem when combining light maps

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

Hey, I've recently implemented static light mapping, which works fine. I have since added a dynamic light mapping element where the light maps position is dependent upon the position of the light source making it look like I have a dynamic, attenuated, area light source. I'm wanting to combine these so that the illumination from the dynamic light map combines with the static one. However, currently the amount of light added by the dynamic light map is limited by the static light map. For example, the static light map is a simple sunburst gradient that fades from white to black at the edges. If the dynamic light map is in the centre of the room then it illuminates fully, however at the edge, where the static light map is darker the resulting effect of the dynamic light map is darkened too. I saw in a recent thread by roos that he was having a similar thing with the results of bump mapping only been shown in the illuminated areas of the light maps but the resulting advice seem to be bump mapping specific. Any ideas on how I can add the effects of the two light maps? I've played around with different combiner functions to no avail. Thanks

Share this post


Link to post
Share on other sites
Advertisement
It sounds to me like you're modulating the 2 maps. You must add them together. If we're talking about OpenGL, the ARB_texture_env_add extension or ARB_texture_env_combine with GL_ADD operation should do the job.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!