Environment Map Reflections Without Additional Lighting?

Hello, I’m using pre-baked lightmaps from Blender for my 3D models in Three.js. The lighting looks great, but I need to add reflections to make materials (plastic, metal, etc.) look more realistic.

When I load an HDR equirectangular image and set it as scene.environment, it works but adds unwanted ambient lighting on top of my lightmaps:

Is there a way in Three.js to use an environment map for reflections only, without it contributing additional lighting to models that already have baked lightmaps?

I’ve tried setting material.envMap directly instead of scene.environment, but it still adds ambient illumination along with the reflections.

I’m using MeshStandardMaterial with lightmaps already applied. I only need the reflection component from the envMap, not the diffuse IBL contribution.

Any suggestions or shader modifications would be greatly appreciated!

One thing you could try is simply setting a single pixel white texture on the materials aoMap to occlude all ambient light, I’m not sure if this will also affect reflections at the same time though…

1 Like

AFAIK you cannot disable the ambient/diffuse IBL term while keeping the specular reflections from an envMap, at least not using standard material.

In order to cancel out IBL you could try with something like this:

material.onBeforeCompile = shader => {
shader.fragmentShader = shader.fragmentShader.replace(
#include <irradiance_fragment>’,
// DISABLED diffuse IBL, do nothing here.
);
};

1 Like