0

For sufficiently large approaching the surface of the sphere, which is a model of the Earth, I get inaccurate coordinates of vertices. Because of this, when moving the camera the shaking noticeable.

How to get rid of it? On the Internet to find solutions to invert zNear and zFar, but I have no idea how to do it in three.js

Ni55aN
  • 63
  • 1
  • 9
  • possible duplicate of [Ugly render on clouds](http://stackoverflow.com/questions/26747759/ugly-render-on-clouds) – LJᛃ Feb 06 '15 at 18:14
  • @LJ_1102, No, definitely I have another problem. I do not have "overlapping" of polygons as in the following example http://threejs.org/examples/#webgl_camera_logarithmicdepthbuffer When nearest the camera position to the vertices obtained as though inaccurate coordinates of the vertices – Ni55aN Feb 06 '15 at 18:32

1 Answers1

0

THREE.PerspectiveCamera has near and far parameters. These define the distance of the near and far clipping plane.

You have to choose clipping planes depending on your scene. For example if you have a large scene, and the near plane is very small, it can cause things you experienced.

kovacsv
  • 687
  • 4
  • 14
  • Of course I have set values for the near = 0.01, far = 10000. Value of the variable near I can not put anymore since then I can not watch nearby objects – Ni55aN Feb 07 '15 at 19:37
  • Then maybe you can try to set far to a smaller value if it is possible. – kovacsv Feb 07 '15 at 19:43
  • it also can not change – Ni55aN Feb 07 '15 at 21:21
  • Then I think that the only solution is to always change clipping planes during navigation. – kovacsv Feb 07 '15 at 21:45
  • How to do it in three.js? – Ni55aN Feb 12 '15 at 16:45
  • I think you can just set the PerspectiveCamera's near and far property. Maybe you need to call updateProjectionMatrix after the modification. – kovacsv Feb 12 '15 at 17:02
  • Decrease far does not give any result, for example, if the near = 0.01 and far = 0.1, it is still get a "shake" coordinates. This is likely to depend on large coordinate values administers. But how can this be avoided? – Ni55aN Feb 12 '15 at 18:35