# real world focal length?

• I once read something by @bagginsbill that said that the focal length settings in Poser were not the same as a real world SLR lens. Does anybody know the formula for calculating this or is there a chart somewhere?

• @ghostship I remember that, but not whether it has vaporised along with RDNA's forums.

Without having re-searched for the pages I derived these formulas from, the quickest way to share them is to post the Python code from my PoserUI.py module.

CircleOfConfusion = 0.03 # mm

def HyperFocal(f, N, c):
"""
# f = focal length in millimetres
# N = fStop
# c = circle of confusion in millimetres
# returned units are millimetres
"""
return f + ( ( f * f ) / ( N * c ) )

def FStop(f, s, c):
"""
# f = focal length in millimetres
# s = focus distance in millimetres
# c = circle of confusion in millimetres
# returned value is a scalar (unitless) representing the maximum DOF when focus distance = hyperfocus
"""
return ( f * f ) / ( ( s - f ) * c )

def NearFocus(f, N, c, s):
"""
# f = focal length in millimetres
# N = fStop
# c = circle of confusion in millimetres
# s = focus distance in millimetres
# returned units are millimetres
"""
H = HyperFocal(f, N, c)
return s * ( H - f ) / ( H + s - ( 2 * f ) )

def FarFocus(f, N, c, s):
"""
# f = focal length in millimetres
# N = fStop
# c = circle of confusion in millimetres
# s = focus distance in millimetres
# returned units are millimetres
"""
H = HyperFocal(f, N, c)
return s * ( H - f ) / ( H - s )

• Image shows additional parameters on the Posing Camera having just set the focus_Distance to the front of the rib-cage and run my 'Max Depth Of Field' python script, which calculates the appropriate fStop. • @anomalaus I think I bit off more than I can chew. LOL. Your python script is for calculating focus distance to the object? My main issue that I'm having is objects looking shorter than they are as they point toward the camera. Even at settings like 35mm on a camera and the camera jammed in close the objects still look shorter than they should. I'm guessing that it also matters on my render frame aspect ratio???

• @ghostship Oh, I think that thread was on this forum, where the aspect ratio of the viewport affects the apparent DOF/focus distance, because the display calculation uses the width only and not the larger of the width and height??? Something along those lines.

My scripts take the existing camera parameters as inputs (focal length, focus distance and fStop) and calculate the other things necessary to determine the depth of field, such as HyperFocus (Near Focus is hither). If you want Maximum DOF, the script will change the fStop to suit. If you then set the fStop you want, Show Depth of Field will calculate where the near and far focus points are and can show the clipping planes so you know exactly what will be in focus when you render.

None of these are directly relevant apart from your mention of formulas.

• @ghostship Oh, I think that thread was on this forum, where the aspect ratio of the viewport affects the apparent DOF/focus distance, because the display calculation uses the width only and not the larger of the width and height??? Something along those lines.

My scripts take the existing camera parameters as inputs (focal length, focus distance and fStop) and calculate the other things necessary to determine the depth of field, such as HyperFocus (Near Focus is hither). If you want Maximum DOF, the script will change the fStop to suit. If you then set the fStop you want, Show Depth of Field will calculate where the near and far focus points are and can show the clipping planes so you know exactly what will be in focus when you render.

None of these are directly relevant apart from your mention of formulas.

You have scripts out for this? I wish since years realistic camera settings for Poser. This what we have today is pretty outdated . Any script which can help me out from my camera misery is highly appreciated :)

• calculating DoF is a tricky proposition, SM's script doesn't really work all to well, which is why I wrote Easy DoF ...
( https://www.sharecg.com/v/86483/view/11/Poser/easy-DoF-for-Poser )

I used a modified version of SM's formula (which I believe goes back to a much earlier version of poser) to calculate the DoF

SM's formula is (if I still have the original unadulterated file) :

``````	actor = scene.CurrentActor()
cam = scene.CurrentCamera()
p1 = actor.WorldDisplacement()
p2 = cam.LocalDisplacement()
p3 = actor.Origin()
d = (-p3 + p2-p1, -p3 + p2-p1, -p3 + p2 - p1)
mag = math.sqrt (d*d + d*d + d*d)
DoF = mag * 8.85``````

• I once read something by @bagginsbill that said that the focal length settings in Poser were not the same as a real world SLR lens. Does anybody know the formula for calculating this or is there a chart somewhere?

I think this is the thread you are thinking of, Ghostship (nudity in link)

**"If you hold a 35mm SLR camera against one eye, and look with both eyes open, and adjust the focal length, the focal length (to the nearest 10) that comes closest to matching both eyes (or matching what you'd see with just a window held in front of your eye) is 50.

"50mm in a 35mm SLR is not going to give the same magnification in a medium format camera, nor in a DX format DLSR.

"Furthermore, the Poser 50mm is actually off by a factor of 1.4x versus a 35mm SLR camera. It's much closer to the DLSR DX format - though by accident, not design.

"So - in Poser, you would choose 35mm to match the magnification of what you'd see in an un-magnified rectangular window held up in front of your eye."**