# How to avoid the cutoff of a Sprite when overlapping in a terrain?

I have a scene where I have a terrain as a PlaneGeometry. And I'm trying to locate a building on it as Sprite. But I'm not able to put that building/sprite centered on the terrain without getting a cutoff.

Make sense because the terrain is cutting the half. But I'm just wondering if there is a technique to solve this problem.

I tried to rotate the sprite as a 3D object. But does not have this property. Also tried using a PlaneGeometry with a MeshBasicMaterial, but the result of the Image looks blurry and without transparency.

You can force the sprite to render always on top by disabling the depth testing in the sprite's material.

material = new game.THREE.SpriteMaterial({
depthTest: false
});

• Keep in mind that objects drawn without Depth Testing will be shown on top of everything else. If you want buildings lower on screen to obstruct view of objects higher, you will have to draw all objects in specific order - from furthest to closest. – crueltear Feb 6 '19 at 9:50

The best solution I found is adding two scenes, one for the terrain and one for the sprites.

Is important to add two lines after each render()

renderer.render(sceneTerrain, camera)
renderer.clearDepth()
renderer.autoClear = false

renderer.render(sceneSprites, camera)
renderer.clearDepth()
renderer.autoClear = false

...