Recently I learned how to add an environment map to my scene so my objects can reflect it and also it improves the scene lighting overall, but my issue now is that I don’t want the background to be visible, is there a way to hide it without losing its effects on the scene?
For example I have a couple of objects in my scene that serve as clicking zones and because of that I don’t need them to be visible so I do myobject.visible = false
and work like a charm hidding the object while still “being there” receiving the raycaster so I can detect clicks on them.
Now in the case of the scene of course I can’t just set visible to false to the scene itself
this is how I added the env map to the scene (I’m omitting a lot of irrelevant code for brevity)
let scene = new THREE.Scene();
...
const loader = new RGBELoader();
loader.load(texturePath, (texture) => {
scene.background = texture;
scene.environment = texture;
})
this is how it looks with the background added:
and this is without it (i.e. scene.background = false
):
adding an L plane helps but the results are not better than with a background added.