I have 2 plane meshes on top of each other within ~0.1 units. The top plane is a small image (with alpha) 'car' that is moved around by input. The bottom is a large image (with alpha) 'terrain' that is static. The camera is also static.

I noticed that the game engine would sometimes draw the tank below the terrain for some positions. (Because of alpha in the terrain, I can see the car below the terrain.)

I started experimenting and found out that this rendering order error depends on the angle between camera and planes. I did not find a proper pattern though. Generally speaking, the problem seems to disappear when distance (between camera and planes) is small and the angle too (i.e. the camera is looking 'directly' onto the flat planes).

Is this a known problem? I don't know how to progress from here. Blender version is 2.78c.

  • 1
    $\begingroup$ Is the camera frurstrum appropriately sized for your scene? Can you post a screenshot of the issue? $\endgroup$ – Carlo Aug 11 '17 at 16:54
  • $\begingroup$ I uploaded screenshots here: imgur.com/a/1PFRT I used 'car' and 'terrain' above because I thought it would illustrate the issue better, but actually it's the needle and dial of a fuel gauge. :) $\endgroup$ – JackD Aug 16 '17 at 8:25

That is caused by floating point errors, depending on the distance to the camera. When the values get too high, the precision is not enough to properly sort the objects, especially when they are only 0.1 units apart. You can try to remedy this by adjusting the camera far clipping plane value in the camera properties or increasing the distance between the two planes.

enter image description here

EDIT: just now saw the screenshots - that does look like the far clipping plane. Decrease its value and you should be fine.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.