ufbx/ufbx
FreeSingle source file FBX loader
About ufbx/ufbx
ufbx is a single source file (ufbx.c) and header (ufbx.h) library for loading FBX files. It supports binary and ASCII FBX files starting from version 3000. The library is designed to be safe and robust, gracefully handling invalid files and out-of-memory conditions. Loaded scenes are sanitized to avoid out-of-bounds indices or non-UTF-8 strings. It supports a wide range of object types including meshes, skinning, blend shapes, lights, cameras, embedded textures, NURBS curves and surfaces, geometry caches, LOD groups, display/selection sets, rigging constraints, and unified PBR material from known vendor-specific materials. The library also provides utilities such as polygon triangulation, index generation, animation curve evaluation, CPU skinning evaluation, subdivision surface evaluation, NURBS curve/surface tessellation, progress reporting, and cancellation. Additionally, it supports loading Wavefront .obj files. ufbx is written in portable C (also compiles as C++) and has been extensively tested on multiple platforms (Windows, macOS, Linux, WASI) with bit-exact results. It achieves 95% branch line coverage and is fuzzed for security.
Key Features
Pros & Cons
- Free and open source
- Single-file integration simplifies project setup
- Comprehensive FBX feature support, including legacy formats
- Robust error handling and sanitization for malformed files
- Extensively tested across multiple platforms with bit-exact results
- Also supports Wavefront OBJ files
- Only supports FBX and OBJ file formats (no glTF, Collada, etc.)
- Requires manual compilation as C99/C++11 or later
- No graphical user interface or high-level scripting interface
- Documentation primarily in header comments and README