• Advertisement
Sign in to follow this  

Focal depth from FOV

This topic is 2299 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

Is it possible to calculate the focal depth when only a FOV is given? The way I understood it, the FOV depends on both the focal depth and the dimension of the "film". Specifically I wan't to know what focal depth I'm implicitly using when rendering to a cubemap (with a FOV of 90).

Share this post


Link to post
Share on other sites
Advertisement
Field of view is a function of the ratio of the focal depth and the size of the projection plane. If one is unknown, you cannot calculate the other. It is even meaningless to talk about one without a relation to the other.

Share this post


Link to post
Share on other sites
What is the size of the projection plane in this case? The cube spans [-1, 1], so is the size (2, 2) per face?

Share this post


Link to post
Share on other sites
That is the size of the view volume in projected space, which is a cube and has no concept of field of view angles.

You can have pretty much any projection plane you want. If you have real world units, then you can define a virtual plane corresponding to a 35mm film, and your focal depth will match that of a camera with a lens on a 35mm film. You can also use the near plane from the projection matrix, or perhaps the plane at Z=-1. In either case, you can only compare the focal depth to a camera if the projection planes are comparable.

Share this post


Link to post
Share on other sites
I'm not using a projection matrix in this case, so I suppose plane one unit from the center of the cube is the one I'm looking for.
But maybe I'm going about this in the wrong way. I'm mapping points onto a cubemap and now I want to approximate the area a sphere would take up when mapped onto the cubemap and found a formula: Sphere.radius * FocalDepth / Sphere.z.

Share this post


Link to post
Share on other sites
Oh, I think I see your point. I believe in this case, what you have as a focal depth is just the constant 1 if your field of view is 90 degrees. It is not really a focal depth, but just a scaling factor that maps the radius/z into its size on the projection plane. You don't need the focal depth for that, only the ratio of the focal depth and the projection plane size, which happens to be a function of the field of view.

Basically, I believe you want radius * 2*tan(fov/2) / z. The factor 2*tan(fov/2) is the ratio between the focal depth and the size of the projection plane.

Share this post


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

  • Advertisement