I believe this is strictly a math problem, and my math skills are lacking.
I want to switch a perspective camera pointing at a scene (with its specific frustum and zoom settings) to a parallel camera. Easy enough: just call “setParallelProjection(true)”. Except that now my scene is completely out of whack: it’s zoomed way out to the point of invisibility.
Through trial and error, I realized that the new parallel frustum settings need to be updated, as the old “trapezoidal” ones for the perspective camera no longer apply to the “box” frustum of the parallel camera. Also, the zoom value doesn’t influence the scene, which makes sense given that “zoom” doesn’t mean anything with a parallel camera. However, judicious updates to the parallel frustum settings seems to mimic a perspective zoom - smaller frustum, closer “zoom”, larger frustum, farther away “zoom”.
What I’m looking for here is how to programmatically convert [perspective frustum + zoom] values into [parallel frustum] values so that the rendered image occupies the same general space in the ViewPort.
Sorry if this has been answered elsewhere or if what I’m requesting makes no sense. Thanks!