Problem when combining light maps

Started by
0 comments, last by mikeman 19 years, 3 months ago
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
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.

This topic is closed to new replies.

Advertisement