orthographic glitch on model

I’m pretty new to panda and game in general. I’m trying to do an orthographic view for my game. I used a lot of the chessboard code. My problem is, when I put the orthographic lens for the camera, there is some glitch on the model and I’m not sure where it comes from and how to get rid of it. I’ve tried to put an orthographic lens on the chessboard game, and it create the same kind of glitch to the model. Here is the code I’ve put in the chessboard :

# camera.setPosHpr(0, -12, 8, 0, -35, 0)  # original camera setup
camera.setPosHpr(-5, -5, 10, -45, -35, 0)  # position for the ortho setting
lens = OrthographicLens() # Setup Orthographic view

And here is the result

As you can see, part of some piece are missing, like for the white tower in the bottom. How can I solve this problem?

So I’ve tried the code on a friend pc (I’m developing on a Mac system) and there was no glitch at all. Is there some difference on different OS?

I remember there was a precision bug with orthographic views in certain versions of Panda, that was fixed. Are you and your friend running different versions of Panda3D?

When I try this on a laptop with both integrated Intel HD Graphics and an Nvidia card, I also get the glitchy rendering when I choose the integrated Intel, while everything looks correct when using the Nvidia card.
With the Intel, setting the far clipping of the lens to something like 1000 instead of the default 100000 seems to fix it, so there might still be some precision issues - at least on certain graphics devices.

Panda3D version: Panda3D-SDK-1.10.0pre-234e7ee-x64
OS: Windows 10

Thanks for the reply guys.

You might be getting a different precision depth buffer. Try setting “depth-bits 24” in your Config.prc file to force at least a 24-bits depth buffer.

Ah indeed, I was only getting a 16-bits depth buffer with the Intel.
It works now, thank you very much :slight_smile: .