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:

Images:

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.