Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qtquick3d-export-blender.qdoc
Go to the documentation of this file.
1
// Copyright (C) 2019 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4
/*!
5
6
\title Exporting from Blender
7
\page quick3d-asset-conditioning-export-blender
8
9
It is possible to export meshes, lights, cameras, transform animations (scale/rotation/location),
10
UV layouts, pivot points, object hierarchy, and material slots from Blender.
11
12
\section1 Exporting Models
13
14
\section2 Create Material Slots
15
16
Material slots must be created and assigned in Blender before exporting. If this is not done,
17
one default material slot is used for the object.
18
19
\note Only material slots that have a material, and that are assigned to a mesh on the exported
20
object, will be imported.
21
22
To create material slots, follow the steps below.
23
24
\list 1
25
\li In the properties panel, select the \uicontrol material tab.
26
\li Press the \uicontrol + to add a new material slot.
27
\li Press the \uicontrol{New} button.
28
\image export-blender1.png
29
\li Repeat steps 2 to 4 for each material slot to create.
30
\endlist
31
32
By default, the first material slot will be assigned to the object.
33
34
To assign a different material slot to the object, or to assign several material slots to the
35
same object, follow the steps below.
36
37
\list 1
38
\li In edit mode, select the desired faces.
39
(\e{Shift + Right Mouse Click} to multi select, \e{A} to select all faces).
40
\li In the properties panel, select the material tab.
41
\li In the material slots list, select the desired material slot.
42
\li Press the \uicontrol{Assign} button to assign the selected material slot to selected faces.
43
\image export-blender3.png
44
\endlist
45
46
\section2 UV Unwrap Models
47
48
UV unwrapping your model will create a UV layout. Without a UV layout you will not be able to
49
render any textures on your model in Qt Quick 3D.
50
51
There are many different ways and techniques to unwrap 3D meshes. The most basic way to do it in
52
Blender is described below.
53
54
\list 1
55
\li In edit mode, press \e A to select the whole mesh.
56
\li Press the \e U key and select \uicontrol{Unwrap} from the context menu.
57
\image export-blender2.png
58
\endlist
59
60
\section2 Triangulate
61
62
\list 1
63
\li In object mode, select the object.
64
\li In the properties panel, select the modifiers tab.
65
\li In the drop down list, select \uicontrol{Triangulate}.
66
\image export-blender4.png
67
\li Press \uicontrol{Apply}.
68
\endlist
69
70
\note When exporting as COLLADA, it is possible to do the triangulation in the actual export step.
71
72
\section2 Bake Actions for Animations
73
74
\note This step is necessary only if you are exporting animations that are using custom curves
75
or object constraints to control the animation.
76
77
Actions are data-blocks containing animation data. If you are exporting animations you need to
78
bake actions.
79
80
\list 1
81
\li Press the \e{space bar} key.
82
\li Type \e{bake actions}.
83
\li Press the \e Enter key.
84
\endlist
85
86
\section2 Apply Location, Rotation, and Scale
87
88
\note This should not be done when exporting animations.
89
90
Applying transform values resets the object's location, rotation, and scale values. Location and
91
rotation values are changed to 0 while scale values are changed to 1. The object itself does not
92
visually change.
93
94
\list 1
95
\li In object mode, select the object.
96
\li Press the \e{Ctrl + A} keys.
97
\li Select \uicontrol {Location}.
98
\li From the check box in the panel, check also \uicontrol Rotation and \uicontrol {Scale}.
99
\image export-blender5.png
100
\endlist
101
102
\note Applying Location will also reset the object's origin (pivot point).
103
104
\section1 Exporting Lights
105
106
You can export lights of any type from Blender to use in Qt Quick 3D.
107
108
The following properties are imported:
109
\list
110
\li Position, rotation, scale
111
\li Brightness
112
\li Light color
113
\li Cast shadows
114
\endlist
115
116
Light type is imported (and converted if needed).
117
118
\table
119
\header
120
\li
121
Light type in Blender
122
\li
123
Will import to Qt Quick 3D as...
124
\row
125
\li
126
Point
127
\li
128
Point
129
\row
130
\li
131
Area
132
\li
133
Area
134
\row
135
\li
136
Sun
137
\li
138
Directional
139
\row
140
\li
141
Spot
142
\li
143
Directional
144
\row
145
\li
146
Hemi
147
\li
148
Directional
149
\endtable
150
151
\section1 Exporting Cameras
152
153
You can export perspective and orthographic cameras from Blender to use in Qt Quick 3D.
154
155
The following properties are imported:
156
\list
157
\li Position, rotation, scale
158
\li Clipping start/end
159
\li Focal Length (perspective camera only).
160
\endlist
161
162
\section1 Exporting COLLADA from Blender
163
164
\list 1
165
\li From the file menu, select \uicontrol {File > Export > Collada (.dae)}.
166
\li Ensure that \uicontrol Triangulation is checked on, unless you already have
167
triangulated all meshes.
168
\li Select the \uicontrol {Export COLLADA} button.
169
\endlist
170
171
\section1 Exporting FBX from Blender
172
173
In order to export as FBX, you must have the FBX export add-on installed and enabled
174
in Blender. With the default installation of Blender, the \c {Import-Export: FBX format} should be
175
installed. If you do not have the option to export as FBX avaialble, ensure that the add-on is
176
enabled by following the steps:
177
178
\list 1
179
\li
180
Select \uicontrol {File > User Preferences}.
181
\li
182
Select \uicontrol{Add-ons} from the top menu bar.
183
\li
184
Search for \e{fbx}.
185
\li
186
The add-on should now be visible, enable it by selecting the checkbox next to its name.
187
\endlist
188
189
\image export-blender-enable-fbx-addon.png
190
191
Next, to export as FBX, follow these steps:
192
193
\list 1
194
\li Select \uicontrol {File > Export > FBX (.fbx)}.
195
\li Under the \uicontrol Main tab, set \uicontrol Forward to \c{Y Forward} and \uicontrol Up
196
to \c{Z Up}.
197
\image export-blender-fbx-axis.png
198
\li For animations, ensure that the \uicontrol{Baked Animation} option is checked in the
199
\uicontrol Animation tab.
200
\image export-blender6.png
201
\li Select the \uicontrol {Export FBX} button.
202
\endlist
203
204
*/
qtquick3d
src
quick3d
doc
src
qtquick3d-export-blender.qdoc
Generated on
for Qt by
1.14.0