summaryrefslogtreecommitdiff
path: root/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-editor.qdoc
blob: cc42cbc10054cbacfb1e3770459a6d8f8534ca4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Design Studio documentation.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
**
****************************************************************************/

/*!
    \previouspage studio-3d-design-mode.html
    \page studio-3d-editor.html
    \nextpage studio-3d-view.html

    \title Working in 3D Editor

    When editing a 3D scene, you view the scene in \uicontrol {3D Editor} by
    using the \uicontrol {3D Editor} camera. You can switch between
    \e {perspective camera} and \e {orthographic camera} modes. When using the
    perspective camera mode, objects that are far from the camera appear smaller
    than those nearby. In the orthographic camera mode, all objects appear at
    the same scale irrespective of their distance from the camera. Both of them
    are free-form camera modes that you can use to orbit around the scene.

    When you import 3D scenes from files that you exported from 3D graphics
    tools, you also import a \l{Using Scene Camera}{scene camera},
    \l{Using Lights}{light}, \l{Adding Models}{model}, and
    \l {Using Materials and Shaders}{materials}. If your scene did not contain
    them, you can add the corresponding Qt Quick 3D types from \uicontrol
    Library.

    You can use the toolbar buttons to \e transform 3D objects and manipulate
    the 3D scene. Transformation refers to moving, rotating, or scaling of an
    object. The \e pivot of the component is used as the origin for
    transformations. You can set a \l{Setting Transform Properties}{local pivot
    offset} for an item in \uicontrol Properties to transform the component
    around a point other than its local origin. A line is drawn in \uicontrol
    {3D Editor} from the pivot point to the center of the component to provide
    a visual connection between them.

    Toggle between local and global orientation to determine whether the gizmos
    affect only the local transformations of the item or whether they transform
    with respect to the global space.

    Additional helpful features when editing 3D scenes are the \e {edit light},
    which is a quick way to light the scene, and the grid that helps you to
    navigate in 3D space. Select the \inlineimage grid_on.png
    (\uicontrol {Toggle Grid Visibility}) to show or hide the grid.

    \image studio-3d-editor.png "3D Editor"

    \section1 Controlling the 3D Editor Camera

    To switch to perspective camera mode, select
    \inlineimage perspective_camera.png
    (\uicontrol {Toggle Perspective/Orthographic Edit Camera}).
    To switch to orthographic camera mode, select
    \inlineimage orthographic_camera.png
    .

    You can navigate the scene by panning, rotating, and zooming the 3D Editor
    camera:

    \list
        \li To pan, press \key Alt and use the middle mouse button to click
            anywhere in the rendered view to slide the view around.
        \li To orbit, press \key Alt and click anywhere in the rendered view to
            rotate the view.
        \li To zoom, use the mouse wheel or press \key Alt and right-click
            anywhere in the rendered view to zoom the view in or out as you drag
            up or down.
    \endlist

    To zoom and focus the 3D Editor camera on a selected item,
    select \inlineimage fit_selected.png
    (\uicontrol {Fit Selected}) or press \key F.

    The world axis helper (1) shows the direction of the world axes in respect
    to the 3D Editor camera. To point the camera at the currently selected
    component in the direction of an axis, click the axis. If no component
    is selected, the camera is pointed at the world origin. This does not
    affect the camera zoom level.

    \image studio-3d-editor-axis-helper.png "Axis helper in 3D Editor"

    You can use scene cameras (2) to view the the View3D type from a specific
    angle in \uicontrol {Form Editor} while editing scenes. Different types of
    cameras are available in \uicontrol Library under \uicontrol
    {Qt Quick 3D}. For more information about using cameras in the scene,
    the available camera types, and their properties, see
    \l{Using Scene Camera}.

    \section1 Using Global and Local Orientation

    To switch between local and global orientation, select
    \inlineimage local.png
    or \inlineimage global.png
    (\uicontrol {Toggle Local/Global Orientation})
    or press \key Y.

    In global orientation mode, transformation of a selected object is presented
    with respect to the global space. For example, while the move tool is
    selected, selecting a cube will show its move gizmo aligned with the axes
    of global space. Dragging on the red arrow of the gizmo moves the object in
    the global x direction.

    In local orientation mode, the position of a selected object is shown
    according to local axes specific to the selected object. For example,
    selecting a rotated cube will show its axes rotated, and not aligned with
    the axes of global space. Dragging on the red arrow of the gizmo
    moves the object in the local x direction in relation to the object.

    \section1 Using Edit Light

    The edit light is an extra point light that follows the edit camera.
    To switch the edit light on and off, select \inlineimage edit_light_on.png
    or \inlineimage edit_light_off.png
    (\uicontrol {Toggle Edit Light})
    or press \key U.

    For more information about the available scene light types and their
    properties, see \l{Using Lights}.

    \section1 Selecting Items

    To move, rotate, or scale items in the scene, you need to select them first.
    The selection mode buttons determine how items are selected when you click
    them in \uicontrol {3D Editor}:

    \list
        \li In the \inlineimage select_item.png
            (\uicontrol {Select Item}) mode, a single item is selected.
        \li In the \inlineimage select_group.png
            (\uicontrol {Select Group}) mode, the top level parent of the item
            is selected. This enables you to move, rotate, or scale a group of
            items.
    \endlist

    To toggle the selection mode, press \key Q.

    \section1 Moving Items

    \image studio-3d-editor-move.png "3D Editor in move mode"

    You can move items in relation to their coordinate system, along the x, y,
    or z axis or on the top, bottom, left, and right clip planes of the
    \uicontrol {3D Editor} camera.

    To move items, select \inlineimage move_on.png
    or press \key W:

    \list
        \li To move items along the axes of the move gizmo, click the axis and
            drag the item along the axis.
        \li To move items on a plane, click the plane handle and drag the item
            on the plane.
        \li To move an item freely in the editor, click the gray handle at the
            center of the item.
     \endlist

    \section1 Rotating Items

    \image studio-3d-editor-rotate.png "3D Editor in rotate mode"

    To rotate items, select \inlineimage rotate_on.png
    or press \key E:

    \list
        \li To rotate an item around its rotation gizmo, click the axis and
            drag in the direction you want to rotate the item in.
        \li To freely rotate the item, select the gray circle.
    \endlist

    \section1 Scaling Items

    \image studio-3d-editor-scale.png "3D Editor in scale mode"

    You can use the scale handles to adjust the local x, y, or z scale of an
    item. You can adjust the scale across one, two, or three axes, depending on
    the handle.

    To scale items, select \inlineimage scale_on.png
    or press \key R:

    \list
        \li To adjust the scale across one axis, click and drag the scale handle
            attached to the axis.
        \li To adjust the scale across a plane, click the plane handle and drag
            the item on the plane.
        \li To uniformly scale an item across all axes, click and drag the
            handle at the center of the item.
    \endlist
*/