Far plane in 1.1.0

Is there some sort of limit to how far you can set the far plane in 1.1.0? I’m trying to view a very large terrain all at once, but it seems that no matter how far I set the far plane, the terrain gets cut off at a certain distance. In this screenshot:

http://homepages.inf.ed.ac.uk/s0094060/farplane1.png

the far plane value is set to 1.02499998499e+15 (output of base.camLens.getFar). The space in panda units between each vertex in the mesh is about 1000, and there are 1025*1025 vertices in total in the square shaped mesh.

So it seems to me that the distance from one end of the mesh to the other is about 1025000. Even taking into account looking along the diagonal of the mesh and the fact that the camera is above the mesh, I think I should be able to see the entire mesh at once given this enormous far plane distance I have set.

If I take the same screenshot with a much smaller far plane setting it looks the same, suggesting that after a point Panda will not move the far plane any further.

Am I missing something, or what’s going on?

Er, yeah, sorry about that. You ran into a hack I put in a year or two ago. The problem is that with a sufficiently large gap between near plane and far plane, certain calculations become imprecise in single-precision arithmatic. I put in a quick hack to effectively cap the far plane at 10,000,000 or so, promising to revisit it later. I guess later didn’t come soon enough. :blush:

Anyway, as a workaround, you might consider using a different scale for your Panda units. For instance, if your scene is modeled in feet now, consider modeling it in miles.

David