aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/doc/tools/pyside6-balsam.rst
blob: c6677f6a3ee73bf1c2ee973ed908a262d81a9440 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.. _pyside6-balsam:

pyside6-balsam
==============

``pyside6-qsb`` is a tool that wraps the `balsam <Balsam Asset Import Tool>`_
tool provided with Qt Quick 3D. 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 converts 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 real-time rendering. Instead, the interchange formats can be
converted via the Balsam tool into QML Components and resources like geometry
and textures.


For more information on how to use this tool, read Qt's documentation
here: `Balsam Asset Import Tool`_.

Usage
-----

.. code-block:: bash

    pyside6-balsam [options] sourceFileName

To convert a 3D asset contained in the file ``testModel.fbx`` with
``pyside6-balsam`` the following command would be used:

.. code-block:: bash

    pyside6-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:

.. code-block:: xml

    import QtQuick3D 1.0

    Scene {
        Model {
            source: "TestModel.qml"
        }
    }

For other modes of operation, refer to the `Balsam Asset Import Tool`_.

.. _`Balsam Asset Import Tool`: https://doc.qt.io/qt-6/qtquick3d-tool-balsam.html
.. _Maya: https://www.autodesk.com/products/maya/overview
.. _3ds Max: https://www.autodesk.com/products/3ds-max/overview
.. _Blender: https://www.blender.org/