Problem with lightmap when using MeshBasicMaterial


when I use lightmap with MeshBasicMaterial, it looks like lightmap override material color or texture, especially on pure black parts of lightmap (

When I use MeshLambertMaterial with ambient light, everything is OK (

My lightmap:

three.js r104

Has somebody any idea, what is wrong when I’m using basic material?


Are you using an ambient light to illuminate the dark areas? At the very top of MeshBasicMaterial documentation it states, “This material is not affected by lights”. Maybe you’d like to set a brighter base .color instead?

I know about basic material and lights. I want to use that material with lightmap because of better performance. It doesn’t matter if I use basic material with only color or texture, lightmap will override that color or texture at least on that pure black parts (this isn’t happening with other materials with ambient lights).

If I understand lightmaps, white parts are fully lightened (original color) and black parts are fully darkened, but still have something from original color or texture. But with basic material this isn’t fulfilled


MeshBasicMaterial has better performance than other material types because it does no physical lighting computation – similar (but not exactly?) to an “unlit” or “shadeless” material in other tools. So its support of light maps is a little confusing to me, but there is some prior discussion in the thread above to justify that. If it doesn’t seem to be working correctly you may want to file a bug.

1 Like

I just tried it out, and it looks like it performs a multiplication so any color gets multiplied to 0 on black. This is a hacky workaround, but you could probably fake “ambient lighting” by brightening your lightMap’s blacks to something lighter, like 33% grey.

Thanks for link. Merging texturemap and lightmap looks like a good idea to try.

Yes, I know that lighter lightmap is a hacky solution, but I’d like to avoid that