ozz-animation provides full support for major Digital Content Creation formats, including glTF, Fbx, Collada… Those formats are heavily used by the animation industry and supported by all major DCC tools (Maya, Max, MotionBuilder, Blender…). ozz-animation offline pipeline aims to convert from these DCC offline formats (or any proprietary format) to ozz internal runtime optimized format, as illustrated below:
In a way or an other, the aim of the pipeline and importer tools is to end up with runtime data structures (ozz::animation::Skeleton, ozz::animation::Animation, …) that can be used with the runtime libraries, on any platform. Run-time libraries provide jobs and data structures to process runtime operations like sampling, blending…
ozz-animation provides a standard pipeline to import skeletons and animations from Fbx files, and all the other formats supported by the fxsdk. This pipeline is based on fbx2ozz command-line tool to import (aka convert) from DCC to ozz format.
Command line tools
fbx2ozz and gltf2ozz command line tools can be used to import data from DCC file (fbx, dae or other supported file formats supported by fbxsdk for fbx2ozz, and glTF for gltf2ozz) into ozz runtime format.
The following examples will use fbx2ozz, but gltf2ozz and other command line tools build on top of ozz_animation_tools works the same way.
The DCC file is specified using --file argument.
By default fbx2ozz will import the skeleton, all animations, and write them to disk. A specific configuration can be provided in order to customize import behavior. This configuration, in the form of a a json document, can be provided in 2 ways:
--config option, which expects a valid json configuration string.
Note that json configuration string must be properly escaped (see \" characters instead of " in the configuration string above).
--config_file option, which expects a path to a valid json configuration file.
As an example, here’s a configuration that produces fbx2ozz default behavior:
Import will behave in the following way:
Generate a runtime skeleton from the scene content (because skeleton.enable is true), and write it to a file named "skeleton.ozz".
Import all animations from the scene (because of animations[].clip is "*"), and write each of them to "DCC_animation_clip_name.ozz" (because of animations[].filename is "*.ozz").
Note that if skeleton.enable was false, the skeleton would be loaded from the ozz binary file named "skeleton.ozz" (set with the same skeleton.filename json member), instead of from the DCC file. This allows for example to reuse a skeleton to load animations of different DCC files.
The file reference.json (automatically generated during build) exposes all the available configuration members:
Some other command line options are available. One can use --help option to get all the details on all available options.
Fbx importer c++ sources and libraries (ozz_animation_fbx) are also provided to integrate their features to any application.