JCPalmer Posted June 2, 2015 Share Posted June 2, 2015 I see it documented inside the Blender API documentation that camera.data.angle has a range of 0.00640536 - 3.01675. I have experimentally determined while these can be violated in BJS, at very close to those settings strange things happen. Negative numbers cause the scene to be shown from the reverse side. Has anyone ever seen a good description of what FOV is? Also perplexing is Blender always has a value of 0.8576 for camera.data.angle. I see no UI to change it, directly at least. The API doc says default is 0, not 0.8576. Is there a formula where FOV can be set, based on something else? Any info, links would helpful. Thanks, Jeff Quote Link to comment Share on other sites More sharing options...
gryff Posted June 2, 2015 Share Posted June 2, 2015 I see no UI to change it, directly at least. The API doc says default is 0, not 0.8576. Is there a formula where FOV can be set, based on something else? Jeff, in my experience, the default always seems to be 0.8576. You will get different values if you change the focal length of the lens. In the image below, I changed the focal length to 105mm - a focal length often used for portrait photography. The FOV on export to .babylon is then 0.3024 My default setting for the focal length is 35mm - which leads to the FOV in babylon of 0.8576 cheers, gryff Edit: For the math maybe this helps Quote Link to comment Share on other sites More sharing options...
dbawel Posted June 3, 2015 Share Posted June 3, 2015 According to the Blender documentation, the lens is calculated using FOV = 2 atan(0.5A/f). Where FOV is the "angle of view" in degrees, A is the image area aperture (which is often defined as the longer of either length or width of the image area), and f is the focal length of the lens. This equation assumes the tan function operates on values in degrees - if calculating in radians (as Blender seems to), multiply the right side of the equation by 180/pi. It appears that Blender uses a constant (16) for variable (A). This seems to indicate that for some reason, the Blender camera is hard-coded to an image aperture dimension of A = 32 units. As long as the unit system is consistent, it won't matter what these units actually are, but if we assume the variable lensvalue in the function is intended to be a focal length in mm, then the formula will only work if it's also assumed that the aperture of the imaged area is fixed at 32mm. I hope this helps. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted June 3, 2015 Author Share Posted June 3, 2015 Thanks, guys. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.