Balsam Asset Import Tool
The Balsam tool is a command line application that is part of Qt Quick 3D's asset conditioning pipeline. The purpose is to take assets created in digital content creation tools like Maya, 3ds Max, or Blender and convert them into an efficient runtime format for use with Qt Quick 3D. It is not possible, nor does it make sense to reference the interchange formats directly in applications because a large amount of resources are needed to parse and condition the content of the asset before it is usable for realtime rendering. Instead the interchange formats can be converted via the Balsam tool into QML Components and resources like geometry and textures.
Usage:
balsam [options] sourceFilename
Example Usage
To convert a 3D asset contained in the file
testModel.fbx with
balsam the following command would be used:
balsam testModel.fbx
This would generate the following files:
meshes/testModel.mesh
TestModel.qml
Which can then be used in a Qt Quick 3D project by using that QML Component:
import QtQuick3D 1.14 TestModel { id: modelInstance }
Supported 3D Asset Types
- Wavefront (.obj)
- COLLADA (.dae)
- FBX (.fbx)
- Blender (.blend)
- GLTF2 (.gltf, .glb)
Some of the formats supported also allow for either embedding or referencing of texture assets. These assets are also supported, provided Qt also has support for them.
Support for 3D Studio Projects
The Balsam tool also has support for converting projects created with Qt 3D Studio into Qt Quick 3D QML projects.
- Qt 3D Studio Application (.uia)
- Qt 3D Studio Presentation (.uip)
The conversion of Qt 3D Studio projects does have some limitations due to differences in features available. Features such as Effects and CustomMaterials are not available and will not be generated. There is also some differences in how Animations are implemented, so there can be differences in behavior on conversion. The conversion process will not be 100% and it is expected that some adjustments will be necessary, but should ease the porting process for existing projects.
Supported Options
The following table lists the command-line options recognized by
balsam when converting asset files:
Note: For each boolean option it is possible to use --disable-<option-name>
The following table lists the command-line options recognized by
balsam when converting Qt 3D Studio.