# Distortion with gltf models

**URL:** <https://discourse.threejs.org/t/distortion-with-gltf-models/38267>\
**Category:** Questions\
**Tags:** camera, gltf\
**Created:** [May 18, 2022, 1:55pm UTC](https://discourse.threejs.org/t/distortion-with-gltf-models/38267 "2022-05-18T13:55:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![binoy\_t](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/binoy_t/32/24330_2.png) [@binoy\_t](https://discourse.threejs.org/u/binoy_t)\
**Post date:** [May 18, 2022, 1:55pm UTC](https://discourse.threejs.org/t/distortion-with-gltf-models/38267/1 "2022-05-18T13:55:32Z")

</div>

Hi,  
I am trying to load gltf files using three gltf-loader but there happen to be some distortions with few of the models, so I tried decreasing the ‘camera.near’ value. But when it is reduced, some models get clipped early i.e, the models go behind the camera. So I would like to set the ‘camera.near’ value for each object. What will be the best way to calculate the same?

Thanks,  
Binoy

---

<div class="post-metadata">

**Author:** ![donmccurdy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/donmccurdy/32/33209_2.png) [@donmccurdy](https://discourse.threejs.org/u/donmccurdy)\
**Post date:** [May 18, 2022, 2:15pm UTC](https://discourse.threejs.org/t/distortion-with-gltf-models/38267/2 "2022-05-18T14:15:31Z")

</div>

`camera.near` and `camera.far` are used to configure the shared depth buffer, they can’t be changed on a per-object basis. Try to make `camera.far` as low as it can safely be without clipping, and `camera.near` as high as it can safely be without clipping, to maximize depth buffer precision. Enabling a logarithmic depth buffer can sometimes be helpful for scenes with a very large variation in object distances.

---

<div class="post-metadata">

**Author:** ![binoy\_t](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/binoy_t/32/24330_2.png) [@binoy\_t](https://discourse.threejs.org/u/binoy_t)\
**Post date:** [May 19, 2022, 3:01pm UTC](https://discourse.threejs.org/t/distortion-with-gltf-models/38267/3 "2022-05-19T15:01:34Z")

</div>

Thank you @donmccurdy for your reply, I thought It would be possible to compute the near and far planes using the bounding box
