Wall disappear if it's too far from the camera

Hello, I have 6 walls that create a cube. When I go too far with the camera (scrolling with the mouse through the OrbitControls) parts of walls in the back disappear:

I have tried setting transparency to false and opacity to 1 but it doesn’t change.

What I’m doing wrong?

Try to increase the far value of your camera first.

Hi Mugen87, I tried changing the far value but the wall still disappears. But as you said it’s something about the camera because the more far is the distance the more the walls disappear.

this is the situation before scrolling:

this is the situation after scrolling:

Why are the dimension of your scene so huge? Can you try to use a more real world scale? Let’s say the walls have a width and height of e.g. 2 world units (which is essentially 2 meters).

If you need this extreme scales for some reasons, consider to create your renderer like so:

var renderer = new THREE.WebGLRenderer( { logarithmicDepthBuffer: true } );

Check the documentation of WebGLRenderer for more information about this parameter.

1 Like

Hi Mugen87, at some point things got out of hands … :smile: and I multiplied everything by 1000 … thanks a lot. Now it’s working as expected!!!