# How to change Viewport clipping value?

**URL:** <https://forum.babylonjs.com/t/how-to-change-viewport-clipping-value/44033>\
**Category:** Questions\
**Tags:** rendering\
**Created:** [September 12, 2023, 12:03am UTC](https://forum.babylonjs.com/t/how-to-change-viewport-clipping-value/44033 "2023-09-12T00:03:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![evidanary](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evidanary/32/26170_2.png) [@evidanary](https://forum.babylonjs.com/u/evidanary)\
**Post date:** [September 12, 2023, 12:03am UTC](https://forum.babylonjs.com/t/how-to-change-viewport-clipping-value/44033/1 "2023-09-12T00:03:07Z")

</div>

Question:  
Is there a way to change the viewport clipping values like it is in blender and 3Ds max? ([https://www.autodesk.com/support/technical/article/caas/sfdcarticles/sfdcarticles/Viewport-Clipping.html](https://www.autodesk.com/support/technical/article/caas/sfdcarticles/sfdcarticles/Viewport-Clipping.html)).

Context:  
I’m seeing clipping behavior when the camera is farther from the mesh. Here is how it looks when the camera is near the mesh.  
 ![Screenshot 2023-09-11 at 4.38.30 PM](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/a/2/a2ede10c729e73c6e8876600304c03fecfbb5a7f.png)

And here is how it looks when the camera moves farther from the mesh.  
 ![Screenshot 2023-09-11 at 4.38.23 PM](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/5/2/52a8bfba2a4375b80534f43758eb4842056a4588.png)

You can see there is some clipping going on there since there are 2 meshes that are placed close to each other. The background mesh is white and its color is clipping though the Plane mesh that has an image texture.

---

<div class="post-metadata">

**Author:** ![musk](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/musk/32/17156_2.png) [@musk](https://forum.babylonjs.com/u/musk)\
**Post date:** [September 12, 2023, 6:14am UTC](https://forum.babylonjs.com/t/how-to-change-viewport-clipping-value/44033/2 "2023-09-12T06:14:29Z")

</div>

You can modify the camera.minZ and camera.maxZ. Or you can use zOffset on material to fight depth fighting.

---

<div class="post-metadata">

**Author:** ![evidanary](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evidanary/32/26170_2.png) [@evidanary](https://forum.babylonjs.com/u/evidanary)\
**Post date:** [September 12, 2023, 4:18pm UTC](https://forum.babylonjs.com/t/how-to-change-viewport-clipping-value/44033/3 "2023-09-12T16:18:34Z")

</div>

camera.minZ = 0.1; did the trick.

Thanks
