I am trying to implement physically correct camera controls (based on lens size, focal length, and f-stop). However I noticed that the camera FOV in Babylon seems incorrect.
As a test, I created a simple scene in Blender (just a cube + light + camera) with a 35mm camera and 50mm focal length. This gives a FOV of 39.60.
However, when I import the GLB into Babylon, it has a FOV of 22.90. If I manually change the camera’s FOV to 39.60 then the result seems wrong (the perspective is slightly off, and the cube is too small).
Here is a sandbox which demonstrates the problem:
https://playground.babylonjs.com/#40ISEF
It overrides the FOV to the correct 39.60. If you comment out the camera.fov = ...
line then you will see Babylon’s default FOV.
If I view the same GLB in https://gltf-viewer.donmccurdy.com/ then it has the correct FOV. You have to change the camera to “Camera_Orientation”.
So I see two bugs here:
- It is ignoring the FOV which is specified in the GLB file.
- When manually setting the correct FOV the result is incorrect.