Loading lightmap issue

Hi guys, i am new to threejs.
i was testing loading lightmaps.
i am following the document and my lightmap has some position offset.
i baked my lightmap using blender on the second uv.
HERE is the weird lightmap result.(the lightmap seems to be a little bit offset to the left)

here is the scene i made in blender, and the lightmap i baked in blender.


any ideas where i made it wrong?

It seems the texture coordinates do not match. I suggest you export the meshes via glTF and then load the light map separately via TextureLoader.

When using glTF with an additional light map, you have to set lightMap.flipY = false; in order to accommodate the uv conventions of glTF.

1 Like