Using 3D Components
To use 3D components, you need to first add the required modules to your project in Library > Components > . For more information, see Adding and Removing Modules. You can then add 3D components to your scene by dragging-and-dropping them from Library > Components > Qt Quick 3D to 3D Editor or to a 3D view in Navigator.
Note: Using 3D components will affect the performance of your UI. You should not use 3D components if the same results can be achieved using 2D components.
To edit 3D components, select the component in 3D Editor or in Navigator and set its properties in the Properties view.
The following video shows you how to add the components included in the Qt Quick 3D module, such as 3D models, cameras, and lights, to your scene:
See the next video to learn more about the custom shader utilities, 3D effects, and materials:
- Setting Group Properties
You can set the opacity, visibility, and transform properties of all 3D components.
- Adding 3D Models
You can use the model component to load static mesh data from storage or one of the built-in primitive types: cube, cone, cylinder, plane (rectangle), or sphere. You can attach materials to meshes and sub-meshes.
- Using Materials and Shaders
You can use materials and shaders to define how component surfaces are rendered in a scene and during live preview.
- Attaching Textures to Materials
You can use a Texture component to specify an image and how it is mapped to meshes in a 3D scene. Texture components can use image data either from a file or a Qt Quick QML type.
- Using 3D Materials
You can apply a set of predefined 3D materials on your models.
- Applying 3D Effects
You can use 3D effect components to generate post-processing effects.
- Using Custom Shaders
You can use 3D shader utilities to construct your own effects and materials.
- Creating Custom Effects and Materials
If the ready-made 3D effects and materials don't meet your needs, you can use 3D shader utilities to construct your own effects and materials.
- Using Lights
You can use several light types as the source of lighting in a scene and set their properties.
- Using Scene Camera
To project a 3D scene to a 2D viewport, such as Form Editor, it is necessary to view the scene from a camera. You can select the camera type and set its properties.
- Setting Scene Environment
You can use the SceneEnvironment component to specify how the scene is rendered globally.
© 2021 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.