# model clipped when camera move close to the ground

**URL:** <https://community.cesium.com/t/model-clipped-when-camera-move-close-to-the-ground/7711>\
**Category:** CesiumJS\
**Created:** [November 21, 2018, 7:44am UTC](https://community.cesium.com/t/model-clipped-when-camera-move-close-to-the-ground/7711 "2018-11-21T07:44:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris\_Wang](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/chris_wang/32/4450_2.png) [@Chris\_Wang](https://community.cesium.com/u/Chris_Wang)\
**Post date:** [November 21, 2018, 7:44am UTC](https://community.cesium.com/t/model-clipped-when-camera-move-close-to-the-ground/7711/1 "2018-11-21T07:44:52Z")

</div>

**1. A concise explanation of the problem you’re experiencing.**

When the camera move close to the gltf model I loaded, the mesh of the floor model is clipped. And the underlying globe surface is shown.

 ![far.jpg](https://global.discourse-cdn.com/cesium/original/1X/937b27cfe3b909c20c817f9ed63b02d788b3304c.jpeg)

 ![near.jpg](https://global.discourse-cdn.com/cesium/original/1X/d19970548a23ace21575c04a6871dc1ee72a9d1e.jpeg)

In the second figure, I move the camera closer to the ground. Then the grey floor mesh is clipped and the green globe surface (Imagery) is shown.

**2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.**

**3. Context. Why do you need to do this? We might know a better way to accomplish your goal.**

I think that’s bug. Because every time I move closer to the model mesh., the mesh will be clipped.

**4. The Cesium version you’re using, your operating system and browser.**

Cesium version: 1.51

Operation System: Win10

Browser: Chrome 70.0.3538.102

---

<div class="post-metadata">

**Author:** ![omar](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/omar/32/1999_2.png) [@omar](https://community.cesium.com/u/omar)\
**Post date:** [November 21, 2018, 12:47pm UTC](https://community.cesium.com/t/model-clipped-when-camera-move-close-to-the-ground/7711/2 "2018-11-21T12:47:45Z")

</div>

I believe this is a problem with the logarithmic depth CesiumJS uses. You can try turning it off with:

`viewer.scene.logarithmicDepthBuffer = false; `

``

To see if that fixes it. Here’s the GitHub issue:

[https://github.com/AnalyticalGraphicsInc/cesium/issues/7189](https://github.com/AnalyticalGraphicsInc/cesium/issues/7189)

Let me know if that works.

---

<div class="post-metadata">

**Author:** ![Chris\_Wang](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/chris_wang/32/4450_2.png) [@Chris\_Wang](https://community.cesium.com/u/Chris_Wang)\
**Post date:** [November 23, 2018, 1:21am UTC](https://community.cesium.com/t/model-clipped-when-camera-move-close-to-the-ground/7711/3 "2018-11-23T01:21:43Z")

</div>

Thanks Omar,

I solve it by adding _#define ENABLE\_GL\_POSITION\_LOG\_DEPTH\_AT\_HEIGHT_ to the top of _vertexLogDepth.glsl_ as [issue#6573](https://github.com/AnalyticalGraphicsInc/cesium/issues/6573) says.

For now, it works fine.

在 2018年11月21日星期三 UTC+8下午8:47:45，Omar Shehata写道：
