Hi!

I've been meaning to write a game, where one important part of the
game mechanics would be a switch between a perspective projection and
a parallel projection. Now, to make a nice transition between these, I
chose not to use the ortho-lense that I've been told exists, but
rather change the focus of the camera to a pretty large value, to get
an as-good-as parallel projection.

The problem, however, is that I want the objects at a certain plane,
parallel to the projection plane of the camera to appear as big as
they were before the switch of projection. Now, this is where the math
starts kicking my ass. I realize, that as I move my focus further back
from the projection plane, I would have to zoom out, to keep the
points of the specific plane at the same place in the projection. I'm
just having problems figuring out by how much.

I've been drawing pretty pictures and trying to figure out the
relation between the old projection plane and the new one, based on
the focus, but failing miserably.

So I wonder, is there anyone out there who can point me in the right
direction to figure this out? Ideally, I would want to be able to say
that a square, parallel to the projection plane and x pixels away from
it, should be the same size before and after the transition (and at
all points in between), then increase the focus gradually until it is
large enough to look like a parallel projection, and at every point
adjust the cameras zoom, to keep the square the same size on the
screen.

Thanks,
Andreas

Reply via email to