Jump to content

f stop

Recommended Posts

Hey, I'm trying to figure out what kind of math is being done when calculating the f stop for depth of field.

Reading the docs here, it states that "There are four parameters that control depth of field. The Focal Length parameter is on the View tab of the camera node. The Focus Distance, F-Stop, and Bokeh parameters are on the Sampling tab of the camera node."

To better visualize depth of filed I'd like to create planes to get a better idea of how narrow or wide the effect will be, I have a scene with a focal length plane, and a focus distance plane. I'm just not sure what type of calculations I should be doing to place the f stop planes (near and far).

Any help on this or ideas to try would be great, Thanks!

Link to comment
Share on other sites

while looking at your scene outside of the camera, select camera, press enter to get its handle, press Z to get focus handle

now you can set your focus plane and dof range interactively in viewport

Thanks, I didn't know about the z key, it's starting to make more sense now.

I'd still be curious about an equation to derive f-stop planes given an f-stop value, focus distance, and focal length. I'd like to be able to create some ramps based on these parameters so I could apply it to particles or volumes.

From playing around with the range and observing in the viewport it looks like there's some type of exponential decay being applied to the f-stop planes as f-stop increases, I might be able to replicate through trial and error comparisons, but if anyone could help me out it'd be appreciated.


Link to comment
Share on other sites

You might want to study relationships / equations used in physical optical systems.

Check the following link with Dof Calculator as a bonus!!



Thanks, I've been pretty busy recently but I've managed to make some progress on figuring out the equation.

I attached a file with the expressions on a null node. Some locaters are hooked up to vis the near DOF and far DOF.

If anyone wants to give me some tips/feedback it'd be very useful.

Thanks for everyones help so far.


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...