OrthographicCamera with object resizing support

Is it possible to configure the camera so that it does not have perspective distortion as with OrthographicCamera, but at the same time, when the position of objects changes, they change their size as with PerspectiveCamera. Perhaps there are some add-ons or plugins? Thanks!

I’d be more inclined to answer No.

To have a perspective projection without distortion, the projective plane must be curved into a cylinder (or a sphere). As a result, you cannot project with a matrix. Both OrthographicCamera and PerspectiveCamera use a matrix to calculate projection, so it might be impossible to configure them the way you need. For a distortionless perspective projection you have to calculate projection manually in the vertex shader.

However, it is possible to configure PerspectiveCamera in a way to reduce the distortion. Just set the .fov to be smaller. Small field of view leads to small distortion near the edges. The default value is 50°. Try with 40° or even 30°, but beware of the side effect – small .fov narrows the view frustum, as if you a looking through a pinhole. So, you’d have to find the balance between distortion and narrowness.

1 Like

Pavel thank you for detailed answer.

1 Like