Jump to content
  • Advertisement
Sign in to follow this  
cignox1

Thin Lens camera model

This topic is 3710 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, for may raytracer I'm trying now to model a thin camera class, but I don't get a few things. What I understood is that the focal length is the distance from the lens and the film when lights coming from a point infinitely distant will focus in a single point on the film. But the actual distance from the lens and the film changes with other parameters, doesn't it? I don't understand if it changes with the aperture or with other parameters. Does it change with the zoom? I need it because (AFAIK) that way I can use the thin lens equation to get the distance where everything is in focus, to shoot rays in order to simulate DOF using the method explained in PBRT, but they directly choose that 'everything in focus' distance, while I would like to derive it from real cameras properties. But I don't know how to choose this parameter and how it is related with the others. Do you have any tipps, or a link to a good explanation? Thank you!

Share this post


Link to post
Share on other sites
Advertisement
Thank you, but this way I still don't know at wich distance to put the film from the lens (I'm a bit confused...): that is, given the thin lens equation:

1/s + 1/v = 1/f

I should be able to find s (correct me if I'm wrong):

1/s = 1/f - 1/v

If I put my film (the v param) at the focal plane (v = f) I get

1/s = 0 -> s = infinite

As I understand it, and my math skills are embarassingly weak, this confirms the definition that at the focal length converge all rays coming from infinity. But leaves me with a lot of questions...

Share this post


Link to post
Share on other sites
Well, your analysis is correct! If you put the film at exactly the focal distance, the the only object that will be sharply focused on the film is an object at an infinite distance, e.g., the situation you are describing is exactly the "focus at infinity" case! If you want to focus on an object that is closer to the lens than infinity, then your film must be further away from the lens than f, e.g., v must be > f.

Share this post


Link to post
Share on other sites
Now it is clear: when I focus an object with my camera, I'm actually increasing or decreasing the distance from the film to the lens...

Thank you again!

Share this post


Link to post
Share on other sites
Yes. The ratio 1/s changes significantly while the difference between f and v doesn't change much, but does change. You adjust v in such a way that the s in the equation matches the subject distance for the focal length of the lens (or, more likely in modern cameras compound lens).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!