Orthographic Frustum Problem

This is my first post here, and I have searched through the rest of the forums here for an answer to my problem but I have been unable to find anything.

I am working on a pedestrian simulation of Venice, Italy and for various reasons that necessitated creating a map of Venice made of various segments, which are just 2D egg files. The map looks like this:

The camera used is an orthographic lens and we control zooming with this code:

			newSize = VBase2(self.filmSize.getX()*ZOOM_FACTOR, self.filmSize.getY()*ZOOM_FACTOR)

However, when we zoom in enough, and then zoom out again, we get this effect:

Which is the frustum culling the edges for some reason. When we use

view-frustum-cull 0

we get the correct behavior being able to zoom out without the culling, but for performance reasons we would like to not disable culling.

How can we set the frustum of an orthographic lens to match the film size and why does this occur only when we zoom in past a certain level then zoom out again? The camera itself does not change position at all so it seems odd that the film size somehow decouples from the frustum.

Thank you in advance for any help on this matter.

Hmm, it rather sounds like a bug somewhere; either the bounding volumes are incorrect on your models for some reason, or the frustum is not being computed correctly on your lens.

Is it possible to put together a small code snippet that demonstrates the problem so I can research it?


Works for me

from pandac.PandaModules import *
import direct.directbase.DirectStart
import sys

# enables frustum culling on aspect2d


for x in range(num):
    for z in range(num):

def zoomIn():
    print fs
def zoomOut():
    print fs

fs = base.cam2d.node().getLens().getFilmSize()

Thank you both for the quick response, I will check out the code provided by ynjh_jo and I will also see if I can create a small demonstration. It may take a bit of time as the code base is rather complicated.