The Filmbox (FBX) file format is a proprietary 3D file format developed by Autodesk. It’s used in industries like game development, film production, and architectural visualization. FBX supports 3D geometry, animations, materials, textures, and scene hierarchies, making it suitable for exchanging complex 3D data between software tools such as Autodesk Maya, Autodesk 3ds Max, Blender, and Unity.

A car FBX sample file
Figure 1. FBX sample file in the Microsoft 3D Viewer

This article shows how you can convert an FBX file to OGC 3D Tiles within LuciadFusion.

Only 3D geometry, materials and textures are supported. You can’t convert FBX files with animations to OGC 3D Tiles.

Convert the FBX file

LuciadFusion doesn’t support FBX natively, but you can make use of third-party tools to convert FBX to a format that LuciadFusion can process. One such tool is assimp, which is a free, open-source library for importing and exporting various 3D model formats. Assimp comes with a command-line interface (CLI) that allows you to convert FBX files to the GLB format, which LuciadFusion supports.

assimp export /path/to/input.fbx /path/to/output.glb

You may need these command line options to ensure that assimp creates the output GLB file correctly:

Embedding textures

Use the -embtex or --embed-textures option if you have issues with textures not being shown in the output GLB file. With this option, you embed any texture that the FBX file points to in the GLB file. Without this option, the GLB output file references any textures externally, which might produce unexpected results.

Rotating the FBX model

LuciadFusion can handle only GLB files that follow the coordinate system and units as defined in the glTF specification: +Y is up, +Z is forward, and -X is right. If the coordinate system in the FBX model is different, you may need to rotate the model to get it into the correct orientation. With these options, you can rotate the model according to your needs:

  • -rx= or --rotation-x= : rotate the model around the X-axis by a specified angle (in radians)

  • -ry= or --rotation-y= : rotate the model around the Y-axis by a specified angle (in radians)

  • -rz= or --rotation-z= : rotate the model around the Z-axis by a specified angle (in radians)

For example, this command converts an FBX input file with a Z-up axis into a GLB file, embedding the textures and rotating it -90 degrees around the X-axis:

assimp export /path/to/input.fbx /path/to/output.glb -ebmbtex -rx=-1.5707963

Create an OGC 3D Tiles service in LuciadFusion

Once you have the GLB file, you can use it in LuciadFusion to create an OGC 3D Tiles service.

For example, if you handle the FBX file shown in Figure 1, “FBX sample file in the Microsoft 3D Viewer” in this way, you can view the result in the LuciadRIA Data Formats sample, as illustrated in this figure:

The result in LuciadRIA
Figure 2. The converted FBX file shown in the LuciadRIA Data Formats sample
FBX data with a tiled structure

If your FBX data has a tiled structure, you can convert the FBX tiles with the highest level into GLB files using the assimp command line tool. Then, you can use these GLB files as input for the 3D Tiles Processing Engine or LuciadFusion to convert them to a single OGC 3D Tiles dataset.