Kuesa ToneMapping QML Example¶
Demonstrates the use of the Kuesa API to import a glTF2 file and control its appearance by using different tone mapping algorithms.
QtQuick and Qt3D integration¶
The tonemapping example relies on the regular QtQuick and Qt 3D APIs to instantiate a QtQuick based application that combines Qt 3D based content with a 2D UI overlay.
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 |
|
Filename: tonemapping/qml/main.qml
SceneEntity¶
Kuesa provides the [SceneEntity ] element which holds collections of Qt 3D assets accessible by name.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
Filename: tonemapping/qml/MainScene.qml
Importing a glTF2 File¶
In order to load a glTF2 file, Kuesa provides the [GLTF2Importer ] element. If the sceneEntity property is set to a valid [SceneEntity ] instance, Qt 3D assets generated while parsing the file will be automatically added to the various asset collections.
1 2 3 4 5 6 7 |
|
Filename: tonemapping/qml/MainScene.qml
Controlling the Exposure and Tone Mapping¶
We use a [ForwardRenderer ] FrameGraph to render our scene. This FrameGraph has properties to control the exposure as well as the tone mapping algorithm we want to use.
Therefore we can create a binding on the toneMappingAlgorithm property of our [ForwardRenderer ] FrameGraph to control the tonemapping algorithm used
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|
Filename: tonemapping/qml/MainScene.qml
Updated on 2023-07-03 at 11:02:17 +0000