Formula for Lens Length

Hello.
I have a perspective camera in the scene.
I need to bring the camera closer to the object.
But so that it does not change in terms of perspective distortion.
I am looking for a formula.
After changing the distance from the camera to the object, I need to calculate the Lens Length.
Help me please.
Cam

I am using google translate. Sorry about that.

You may want to read Lens Questions [McNeel Wiki]

1 Like

The only way that can physically happen is if the object shrinks along with the camera. If not something else must change; in this case the focal will be made wider to frame the object so the perspective is altered.

1 Like

If you only need to bring the camera closer to the object, but not necessarily keep the same target then use the control point in the middle of the camera, between location and target.

Thanks guys.
Apparently this is a little more complicated than I thought. :grinning_face_with_smiling_eyes:

If you are doing this programmatically transform Location and Target with the same translation.

Nathan ‘jesterKing’ Letwory, thanks for the answer!

I have prepared an additional illustration of what I need:

I was hoping that by shortening the target distances, I could change the Lens Length and get an identical matched view.
I was hoping there was a formula.

Nathan ‘jesterKing’ Letwory, please tell us more about your method.

What you are looking for is a dolly: apply the same translation to both camera location and camera target.

1 Like

Nathan ‘jesterKing’ Letwory, thank you very much for your help.
Thank you for the time you took to my question.
Thanks for the video you recorded for me.

I did everything as in the video.
But this is not exactly what I was looking for.
Forgive me if I did not formulate my question very accurately.

I want the perspective distortion of the object to stay exactly the same.

I think this is not possible - the perspective of a given view is equally dependend on camera position and lens length. You can not alter the position and get the exact same perspective - but you can get close by carefully manipulating the view and adjusting the lens length. If you need the EXACT same view, you can render your original view at a higher resolution and crop out the exces area.
HTH, Jakob

Jakob Normand, thank you very much for your reply.
I want EXACT the same look ))
But not on the render, but inside Rhino (in the viewport).
I think there is a formula whereby I can move the camera and change the length of the lens.
I just need to find this formula.
Perhaps I am mistaken.

Thanks again.

You are… As you move the camera towards an object it gets bigger relative to the frame (naturally). You can only make it smaller again by backing up again to where you were before, or, by widening your field of view, taking in more space around the object, so that the object is smaller relative to the frame again. Doing this will shorten the lens focal length and thus change your perspective projection. You can’t have it both ways.

Wikipedia FTW - Look under Optics>Calculating distances :grin:
-Jakob

Hi @chepalette,

If you have an object that looks like this:

And you want it to look like this:

Then change the focal length without moving the camera or target.

Your object will get bigger, but the background will change (you’ll see less of it).

If you want to keep the amount of background you see the same then you can move in and change the lens length BUT that will change the perspective view of the object.

There is no way you can have the object look bigger, with the same perspective, and have the same background. One or the other.

HTH
Jeremy

The thing is, this works fine in films where the object that is to remain “the same size” is most often a human being with no straight lines plus all the psychological interpretation that is done by our brains when looking at another person. We can thus more or less ignore the change in perspective projection.

However with something as simple/stupid as a cube with straight edges, the dolly zoom isn’t nearly as convincing. Below is a series of cubes at different lens focal lengths - they all have the same distance midpoint of vertical side to midpoint of vertical side - 200mm:

CubesPersp-Illus.3dm (153.9 KB)

https://www.screencast.com/t/gICnR9ooE

1 Like

No.

I just need the object to be closer to the edges of the viewport and the perspective distortion to be exactly the same.

Thanks everyone for the advice.

then just change the lens length, it’s quite simple.

Thank you very much everyone for your help.
I am very grateful to you all.
Moving camera + DollyZoom works really well for me.
Low bow. Thank you. I appreciate it very much.
:slightly_smiling_face: