-
Notifications
You must be signed in to change notification settings - Fork 316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import camera fov #1001
Comments
I have the same problem. The camera in the gltf has a yFOV value, which is calculated down to the default FocalLength of 50mm after importing the gltf. Blender: blender2.83a I am also using a GLTF-File exported from three.js using the GLTFExporter. The result as part of a JSON looks like this: In Blender I can find the camera, but not with yFOV but with a default FocalLength of 50mm (~ 40 degrees fov): --> 1.668 * (180/Math.PI) returns something near 95 degrees I guess. That should be the right FOV-value. |
I can confirm the issue as well. The camera is imported as default 50mm, which is not correct. I have made a three.js WebGL scene and exported it as glTF. In Blender camera FOV is not imported. Below is an image to present the issue. I can manually change the camera lens to Focal Length and convert the FOV value in glTF file to degrees to type in Blender. That will correct the problem, but this should be automatically done by the importer. Software: |
Hey, I could find out, that they already fixed it, but its not released in the newest Blender I guess. So to workaround this clone this git repo, and copy the glTF-Blender-IO/addons/io_scene_gltf2 folder to replace your local blender/x.xx/scripts/addons/io_scene_gltf2 folder. For me this worked, you can find the camera fix in io_scene_gltf2/blender/imp/gltf2_blender_camera.py where you can find the added:
Hope I could help out :) |
Yes, you are right. It is in 2.83 branch like you mentioned and at least import was working correct in my Blender 2.81. Other branches didn't have that change as I checked. Thanks. |
Hello, |
All fov of cameras imported from gltf/glb files are lost.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Camera fov defined (or its equivalent in mm), not default focal length of 50mm.
Test files gltf&glb
Test.zip
Version
Additional context
Test files are created using ThreeJS editor, adding some cameras and customizing their fov. Then I export to gltf and glb.
I see that the fov is stored in the definition of each camera inside the cameras array of gltf file.
The text was updated successfully, but these errors were encountered: