# 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 the post i remember was this one:

• @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[0] + p2[0]-p1[0], -p3[1] + p2[1]-p1[1], -p3[2] + p2[2] - p1[2])
mag = math.sqrt (d[0]*d[0] + d[1]*d[1] + d[2]*d[2])
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."**
https://www.renderosity.com/mod/forumpro/?thread_id=2868305

• @structure Very Cool! Downloaded.

You should post up the link in my thread about free Poser resources.

• @wandw YES! that is the info I needed. Thank you!

• @structure This is very helpful,but I wonder what DoF actually stands for in that calculation. Multiplying the distance to the camera 'mag' by a constant 8.85 utterly ignores whatever focal length and fStop the camera is set for. (And as @bagginsbill mentioned, only applies for objects along the camera's axis of view. Anything off-axis will return a larger distance to camera than its 'Z-depth', which is what defines the focal plane. I.e. everything at the focus_distance's z-depth is in focus in Poser.) To my understanding, Depth Of Field refers to the distance between the near (in) focus plane and the far (in) focus plane. (not actually hither and yon, which are arbitrary object clipping planes). The definition of in-focus is enumerated by the CircleOfConfusion parameter, which relates to resolution of the recording media at the image capture plane IIRC (think film grain or retinal cell spacing or pixel resolution) and is typically defined as 0.03mm

With a .pyc, I can't check what calculations you're doing in your script, but in any case, @ghostship 's question and @wandw 's helpful thread post show that this issue is as much about perceived or actual field of view, as depth of field, and their relationship to poser and real-world camera focal lengths. From my research (i.e. reading what experts and experienced camera users have written on the net), both analogue and digital cameras have always used vignetting (internal cropping of the light paths) to exclude perceptible distortion at the edges of the image.