[Solved] How to hide HDR background with PMREMGenerator | PMREMCubeUVPacker

Hello Guys…

i’m trying to hide the HDR background from the example library … but it doesn’t work.

Check : https://threejs.org/examples/webgl_loader_gltf.html

I need only to hide (alpha:true?) the HDR from the background but not from the reflections of the mesh.
Can you help to understand?

UPDATE: I found how to set a new background … but it’s a cover … probably the hdr is simply covered …

var loader = new THREE.TextureLoader();
var backgroundTexture = loader.load( ‘https://i.imgur.com/upWSJlY.jpg’ );
scene.background = backgroundTexture;

What if you just remove the scene.background line?

Solved… i tried to remove scene.background , but it’s used after for the PMREMCubeUVPacker …

So i removed the line scene.bacground but creating a new var HDR to deviate the rest to the code instead scena.background.texture … now it works …

thanks.

1 Like