3D models
The Components view features some built-in primitive 3D models. This allows you to add cubes, cones, cylinders, spheres, and planes (rectangles) to your scene.
You can also use your own 3D models created with design tools. For more information, see Importing 3D assets.
A model component loads mesh data from a file. Modify how the component is shaded by using materials. For more information, see Materials and shaders and Material Editor and Browser.
Using a primitive 3D model
To add a built-in primitive 3D model component to your UI, do one of the following:
- Drag a model component from Components > Qt Quick 3D to the 3D view or to Navigator > View3D > Scene.
- Right-click in the 3D view and select Create > Primitives from the context menu.
Double-clicking a 3D model in the 2D view opens the 3D view with the 3D model selected.
Note: If you can't find the model components in Components, add the QtQuick3D module to your project, as described in Adding and Removing Modules.
Model properties
To edit the 3D model properties, select the model and go to Properties > Model.
The following table introduces the available properties.
Property | Description |
---|---|
Source | Changes the model type. To add custom model types to the list, select . |
Geometry | Specifies a custom geometry for the model. If you use this property, the Source field must be empty. |
Materials | Sets the material for the model. A model can consist of several sub-meshes, each of which can have its own material. To manage the materials:
|
Casts Shadows | Enables the model to cast shadows on other models. |
Receives Shadows | Enables the model to receive shadows. |
Casts Reflections | Enables reflection probes to reflect the model. |
Receives Reflections | Enables the model to receive reflections from the nearest reflection probe. The model must be inside at least one reflection probe to receive reflections. |
Is Pickable | Enables ray cast-based picking for the model. To learn more about picking, see Model::pickable and Qt Quick 3D - Picking example. |
Used in Baked Lighting | Makes the model contribute to baked lighting. For more information, see Baked lightmaps. |
Depth Bias | Sets the depth bias of the model. This can prevent rendering issues and ensure that the shadows of the model are displayed correctly. |
LOD Bias | Sets the level of detail bias. This adjusts how detailed textures appear at different distances. |
Tessellation properties in Qt 5
The properties discussed in this section are only available if you selected Qt 5 as the Target Qt Version when creating the project.
Tessellation refers to additional geometry that resembles tiling, which you can add to your model. To dynamically generate tessellation for the model, select Linear, Phong, or NPatch as the Tessellation mode. Tessellation is useful when using a displacement map with geometry, or to generate a smoother silhouette when zooming in.
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.
Available under certain Qt licenses.
Find out more.