0

When I get the camera closer to some objects in the scene the image tears apart like it's shown below.

enter image description here

enter image description here

enter image description here

I'm using OpenglES 2.0

This is a video showing the issue.

And this is the test project that reproduce the issue, it's just the cocos3d template with the temple.pod file.

It seems that it only happens when the field of view is 85º or wider.

rraallvv
  • 2,875
  • 6
  • 30
  • 67
  • Does this only happen when the camera is moving? – Matt Fichman Mar 31 '14 at 20:07
  • @MattFichman It does happen in either, when the camera is static and when it is dynamic. – rraallvv Mar 31 '14 at 22:38
  • @rraallw That's odd. I thought it might be screen tearing (which is fixed by enabling vsync) but apparently not. I'm not that familiar with cocos3d -- how often does it swap the screen buffer? Is the rendering loop running/refreshing continuously? – Matt Fichman Mar 31 '14 at 22:48
  • @MattFichman The rendering loop is a CADisplayLink with NSDefaultRunLoopMode, the screen buffer is swapped once each pass of the rendering loop, I also added a link to the video showing the issue. – rraallvv Mar 31 '14 at 23:49
  • How are you creating your perspective transform? – Matt Fichman Apr 01 '14 at 11:39
  • @MattFichman Thanks, it was the near clipping plane distance, in the perspective transform. – rraallvv Apr 01 '14 at 18:16

1 Answers1

2

From what I can tell by running your demo, the "tearing" appears to be occurring as the near clipping plane of your camera breaches your model. Essentially, it is a result of the camera entering your model.

The CC3Camera nearClippingDistance property controls the distance to the camera's near clipping plane. The default value is 1.0. If the coordinate scale of your scene is very small, then you should adjust the near and far clipping distances of the camera to values more suitable for your scene.

Bill Hollings
  • 2,344
  • 17
  • 25