- Qt 6.5
- Qt Quick 3D
- Qt Quick 3D Examples and Tutorials
- Qt Quick 3D - Level of Detail Helper Example
- Qt Quick 3D | Commercial or GPLv3

# Qt Quick 3D - Level of Detail Helper Example

Demonstrates the use of level of detail helper.

This example demonstrates the use of the LODManager helper. The LODManager works by changing the visibility of it's node children based on the distance to the specified camera. The distances property is a list of distance thresholds that determine when the visibility of a child is changed. The first child is shown when closest and the last child when furthest.

     LodManager {
         camera: camera
         distances: [100, 140, 180]
         fadeDistance: 10

         Model {
             scale: Qt.vector3d(100, 100, 100);
             source: "meshes/marble_bust_01_LOD_0.mesh"
             materials: marbleMaterial
         }

         Model {
             scale: Qt.vector3d(100, 100, 100);
             source: "meshes/marble_bust_01_LOD_1.mesh"
             materials: marbleMaterial
         }

         Model {
             scale: Qt.vector3d(100, 100, 100);
             source: "meshes/marble_bust_01_LOD_2.mesh"
             materials: marbleMaterial
         }

         Model {
             scale: Qt.vector3d(100, 100, 100);
             source: "meshes/marble_bust_01_LOD_3.mesh"
             materials: marbleMaterial
         }
     }

Files:

- lodhelper/CMakeLists.txt
- lodhelper/Example/lodhelper_qml_module_dir_map.qrc
- lodhelper/Example/main.qml
- lodhelper/Example/qmldir
- lodhelper/lodhelper.pro
- lodhelper/main.cpp
- lodhelper/main.qml
- lodhelper/qml.qrc

Images:

- lodhelper/Example/maps/baseColor.png
- lodhelper/Example/maps/normal.png
- lodhelper/Example/maps/occlusionRoughnessMetallic.png
- lodhelper/maps/baseColor.png
- lodhelper/maps/normal.png
- lodhelper/maps/occlusionRoughnessMetallic.png