Adding Models

A Model component loads mesh data from a file. You can modify how the component is shaded by adding materials to the model.

A model can load static meshes from storage or one of the built-in primitive types: cube, cone, cylinder, plane (rectangle) or sphere. You can drag and drop a model from the Library to a 3D scene.

"Library view QML Types tab Qt Quick 3D section"

You can change the model type in the Source field in the Properties view. Select the button to add custom model types to the list.

"Model properties"

To enable picking the model against the scene, select the Pickable check box. Picking transforms the screen space x and y coordinates to a ray cast towards the specified position in scene space.

To use the geometry of this model when rendering to shadow maps, select the Casts shadows check box. To allow casting shadows on the model, select the Receives shadows check box.

Tessellation

To dynamically generate additional geometry for the model, select the tiling mode in the Tessellation mode filed. Tessellation is useful when using a displacement map with geometry, or to generate a smoother silhouette when zooming in. You can select either a Phong or an NPatch tessellation generator.

Specify an edge multiplier to the tessellation generator in the Edge tessellation field and an inner multiplier in the Inner tessellation field.

To display a wireframe that highlights the additional geometry created by the tessellation generator, select the Enable wireframe mode check box.

Adding Materials to Sub-Meshes

A model can consist of several sub-meshes, each of which can have its own material. Select the material from the list in the Materials field. Select the button to add materials to the list. For more information about materials, see Using Materials and Shaders.

© 2020 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.