Doc: Update the Adding 3D Views topic

Task-number: QDS-3087
Change-Id: I8255064fcbf3cbfeb140ecdec8cbda9ca9342fe3
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
This commit is contained in:
Johanna Vanhatapio
2020-11-17 15:43:11 +02:00
parent caace5da7b
commit 4e7665503f
5 changed files with 43 additions and 19 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -30,37 +30,61 @@
\title Adding 3D Views \title Adding 3D Views
You can use a wizard to create a Qt Quick 3D UI project that imports To create a Qt Quick 3D UI project, we recommend using a \uicontrol
the \l{Qt Quick 3D} QML types to the \uicontrol {QML Types} tab in {Qt Quick 3D Application Template} wizard template that imports the
\uicontrol Library and contains a 3D view, scene light, camera, and \l{Qt Quick 3D} QML types to the \uicontrol {QML Types} tab in
model. A default material is attached to the model. You can attach \uicontrol Library and contains a 3D view. A 3D view type includes a
textures to materials. For more information about creating projects, \l {Setting Scene Environment}{scene environment} as well as a scene
see \l{Creating Projects}. \l {Using Lights}{light}, \l {Using Scene Camera}{camera}, and \l {Adding
Models}{model}. A default \l {Using Materials and Shaders}{material} is
attached to the model. You can attach \l {Attaching Textures to Materials}
{textures} to materials. For more information about creating projects, see
\l{Creating Projects}.
To add a 3D view to some other kind of project and to display the Qt Quick To add a 3D view to some other kind of project and to display the Qt Quick
3D QML types in \uicontrol Library, select \uicontrol Library > 3D QML types in \uicontrol Library, select \uicontrol Library >
\uicontrol {QML Imports} > \uicontrol {Add Import} > \uicontrol QtQuick3D. \uicontrol {QML Imports} > \uicontrol {Add Import} > \uicontrol QtQuick3D.
\image studio-qtquick-3d-components.png \image studio-qtquick-3d-components.png "Qt Quick 3D components in Library"
To add components to the scene, drag and drop them to \uicontrol Navigator After importing the Qt Quick 3D QML types, drag and drop a \uicontrol
or \uicontrol {Form Editor}. View3D type to \uicontrol Navigator or to \uicontrol {Form Editor}.
\image studio-navigator-view3d.png "View 3D component in the Navigator" \image studio-navigator-view3d.png "A View 3D component in the Navigator"
By default, a directional light and a perspective camera are used. By default, a directional light and a perspective camera are used in a 3D
To use other light and camera types, change the type of the component scene created by using the wizard template mentioned above. To use other
in the \uicontrol Type field in \uicontrol Properties. For example, light and camera types, select the component in \uicontrol {3D Editor} or
to use a point light, enter \e {PointLight}. \uicontrol Navigator and change the type of the component in the \uicontrol
Type field in \uicontrol Properties. For example, to use a point light,
enter \e {PointLight}.
\image studio-3d-properties-type.png "Type field in Properties view" \image studio-3d-properties-type.png "Type field in Properties view"
To edit component properties, select the component in Similarly to other components, you can select a 3D view in \uicontrol
\uicontrol {Form Editor} or \uicontrol Navigator and Navigator or \uicontrol {3D Editor} and modify its property values in the
modify the property values in \uicontrol Properties. \uicontrol Properties view. Use the properties in the \uicontrol View3D
tab to set some properties specific to a 3D view component.
\image studio-qtquick-3d-view.png "View 3D component properties" \image studio-qtquick-3d-view.png "View 3D component properties"
For more information about the available components and their properties, The \uicontrol Camera property defines which camera is used to render the
see \l{Using 3D Components}. scene to \uicontrol {Form Editor}. If this property is not defined, the
first enabled camera in the scene will be used.
The \uicontrol Environment property specifies the \uicontrol
{Scene Environment} used to render the scene. By default, the first
\uicontrol {Scene Environment} in the scene is set as the property value.
The \uicontrol {Import Scene} property defines the ID of the component to
render to \uicontrol {Form Editor}. The component does not have to be a
child of a 3D view type. This referenced component becomes a sibling to
child items of a 3D view, if there are any. You can use this property, for
example, to create a split screen view showing your scene from multiple
cameras. For more information on how to to use a 3D view to show a scene
from multiple cameras, see \l {Qt Quick 3D - View3D Example}.
\note The \uicontrol {Import Scene} property can only be set once.
Subsequent changes will have no effect.
*/ */