How to retrieve aperture from FBX Camera

The FBXLoader is split into Parser and Loader (roughly). The Parser reads the file (either ASCII or binary) and returns an object called fbxTree with the data in a format that can be read by the Loader. The Loader is then responsible for converting this data to three.js objects.

I am fairly sure that the Parser now returns all data from the FBX file (although not 100% sure, it’s a while since I worked on this and it hasn’t been tested with newest FBX releases). However, the Loader ignores quite a bit of it, mostly because it can’t be implemented in three.js. There’s also still some stuff like handling camera attributes that can probably be improved (cameras in particular I didn’t spend a long time on).

You can view the fbxTree by uncommenting this line:

To figure out what the FBX data means I have found a couple of useful places. First is the FBX SDK docs which @WASasquatch already linked to. Then there’s docs for Autodesk products. This one seems to have a good list of camera properties (don’t consider it exhaustive though, it’s just what the Smoke app supports)

http://docs.autodesk.com/smoke2013/index.html?url=files/GUID-E5D48282-76C5-4123-A6BC-89DA5AAD277E.htm,topicNumber=d30e49728

If you do need to hack into the Parser then this post is useful for an idea of how the binary format works, although it’s easier to start by exporting your file as ASCII.

You could also try searching through the source code of tools like Assimp, FBX2GLTF, or Blender to see how they handle FBX cameras. Maybe Godot too, not sure if they do FBX.

1 Like