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-helpers.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
\qmlmodule QtQuick3D.Helpers
6
\title Qt Quick 3D Helpers QML Types
7
\brief Module containing helpers for creating applications using Qt Quick 3D.
8
9
This module provides helper types that make it easier to develop applications
10
using \l{Qt Quick 3D}.
11
*/
12
13
/*!
14
\qmltype AxisHelper
15
\inqmlmodule QtQuick3D.Helpers
16
\inherits Node
17
\brief Visual helper for showing the 3 axes and a grid in a 3D scene.
18
19
\image axishelper.jpg {Sphere with RGB axis lines showing coordinate system}
20
21
The X axis is red, the Y axis is green, and the Z axis is blue.
22
23
The example scene here has a Sphere at position \c{(0, 0, 0)} and an
24
AxisHelper object. With the WasdController helper one can conveniently
25
navigate the scene.
26
27
\badcode
28
View3D {
29
anchors.fill: parent
30
camera: camera
31
32
PerspectiveCamera {
33
id: camera
34
position: Qt.vector3d(0, 0, 600)
35
}
36
37
DirectionalLight {
38
position: Qt.vector3d(-500, 500, -100)
39
color: Qt.rgba(0.4, 0.2, 0.6, 1.0)
40
ambientColor: Qt.rgba(0.1, 0.1, 0.1, 1.0)
41
}
42
43
Model {
44
source: "#Sphere"
45
materials: [ PrincipledMaterial { } ]
46
}
47
48
AxisHelper {
49
}
50
}
51
52
WasdController {
53
controlledObject: camera
54
}
55
\endcode
56
*/
57
58
/*! \qmlproperty color AxisHelper::gridColor
59
\default Qt.rgba(0.8, 0.8, 0.8, 1)
60
Specifies the color of the grid.
61
*/
62
/*! \qmlproperty real AxisHelper::gridOpacity
63
\default 0.5
64
Specifies the opacity of the grid.
65
*/
66
/*! \qmlproperty bool AxisHelper::enableXZGrid
67
/default true
68
Enables the grid on XZ plane.
69
*/
70
/*! \qmlproperty bool AxisHelper::enableXYGrid
71
\default false
72
Enables the grid on XY plane.
73
*/
74
/*! \qmlproperty bool AxisHelper::enableYZGrid
75
\default false
76
Enables the grid on YZ plane.
77
*/
78
/*! \qmlproperty bool AxisHelper::enableAxisLines
79
\default true
80
Enables showing the axis lines.
81
*/
82
83
/*!
84
\qmltype WasdController
85
\inqmlmodule QtQuick3D.Helpers
86
\inherits Item
87
\brief Control node position and orientation with keys and mouse.
88
89
This helper allows the user to control a node using W, A, S, D, the arrow
90
keys, and the mouse. Usually the controlled node is a Camera, specified in
91
the controlledObject property.
92
93
Adding a WasdController can be highly useful both in applications that wish
94
to provide a standard way of navigating the scene, and also as a temporary
95
measure during development and troubleshooting, as it allows inspecting the
96
scene at run time via familiar keyboard and mouse navigation.
97
98
The key bindings are as follows:
99
100
\list
101
\li \c W or \c up - go forward
102
\li \c S or \c down - go backward
103
\li \c A or \c left - strafe left
104
\li \c D or \c right - strafe right
105
\li \c R or \c {page up} - move up
106
\li \c F or \c {page down} - move down
107
\li \c shift together with other keys - move faster, depending on \l shiftSpeed
108
\endlist
109
110
The following snippet shows how a WasdController object can be added. By
111
default both key and mouse based navigation is active, so in most cases
112
there is no further configuration needed:
113
114
\badcode
115
View3D {
116
anchors.fill: parent
117
camera: camera
118
PerspectiveCamera {
119
id: camera
120
position: Qt.vector3d(0, 0, 600)
121
}
122
...
123
}
124
125
WasdController {
126
controlledObject: camera
127
}
128
\endcode
129
*/
130
131
/*! \qmlproperty QtQuick3D::Node WasdController::controlledObject
132
Specifies the node to control. This is typically a Camera object.
133
*/
134
/*! \qmlproperty real WasdController::speed
135
\default 1
136
Specifies the speed of navigation.
137
*/
138
/*! \qmlproperty real WasdController::shiftSpeed
139
\default 3
140
Specifies the speed multiplier that is active when the shift key is pressed.
141
*/
142
/*! \qmlproperty real WasdController::forwardSpeed
143
\default 5
144
Specifies the speed of navigation when the forward key is pressed.
145
*/
146
/*! \qmlproperty real WasdController::backSpeed
147
\default 5
148
Specifies the speed of navigation when the back key is pressed.
149
*/
150
/*! \qmlproperty real WasdController::rightSpeed
151
\default 5
152
Specifies the speed of navigation when the right key is pressed.
153
*/
154
/*! \qmlproperty real WasdController::leftSpeed
155
\default 5
156
Specifies the speed of navigation when the left key is pressed.
157
*/
158
/*! \qmlproperty real WasdController::upSpeed
159
\default 5
160
Specifies the speed of navigation when the up key is pressed.
161
*/
162
/*! \qmlproperty real WasdController::downSpeed
163
\default 5
164
Specifies the speed of navigation when the down key is pressed.
165
*/
166
/*! \qmlproperty real WasdController::xSpeed
167
\default 0.1
168
Specifies the speed of navigation when the mouse is moved along the X axis.
169
*/
170
/*! \qmlproperty real WasdController::ySpeed
171
\default 0.1
172
Specifies the speed of navigation when the mouse is moved along the Y axis.
173
*/
174
/*! \qmlproperty bool WasdController::xInvert
175
\default false
176
Inverts the x-axis controls.
177
*/
178
/*! \qmlproperty bool WasdController::yInvert
179
\default true
180
Inverts the y-axis controls.
181
*/
182
/*! \qmlproperty bool WasdController::mouseEnabled
183
\default true
184
Enables mouse controls.
185
*/
186
/*! \qmlproperty bool WasdController::keysEnabled
187
\default true
188
Enables key controls.
189
*/
190
/*! \qmlproperty bool WasdController::inputsNeedProcessing
191
This property is true when there are inputs needing processing.
192
\readonly
193
*/
194
/*! \qmlproperty enumeration WasdController::acceptedButtons
195
\default Qt.LeftButton
196
Specifies the buttons accepted by the controller.
197
\sa DragHandler, MultiPointHandler
198
*/
199
200
/*!
201
\qmltype DebugView
202
\inqmlmodule QtQuick3D.Helpers
203
\inherits Rectangle
204
\brief View to show rendering statistics and perform debug and developer actions.
205
206
This helper allows viewing render performance statistics of a View3D. It
207
shows the FPS, sync and render times. In addition, it can also show
208
detailed statistics about draw calls, render passes, and the textures and
209
meshes used by the scene's assets. The showing of such extended information
210
is controlled by the resourceDetailsVisible property, which defaults to
211
false.
212
213
For example, the following snippet shows how a DebugView can be added that
214
shows its information in the top-left corner of the Qt Quick scene:
215
216
\badcode
217
View3D {
218
id: v3d
219
anchors.fill: parent
220
camera: camera
221
PerspectiveCamera {
222
id: camera
223
position: Qt.vector3d(0, 0, 600)
224
}
225
...
226
}
227
DebugView {
228
source: v3d
229
resourceDetailsVisible: true
230
}
231
\endcode
232
233
In addition, the \c Tools section allows performing actions such as turning
234
on wireframe rendering, or visualizing various aspects of the material.
235
*/
236
237
/*! \qmlproperty var DebugView::source
238
Specifies the source View3D to show the statistics from.
239
*/
240
241
/*! \qmlproperty bool DebugView::resourceDetailsVisible
242
\default false
243
244
Indicates whether the additional fields with detailed render pass, mesh,
245
texture, and other resource statistics should be shown by default.
246
247
The default value is false, which means only CPU timings from the last
248
rendered frame will be shown, unless the user interactively enables
249
additional data via the on-screen checkbox. Change the value to true to make
250
more information visible by default. This includes render pass details and
251
the active assets for the last rendered frame.
252
*/
253
254
/*!
255
\qmltype OrbitCameraController
256
\inqmlmodule QtQuick3D.Helpers
257
\inherits Item
258
\brief Camera Controller which rotates around an origin.
259
260
This helper provides a way to rotate a camera around an origin. To function
261
OrbitCameraController accepts a Node as the origin, and a Camera object
262
which should be a child of the originNode to control. By only adjusting the z
263
position of the child camera relative to the parent origin it has the effect
264
of moving the camera nearer or farther from the target origin. By applying
265
a rotation to the origin node, the child camera will be orbited around the
266
origin node.
267
268
The OrbitCameraController item itself is a 2D item that accepts input events
269
so whatever it's size and position will be where input events are accepted.
270
To zoom either use the scroll wheel of the mouse or perform a pinch gesture.
271
To rotate click or touch and drag the area. To pan, hold control and drag
272
the area. Panning will change the position of the origin node. It is also
273
possible to perform a panning gesture by performing a two finger drag.
274
275
\badcode
276
View3D {
277
camera: cameraNode
278
Node {
279
id: originNode
280
PerspectiveCamera {
281
id: cameraNode
282
z: 100
283
}
284
}
285
OrbitCameraController {
286
anchors.fill: parent
287
origin: originNode
288
camera: cameraNode
289
}
290
...
291
}
292
\endcode
293
*/
294
295
/*! \qmlproperty QtQuick3D::Node OrbitCameraController::origin
296
Specifies the origin node to control. This is a required property and should
297
be the parent of the \l camera
298
*/
299
/*! \qmlproperty QtQuick3D::Camera OrbitCameraController::camera
300
Specifies the camera node to control. This is a required property and should
301
be a child of the \l origin node.
302
*/
303
/*! \qmlproperty real OrbitCameraController::xSpeed
304
\default 0.1
305
Specifies the speed of navigation when the mouse is moved along the X axis.
306
*/
307
/*! \qmlproperty real OrbitCameraController::ySpeed
308
\default 0.1
309
Specifies the speed of navigation when the mouse is moved along the Y axis.
310
*/
311
/*! \qmlproperty bool OrbitCameraController::xInvert
312
\default false
313
Inverts the x-axis controls.
314
*/
315
/*! \qmlproperty bool OrbitCameraController::yInvert
316
\default true
317
Inverts the y-axis controls.
318
*/
319
/*! \qmlproperty bool OrbitCameraController::mouseEnabled
320
\default true
321
Enables mouse controls.
322
*/
323
/*! \qmlproperty bool OrbitCameraController::panEnabled
324
\default true
325
Enables panning controls.
326
*/
327
/*! \qmlproperty bool OrbitCameraController::automaticClipping
328
\since 6.9
329
\default true
330
331
Enables automatic updating of the \l{Camera}{camera}'s
332
\l{PerspectiveCamera::}{clipNear} and l\{PerspectiveCamera::}{clipFar}
333
properties based on the camera's z position.
334
*/
335
/*! \qmlproperty Qt::MouseButtons OrbitCameraController::acceptedButtons
336
\since 6.9
337
\default Qt.LeftButton
338
Specifies the mouse button that controls the camera.
339
*/
340
341
342
/*!
343
\qmltype LodManager
344
\inqmlmodule QtQuick3D.Helpers
345
\inherits Node
346
\brief Manager that handles level of detail visibility changes.
347
348
This helper provides a way to handle level of detail changes. It works
349
by changing the visibility of its child nodes based on the distance
350
to the camera. The thresholds are determined by the user using the
351
distances list. The first distance is the threshold when the manager
352
changes from showing the first child and the second child etc. The first
353
child should be the most detailed one as it is shown when the camera is
354
close. If fadeDistance is set, the manager cross-fades between models by
355
changing their opacity. Fading only works with model nodes.
356
357
\badcode
358
View3D {
359
LodManager {
360
camera: camera
361
distances: [50, 100]
362
fadeDistance: 10
363
364
Model { ... }
365
Model { ... }
366
Model { ... }
367
}
368
}
369
\endcode
370
*/
371
372
/*! \qmlproperty QtQuick3D::Camera LodManager::camera
373
Specifies the camera from which the distance to the child nodes is calculated.
374
*/
375
376
/*! \qmlproperty list LodManager::distances
377
Specifies the thresholds when the detail level changes. The first number
378
is the distance when the first node changes to the second one, etc.
379
*/
380
381
/*! \qmlproperty real LodManager::fadeDistance
382
Specifies the distance at which the cross-fade between the detail levels
383
starts.
384
*/
385
386
/*!
387
\qmltype ExtendedSceneEnvironment
388
\inqmlmodule QtQuick3D.Helpers
389
\inherits SceneEnvironment
390
\brief A SceneEnvironment providing commonly used rendering effects.
391
\since 6.5
392
393
The \c ExtendedSceneEnvironment is an extension of QtQuick3D's \l
394
SceneEnvironment type that comes with a collection of commonly used effects
395
built-in. The effects are exposed through a set of properties that are
396
prefixed with the name of the effect they control.
397
398
When enabling one or more of these effects, the result is similar to
399
manually adding post-processing effects to the SceneEnvironment's
400
\l{SceneEnvironment::effects}{effects} list. ExtendedSceneEnvironment
401
provides however effects that are not available in standalone form, and
402
more importantly, \b{it efficiently combines the effects that are enabled,
403
reducing the number of additional render passes needed, which can lead to
404
significantly better performance than applying individual post-processing
405
effects} to the scene. ExtendedSceneEnvironment also plays well with
406
tonemapping, even for the more complicated multiple pass effects, and also
407
when multiple effects are enabled and combined together. This was not
408
always the case with standalone effects.
409
410
\note If additional post-processing effects are added to the
411
\l{SceneEnvironment::effects}{effects} list of \l SceneEnvironment, then
412
those effects will be applied \e before the effects provided by the \l
413
ExtendedSceneEnvironment type.
414
415
Certain features of SceneEnvironment, such as the tonemapping, are
416
inherited and extended with additional properties in
417
ExtendedSceneEnvironment. For example, SceneEnvironment offers the
418
\l{SceneEnvironment::tonemapMode}{tonemapMode} property, whereas
419
ExtendedSceneEnvironment adds control over the exposure, white point,
420
sharpening, and dithering settings of the tonemapper as well. The
421
\l{SceneEnvironment::tonemapMode}{tonemapMode} property is not duplicated
422
however since ExtendedSceneEnvironment inherits everything from
423
SceneEnvironment, so the base setting of the tonemapping mode is usable
424
regardless of which type of environment is associated with a View3D, but
425
the additional properties are available only when using
426
ExtendedSceneEnvironment. Other effects, such as screen space ambient
427
occlusion (SSAO) or fog are fully part of SceneEnvironment and are usable
428
with both types of environments.
429
430
\section1 Getting Started with ExtendedSceneEnvironment
431
432
To use the additional features offered by ExtendedSceneEnvironment,
433
associate the View3D with an instance of it. Do not forget to import the
434
\c{QtQuick3D.Helpers} module.
435
436
\qml
437
import QtQuick3D
438
import QtQuick3D.Helpers
439
440
View3D {
441
environment: ExtendedSceneEnvironment {
442
tonemapMode: SceneEnvironment.Filmic
443
vignetteEnabled: true
444
// ...
445
}
446
}
447
\endqml
448
449
\note Experimenting with the effect parameters and tuning the values to
450
achieve the desired visual results can often be more productive when done
451
visually, with controls such as sliders that give instant feedback in the
452
rendered scene when a value is changed. Using a designer tool such as Qt
453
Design Studio, or a test bed similar to the \l{Qt Quick 3D - Scene Effects
454
Example} is therefore often recommendable when aiming to set up a high
455
quality scene that looks visually appealing.
456
457
\note Switching SceneEnvironment to ExtendedSceneEnvironment automatically
458
implies at least one additional render pass, just as if an Effect with a
459
single pass was added to the
460
\l{SceneEnvironment::effects}{SceneEnvironment's effect list}.
461
This is true regardless of how many of the individual post-processing steps
462
are enabled. (the more complex effects may involve more than one additional
463
render pass)
464
465
\section1 Available Effects
466
467
Below is an overview of the effects and related features provided by
468
ExtendedSceneEnvironment, including features inherited from
469
SceneEnvironment.
470
471
\list
472
473
\li \l{SceneEnvironment::tonemapMode}{Tonemapping} - Controls how colors
474
are tonemapped from high definition range to the 0-1 range before being
475
displayed. ExtendedSceneEnvironment adds additional controls over the
476
exposure, white point, sharpening, and dithering.
477
478
Controlled by the properties \l tonemapMode, \l exposure, \l whitePoint, \l
479
ditheringEnabled.
480
481
\image extendedsceneenvironment_tonemap.jpg
482
{Scene demonstrating tonemapping}
483
484
\li \l{colorAdjustmentsEnabled}{Color adjustments} - Brightness, contrast,
485
saturation adjustment.
486
487
Controlled by the properties \l colorAdjustmentsEnabled, \l
488
adjustmentBrightness, \l adjustmentContrast, \l adjustmentSaturation.
489
490
\image extendedsceneenvironment_coloradj.jpg
491
{Scene demonstrating color adjustments}
492
493
\li \l{lutEnabled}{Color grading} via lookup table (LUT) textures.
494
495
Controlled by the properties \l lutEnabled, \l lutSize, \l lutFilterAlpha.
496
497
\image extendedsceneenvironment_colorgrade.jpg
498
{Scene demonstrating color grading with lookup table}
499
500
\li \l{depthOfFieldEnabled}{Depth of field}
501
502
Controlled by the properties \l depthOfFieldEnabled, \l
503
depthOfFieldFocusDistance, \l depthOfFieldFocusRange, \l
504
depthOfFieldBlurAmount.
505
506
\image extendedsceneenvironment_dof.jpg
507
{Scene demonstrating depth of field effect}
508
509
\li \l{glowEnabled}{Glow and bloom}
510
511
Controlled by the properties \l glowEnabled, \l glowQualityHigh, \l
512
glowUseBicubicUpscale, \l glowStrength, \l glowIntensity, \l glowBloom, \l
513
glowBlendMode, \l glowHDRMaximumValue, \l glowHDRMinimumValue, \l
514
glowHDRScale.
515
516
\image extendedsceneenvironment_glow.jpg {Scene demonstrating glow effect}
517
518
\li \l{vignetteEnabled}{Vignette}
519
520
Controlled by the properties \l vignetteEnabled, \l vignetteStrength, \l
521
vignetteColor, \l vignetteRadius.
522
523
\image extendedsceneenvironment_vignette.jpg
524
{Scene demonstrating vignette effect}
525
526
\li \l{lensFlareEnabled}{Lens flare}
527
528
Controlled by the properties \l lensFlareEnabled, \l lensFlareBloomBias, \l
529
lensFlareGhostDispersal, \l lensFlareGhostCount, \l lensFlareHaloWidth, \l
530
lensFlareStretchToAspect, \l lensFlareDistortion, \l lensFlareBlurAmount,
531
\l lensFlareApplyDirtTexture, \l lensFlareApplyStarburstTexture, \l
532
lensFlareCameraDirection, \l lensFlareLensColorTexture, \l
533
lensFlareLensDirtTexture, \l lensFlareLensStarburstTexture.
534
535
\image extendedsceneenvironment_lensflare.jpg
536
{Scene demonstrating lens flare effect}
537
538
\li \l{SceneEnvironment::aoStrength}{Screen space ambient occlusion} -
539
Provided by \l SceneEnvironment. Note that \l{ssgiEnabled}{SSGI} also
540
provides ambient occlusion, and it will often give better quality results in
541
practice. Avoid enabling both SceneEnvironment's ambient occlusion and
542
ExtendedSceneEnvironment's screen-space global illumination, since it is
543
unnecessary and wasteful to perform both. Controlled by
544
\l{SceneEnvironment::aoEnabled}, \l{SceneEnvironment::aoStrength},
545
\l{SceneEnvironment::aoDistance}, \l{SceneEnvironment::aoSoftness},
546
\l{SceneEnvironment::aoDither}, \l{SceneEnvironment::aoSampleRate},
547
\l{SceneEnvironment::aoBias}.
548
549
\image extendedsceneenvironment_ssao.jpg
550
{Scene demonstrating screen space ambient occlusion}
551
552
\li \l{SceneEnvironment::fog}{Fog} - Provided by \l SceneEnvironment. This
553
is not a post-processing type of effect, but is rather applied to the
554
materials of the renderable objects in the scene.
555
556
Controlled by the \l{QtQuick3D::Fog}{Fog} object associated with the
557
\l{SceneEnvironment::fog} property.
558
559
\image extendedsceneenvironment_fog.jpg {Scene demonstrating fog effect}
560
561
\li \l{SceneEnvironment::antialiasingMode}{Antialiasing} - Multisampling,
562
supersampling, progressive antialiasing, specular antialiasing, temporal
563
antialiasing are provided by \l SceneEnvironment. \l
564
ExtendedSceneEnvironment adds the option for using \l{fxaaEnabled}{a form
565
of FXAA}.
566
567
FXAA is controlled by \l fxaaEnabled. Other antialiasing modes are
568
controlled by \l{SceneEnvironment::antialiasingMode},
569
\l{SceneEnvironment::temporalAAEnabled},
570
\l{SceneEnvironment::temporalAAStrength}, and
571
\l{SceneEnvironment::specularAAEnabled}.
572
573
\image extendedsceneenvironment_aa.jpg {Scene demonstrating antialiasing}
574
575
\li \l{ssgiEnabled}{Screen-space global illumination} Provides ambient
576
occlusion and indirect lighting. Note that enabling this effect may have a
577
big impact on GPU load and performance. Controlled by the properties \l
578
ssgiEnabled, \l ssgiIndirectLightEnabled, \l ssgiIndirectLightBoost, \l
579
ssgiBufferSizeFactor, \l ssgiSimulatedBounceEnabled, \l
580
ssgiSimulatedBounceFactor, \l ssgiSampleCount, \l ssgiSampleRadius, \l
581
ssgiSliceCount, \l ssgiHitThickness
582
583
\image extendedsceneenvironment_ssgi.jpg
584
{City with buildings, red awnings, and outdoor cafe seating}
585
586
\endlist
587
588
\sa SceneEnvironment, {Qt Quick 3D - Scene Effects Example}
589
*/
590
591
// Depth of Field Effect
592
/*! \qmlproperty bool ExtendedSceneEnvironment::depthOfFieldEnabled
593
Enables the depth of field blur effect.
594
595
\default false
596
*/
597
/*! \qmlproperty real ExtendedSceneEnvironment::depthOfFieldFocusDistance
598
Sets the distance from the camera at which objects are in focus.
599
600
\default 600
601
602
Here the
603
\l{https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/Sponza}{Sponza}
604
scene has a scale of \c 100 applied in order to have a suitably big range
605
to get blur applied to the back and the front of the view. The picture
606
below is taken with a focus distance of 753 and a focus range of 482.
607
608
\image extendedsceneenvironment_dof.jpg
609
{Scene demonstrating depth of field effect}
610
*/
611
/*! \qmlproperty real ExtendedSceneEnvironment::depthOfFieldFocusRange
612
The distance around the \l
613
{ExtendedSceneEnvironment::depthOfFieldFocusDistance}{depthOfFieldFocusDistance}
614
where items are fully in focus. The focus then fades away to fully blurred
615
by the same distance on both the near and far sides.
616
617
\default 100
618
*/
619
/*! \qmlproperty real ExtendedSceneEnvironment::depthOfFieldBlurAmount
620
Sets the amount of blur applied to objects outside the focus range.
621
Sensible values are in the range \b 0 to \b 10. A value of 0 applies
622
no additional blur.
623
624
\default 4.0
625
626
\table
627
\header
628
\li Blur amount of 0
629
\li Blur amount of 15
630
\row
631
\li \image extendedsceneenvironment_dof_no_blur.jpg
632
{Scene without depth of field blur}
633
\li \image extendedsceneenvironment_dof_15_blur.jpg
634
{Scene with depth of field blur at 15}
635
\endtable
636
*/
637
// Tonemapper
638
/*!
639
\qmlproperty enumeration ExtendedSceneEnvironment::tonemapMode
640
\default SceneEnvironment.TonemapModeLinear
641
642
This property defines how colors are tonemapped before rendering. All
643
rendering in Qt Quick 3D is performed in linear color space and can in
644
many cases lead to generating color values that are not displayable. The
645
tonemapMode determines the technique that is used to remap colors into a
646
displayable range.
647
648
The default value is \c SceneEnvironment.TonemapModeLinear
649
650
\value SceneEnvironment.TonemapModeNone
651
All Tonemapping is bypassed. This mode is useful when performing post
652
processing effects.
653
\value SceneEnvironment.TonemapModeLinear
654
Linear tonemapping is applied. Colors are gamma corrected and returned
655
in sRGB color space.
656
\value SceneEnvironment.TonemapModeAces
657
Academy Color Encoding System tonemapping is applied.
658
\value SceneEnvironment.TonemapModeHejlDawson
659
Hejl-Dawson tonemapping is applied.
660
\value SceneEnvironment.TonemapModeFilmic
661
Filmic tonemapping is applied.
662
663
\note When using post-processing effects, many effects expect untonemapped
664
linear color data. It is important to bypass the built-in tonemapping in
665
this case by using the \c SceneEnvironment.TonemapModeNone value. This does
666
not apply to the built-in effects of ExtendedSceneEnvironment because those
667
automatically take care of proper tonemapping.
668
669
\table
670
\header
671
\li Tonemap mode
672
\li Example
673
\row
674
\li None
675
\li \image extendedsceneenvironment_tonemap_none.jpg
676
{Scene with no tonemapping}
677
\row
678
\li Linear
679
\li \image extendedsceneenvironment_tonemap_linear.jpg
680
{Scene with linear tonemapping}
681
\row
682
\li Aces
683
\li \image extendedsceneenvironment_tonemap_aces.jpg
684
{Scene with ACES tonemapping}
685
\row
686
\li HejlDawson
687
\li \image extendedsceneenvironment_tonemap_hejldawson.jpg
688
{Scene with Hejl-Dawson tonemapping}
689
\row
690
\li Filmic
691
\li \image extendedsceneenvironment_tonemap_filmic.jpg
692
{Scene with filmic tonemapping}
693
\endtable
694
*/
695
/*! \qmlproperty real ExtendedSceneEnvironment::exposure
696
Exposure level used by the tonemapper.
697
698
\default 1.0
699
700
\table
701
\header
702
\li Filmic tonmapping with exposure 8
703
\li Filmic tonmapping with exposure set to 0.5
704
\row
705
\li \image extendedsceneenvironment_tonemap_exposure_8.jpg
706
{Scene with exposure value 8}
707
\li \image extendedsceneenvironment_tonemap_exposure_05.jpg
708
{Scene with exposure value 0.5}
709
\endtable
710
*/
711
/*! \qmlproperty real ExtendedSceneEnvironment::whitePoint
712
713
Reference value for \e white when tonemapping is enabled. The value must be
714
larger than 0.
715
716
\note This value is ignored when using \l{SceneEnvironment::tonemapMode}{SceneEnvironment.TonemapModeLinear}.
717
718
\default 1
719
720
\table
721
\header
722
\li Filmic tonmapping with white point set to 0.1
723
\li Filmic tonmapping with white point set to 1
724
\row
725
\li \image extendedsceneenvironment_tonemap_whitepoint_01.jpg
726
{Stone hallway with brighter film tonemapping, white point 0.1}
727
\li \image extendedsceneenvironment_tonemap_whitepoint_1.jpg
728
{Stone hallway with darker film tonemapping, white point 1}
729
\endtable
730
*/
731
/*! \qmlproperty bool ExtendedSceneEnvironment::ditheringEnabled
732
Enables dithering to reduce banding artifacts.
733
734
\default false
735
*/
736
/*! \qmlproperty real ExtendedSceneEnvironment::sharpnessAmount
737
Set the sharpening amount. Valid values are from \c 0.0 (off) to \c 1.0 (full).
738
739
\default 0.0
740
741
\table
742
\header
743
\li Filmic tonmapping with sharpness set to 0
744
\li Filmic tonmapping with sharpness set to 1
745
\row
746
\li \image extendedsceneenvironment_tonemap_sharpness_0.jpg
747
{Stone hallway with sharpness set to 0}
748
\li \image extendedsceneenvironment_tonemap_sharpness_1.jpg
749
{Stone hallway with sharpness set to 1}
750
\endtable
751
*/
752
// FXAA
753
/*! \qmlproperty bool ExtendedSceneEnvironment::fxaaEnabled
754
Enables fast approximate antialiasing (FXAA).
755
756
\table
757
\header
758
\li FXAA disabled
759
\li FXAA enabled
760
\row
761
\li \image extendedsceneenvironment_without_fxaa.jpg {Stone hallway
762
without antialiasing}
763
\li \image extendedsceneenvironment_with_fxaa.jpg {Stone hallway with
764
fast approximate antialiasing}
765
\endtable
766
767
\default false
768
*/
769
// Adjustments
770
/*! \qmlproperty bool ExtendedSceneEnvironment::colorAdjustmentsEnabled
771
772
Enables color adjustments.
773
774
\default false
775
\sa {ExtendedSceneEnvironment::colorAdjustmentsEnabled}{colorAdjustmentsEnabled}
776
*/
777
/*! \qmlproperty real ExtendedSceneEnvironment::adjustmentBrightness
778
Adjusts the brightness of the scene.
779
780
\table
781
\header
782
\li Brightness of 1
783
\li Brightness of 4
784
\row
785
\li \image extendedsceneenvironment_brightness_contrast_saturation_at_1.jpg
786
{Stone hallway with default brightness level}
787
\li \image extendedsceneenvironment_brightness_at_4.jpg
788
{Stone hallway with brightness increased to 4}
789
\endtable
790
791
\default 1
792
*/
793
/*! \qmlproperty real ExtendedSceneEnvironment::adjustmentContrast
794
Adjusts the contrast of the scene.
795
796
\table
797
\header
798
\li Contrast of 1
799
\li Contrast of 4
800
\row
801
\li \image extendedsceneenvironment_brightness_contrast_saturation_at_1.jpg
802
{Stone hallway with default brightness level}
803
\li \image extendedsceneenvironment_contrast_at_4.jpg
804
{Stone hallway with contrast increased to 4}
805
\endtable
806
807
\default 1
808
*/
809
/*! \qmlproperty real ExtendedSceneEnvironment::adjustmentSaturation
810
Adjusts the saturation of the scene.
811
812
\table
813
\header
814
\li Saturation of 1
815
\li Saturation of 4
816
\row
817
\li \image extendedsceneenvironment_brightness_contrast_saturation_at_1.jpg
818
{Stone hallway with default brightness level}
819
\li \image extendedsceneenvironment_saturation_at_4.jpg
820
{Stone hallway with saturation increased to 4}
821
\endtable
822
823
\default 1
824
*/
825
// Color Grading Effect
826
/*! \qmlproperty bool ExtendedSceneEnvironment::lutEnabled
827
Enables color grading with look-up tables (LUTs).
828
The look-up table is given as a texture.
829
830
\default false
831
*/
832
/*! \qmlproperty real ExtendedSceneEnvironment::lutSize
833
Sets the size of the LUT texture. The texture should have the dimensions:
834
835
\c {width = lutSize * lutSize}
836
and
837
\c {height = lutSize}
838
839
\default 16
840
*/
841
/*! \qmlproperty real ExtendedSceneEnvironment::lutFilterAlpha
842
Sets the amount of color grading to mix with the scene.
843
The value is expected to be between \b 0 and \b 1.
844
845
\default 1
846
*/
847
/*! \qmlproperty Texture ExtendedSceneEnvironment::lutTexture
848
Source of look-up texture. If no texture is set a built-in identity
849
table is used.
850
851
Pictured below is an example texture with a size of 256x16, matching the
852
default \l lutSize of 16.
853
854
\image extendedsceneenvironment_lut_texture_used_for_invert.jpg
855
{Horizontal gradient strip showing LUT color mapping for inversion}
856
857
The result of this effect:
858
859
\image extendedsceneenvironment_lut_invert.jpg
860
{Stone hallway with inverted colors using LUT}
861
*/
862
// Glow Effect
863
/*! \qmlproperty bool ExtendedSceneEnvironment::glowEnabled
864
Enables the glow effect. It can also provide bloom, when the value of \l
865
glowBloom is larger than 0.
866
867
\default false
868
*/
869
/*! \qmlproperty bool ExtendedSceneEnvironment::glowQualityHigh
870
Increases the samples used for the glow when downsampling to improve the
871
quality of the glow effect.
872
873
\default false
874
875
\note Enabling this is a trade off between rendering quality and performance. Consider if
876
\l {ExtendedSceneEnvironment::ditheringEnabled}{dithering} can be used instead.
877
*/
878
/*! \qmlproperty bool ExtendedSceneEnvironment::glowUseBicubicUpscale
879
Reduces the aliasing artifacts and boxing in the glow effect.
880
881
\default false
882
883
\note Using bi-cubic up-scaling will come at the cost of performance. Consider if
884
\l {ExtendedSceneEnvironment::ditheringEnabled}{dithering} can be used instead.
885
*/
886
/*! \qmlproperty real ExtendedSceneEnvironment::glowStrength
887
Glow strength. Acceptable values are from \b 0 to \b 2.
888
889
The strength is effectively a scale factor (multiplier) that is applied
890
per-level. This means the the more levels are enabled in \l glowLevel, the
891
more pronounced effect a larger glowStrength has.
892
893
In practice the values for \l glowStrength, \l glowIntensity, and \l
894
glowBloom will often be tuned together to achieve the desired results.
895
896
\default 1
897
898
For example, with a glowIntensity of 1.0, glowBloom of 0.25, and the
899
first four levels enabled:
900
901
\table
902
\header
903
\li glowStrength of 0.5
904
\li glowStrength of 1.5
905
\row
906
\li \image extendedsceneenvironment_glow_strength_05.jpg
907
{Scene with glow strength 0.5}
908
\li \image extendedsceneenvironment_glow_strength_15.jpg
909
{Scene with glow strength 1.5}
910
\endtable
911
912
*/
913
/*! \qmlproperty real ExtendedSceneEnvironment::glowIntensity
914
Glow intensity. Expected values are in the range \b 0 to \b 8.
915
916
The intensity is effectively a scale factor (multiplier) for the
917
accumulated glow color (including all levels).
918
919
In practice the values for \l glowStrength, \l glowIntensity, and \l
920
glowBloom will often be tuned together to achieve the desired results.
921
922
\default 1
923
924
For example, with a glowStrength of 1.0 and glowBloom of 0.25:
925
926
\table
927
\header
928
\li glowIntensity of 0.25
929
\li glowIntensity of 1.25
930
\row
931
\li \image extendedsceneenvironment_glow_intensity_025.jpg
932
{Stone courtyard with glow intensity 0.25}
933
\li \image extendedsceneenvironment_glow_intensity_125.jpg
934
{Stone courtyard with glow intensity 1.25}
935
\endtable
936
*/
937
/*! \qmlproperty real ExtendedSceneEnvironment::glowBloom
938
Sets the amount of bloom applied to the glow effect.
939
Values from \b 0 to \b 1 are expected.
940
941
The \l glowHDRMinimumValue, \l glowHDRMaximumValue, \l glowHDRScale, and \l
942
glowBloom values together control the amount of \c{luminance feedback}
943
generated by the glow/bloom effect.
944
945
\default 0
946
947
In practice the values for \l glowStrength, \l glowIntensity, and \l
948
glowBloom will often be tuned together to achieve the desired results.
949
950
For example, with four glow levels enabled, a strength of 1.5, and an
951
intensity of 1:
952
953
\table
954
\header
955
\li glowBloom set to 0
956
\li glowBloom set to 0.5
957
\row
958
\li \image extendedsceneenvironment_glow_level4_strength15_intensity1_bloom0.jpg
959
{Stone hallway with glow bloom set to 0}
960
\li \image extendedsceneenvironment_glow_level4_strength15_intensity1_bloom05.jpg
961
{Stone hallway with glow bloom set to 0.5}
962
\endtable
963
*/
964
/*! \qmlproperty int ExtendedSceneEnvironment::glowBlendMode
965
Blending mode for the glow effect.
966
967
Available modes are:
968
\list
969
\li ExtendedSceneEnvironment.GlowBlendMode.Additive
970
\li ExtendedSceneEnvironment.GlowBlendMode.Screen
971
\li ExtendedSceneEnvironment.GlowBlendMode.SoftLight
972
\li ExtendedSceneEnvironment.GlowBlendMode.Replace
973
\endlist
974
975
\default ExtendedSceneEnvironment.GlowBlendMode.SoftLight
976
977
\c Additive is often recommendable for outdoor scenes, where a sky or sun
978
is visible, whereas the default \c SoftLight may work better for in-door
979
environments.
980
981
\c Replace does not perform any blending, but rather results in displaying
982
only the contribution the glow/bloom effect would blend with the actual
983
content. In practice this can be useful for experimenting and
984
troubleshooting when setting up the parameters of a glow/bloom effect.
985
986
\table
987
\header
988
\li Blend mode
989
\li Example
990
\row
991
\li Glow disabled
992
\li \image extendedsceneenvironment_glow_disabled.jpg
993
{Stone hallway without glow effect}
994
\row
995
\li Additive
996
\li \image extendedsceneenvironment_glow_additive.jpg
997
{Scene with glow additive blend mode}
998
\row
999
\li Screen
1000
\li \image extendedsceneenvironment_glow_screen.jpg
1001
{Scene with glow screen blend mode}
1002
\row
1003
\li SoftLight
1004
\li \image extendedsceneenvironment_glow_softlight.jpg
1005
{Stone hallway with glow using soft light blend mode}
1006
\row
1007
\li Replace
1008
\li \image extendedsceneenvironment_glow_replace.jpg
1009
{Scene with glow replace blend mode}
1010
\endtable
1011
*/
1012
/*! \qmlproperty real ExtendedSceneEnvironment::glowHDRMaximumValue
1013
Sets the maximum brightness of the glow, in high dynamic range.
1014
Value range is from \b 0 to \b 256.
1015
1016
The \l glowHDRMinimumValue, \l glowHDRMaximumValue, \l glowHDRScale, and \l
1017
glowBloom values together control the amount of \c{luminance feedback}
1018
generated by the glow/bloom effect.
1019
1020
\default 12.0
1021
*/
1022
/*! \qmlproperty real ExtendedSceneEnvironment::glowHDRMinimumValue
1023
Sets the minimum brightness of the glow, in high dynamic range.
1024
Expected values are in the range \b 0 to \b 4.
1025
1026
The \l glowHDRMinimumValue, \l glowHDRMaximumValue, \l glowHDRScale, and \l
1027
glowBloom values together control the amount of \c{luminance feedback}
1028
generated by the glow/bloom effect.
1029
1030
\default 1.0
1031
*/
1032
/*! \qmlproperty real ExtendedSceneEnvironment::glowHDRScale
1033
The bleed scale of the HDR glow.
1034
Expected values are in the range \b 0 to \b 8.
1035
1036
The \l glowHDRMinimumValue, \l glowHDRMaximumValue, \l glowHDRScale, and \l
1037
glowBloom values together control the amount of \c{luminance feedback}
1038
generated by the glow/bloom effect.
1039
1040
\default 2.0
1041
*/
1042
/*! \qmlproperty int ExtendedSceneEnvironment::glowLevel
1043
Sets which of the blur passes get applied to the glow effect. There are a
1044
total of 7 levels available.
1045
1046
Not having any levels set means that the glow will have no visual effect.
1047
1048
For example, to enable Glow Level \e One and \e Six we just OR the two enums together:
1049
\badcode
1050
glowLevel = (ExtendedSceneEnvironment.GlowLevel.One | ExtendedSceneEnvironment.GlowLevel.Six)
1051
\endcode
1052
1053
\default 1
1054
1055
\table
1056
\header
1057
\li glowLevel value
1058
\li Example
1059
\row
1060
\li One
1061
\li \image extendedsceneenvironment_glow_levels_1.jpg
1062
{Stone courtyard with glow at level 1}
1063
\row
1064
\li One | Two
1065
\li \image extendedsceneenvironment_glow_levels_1_2.jpg
1066
{Stone courtyard with glow at levels 1 and 2}
1067
\row
1068
\li One | Two | Three
1069
\li \image extendedsceneenvironment_glow_levels_1_2_3.jpg
1070
{Stone courtyard with glow at levels 1, 2, and 3}
1071
\row
1072
\li One | Two | Three | Four
1073
\li \image extendedsceneenvironment_glow_levels_1_2_3_4.jpg
1074
{Scene showing glow at 1, 2, 3, and 4 levels}
1075
\endtable
1076
*/
1077
1078
*/
1079
// Vignette
1080
/*! \qmlproperty bool ExtendedSceneEnvironment::vignetteEnabled
1081
Enables the vignette effect.
1082
1083
\default false
1084
*/
1085
/*! \qmlproperty real ExtendedSceneEnvironment::vignetteStrength
1086
Sets the strength of the vignette effect. Ranges from \b 0 to \b 15.
1087
1088
\default 15
1089
1090
\table
1091
\header
1092
\li Strength of 15
1093
\li Strength of 10
1094
\row
1095
\li \image extendedsceneenvironment_vignette_strength_15.jpg
1096
{Stone hallway with vignette strength set to 15}
1097
\li \image extendedsceneenvironment_vignette_strength_10.jpg
1098
{Stone hallway with vignette strength set to 10}
1099
\endtable
1100
*/
1101
/*! \qmlproperty color ExtendedSceneEnvironment::vignetteColor
1102
Sets the color of the vignette effect.
1103
1104
\default "gray"
1105
1106
For example, changing the color to red, pictured here with radius 4 and
1107
strength 15:
1108
1109
\image extendedsceneenvironment_vignette_red.jpg
1110
{Stone hallway with red vignette effect}
1111
*/
1112
/*! \qmlproperty real ExtendedSceneEnvironment::vignetteRadius
1113
Sets the radius of the vignette effect. Ranges from \b 0 to \b 5.
1114
1115
\default 0.35
1116
1117
\table
1118
\header
1119
\li Radius of 0.35
1120
\li Radius of 5.0
1121
\row
1122
\li \image extendedsceneenvironment_vignette_radius_default.jpg
1123
{Stone hallway with vignette radius set to 0.35}
1124
\li \image extendedsceneenvironment_vignette_radius_5.jpg
1125
{Stone hallway with vignette radius set to 5.0}
1126
\endtable
1127
*/
1128
// Lens Flare
1129
/*! \qmlproperty bool ExtendedSceneEnvironment::lensFlareEnabled
1130
Enables the lens flare effect.
1131
1132
Once enabled, the first property to tune is typically \l
1133
lensFlareBloomBias.
1134
1135
\default false
1136
*/
1137
/*! \qmlproperty real ExtendedSceneEnvironment::lensFlareBloomScale
1138
Sets the scale of the lens flare bloom effect. Expected scale value ranges
1139
from \b 0 to \b 20.
1140
1141
In practice this acts as a multiplier for the zero-clamped color value with
1142
the \l lensFlareBloomBias subtracted.
1143
1144
\default 10
1145
1146
\table
1147
\header
1148
\li Scale 2, bias 0.81
1149
\li Scale 20, bias 0.81
1150
\row
1151
\li \image extendedsceneenvironment_lensflare_scale_2_bias_081.jpg
1152
{Stone hallway with lens flare scale 2}
1153
\li \image extendedsceneenvironment_lensflare_scale_20_bias_081.jpg
1154
{Stone hallway with lens flare scale 20}
1155
\endtable
1156
*/
1157
/*! \qmlproperty real ExtendedSceneEnvironment::lensFlareBloomBias
1158
Sets the level at which the lens flare bloom starts.
1159
1160
The bias value is subtracted from the high dynamic range color value, with
1161
the result clamped to 0. This means that, depending on the scene, it may
1162
sometimes need be set to a quite low value, e.g. below 1, in order to make
1163
the lens flare obvious. Hence the default of 0.95. Whereas when having a
1164
higher range of colors, a bigger value may make more sense.
1165
1166
\default 0.95
1167
1168
\table
1169
\header
1170
\li Bias of 0.81
1171
\li Bias of 0.31
1172
\row
1173
\li \image extendedsceneenvironment_lensflare_bias_081.jpg
1174
{Stone courtyard with subtle lens flare, bias 0.81}
1175
\li \image extendedsceneenvironment_lensflare_bias_031.jpg
1176
{Stone courtyard with prominent lens flare, bias 0.31}
1177
\endtable
1178
*/
1179
/*! \qmlproperty real ExtendedSceneEnvironment::lensFlareGhostDispersal
1180
Sets the distance between the lens flare ghosts. Expected values are
1181
between \b 0 and \b 5. The value should be larger than 0.
1182
1183
\default 0.5
1184
1185
\table
1186
\header
1187
\li Ghost dispersal of 0.25
1188
\li Ghost dispersal of 0.90
1189
\row
1190
\li \image extendedsceneenvironment_lensflare_ghostdispersal_025.jpg
1191
{Stone courtyard with closely spaced lens flare ghosts}
1192
\li \image extendedsceneenvironment_lensflare_ghostdispersal_090.jpg
1193
{Stone courtyard with widely spaced lens flare ghosts}
1194
\endtable
1195
*/
1196
/*! \qmlproperty int ExtendedSceneEnvironment::lensFlareGhostCount
1197
Sets the amount of lens flare ghosts. Expected values are from \b 0 to \b 20.
1198
1199
\default 4
1200
1201
\table
1202
\header
1203
\li Ghost count of 2
1204
\li Ghost count of 16
1205
\row
1206
\li \image extendedsceneenvironment_lensflare_ghostcount_2.jpg
1207
{Stone courtyard with 2 lens flare ghosts}
1208
\li \image extendedsceneenvironment_lensflare_ghostcount_16.jpg
1209
{Stone courtyard with 16 lens flare ghosts}
1210
\endtable
1211
*/
1212
/*! \qmlproperty real ExtendedSceneEnvironment::lensFlareHaloWidth
1213
Sets the size of the lens flare halo. Ranges from \b 0 to \b 1.
1214
1215
\default 0.25
1216
*/
1217
/*! \qmlproperty real ExtendedSceneEnvironment::lensFlareStretchToAspect
1218
Set correction factor for roundness of the lens flare halo.
1219
1220
\default 0.5 [0, 1]
1221
*/
1222
/*! \qmlproperty real ExtendedSceneEnvironment::lensFlareDistortion
1223
Set amount of chromatic aberration in the lens flare. Expected values
1224
ranges from \b 0 to \b 20.
1225
1226
\default 5
1227
1228
\table
1229
\header
1230
\li Distortion set to 0
1231
\li Distortion set to 15
1232
\row
1233
\li \image extendedsceneenvironment_lensflare_distortion_0.jpg
1234
{Stone courtyard with lens flare, no chromatic aberration}
1235
\li \image extendedsceneenvironment_lensflare_distortion_15.jpg
1236
{Stone courtyard with lens flare showing chromatic aberration}
1237
\endtable
1238
*/
1239
/*! \qmlproperty real ExtendedSceneEnvironment::lensFlareBlurAmount
1240
Set amount of blur to apply to the lens flare. Ranges from \b 0 to \b 50.
1241
1242
\default 3
1243
1244
\table
1245
\header
1246
\li Blur amount set to 0
1247
\li Blur amount set to 30
1248
\row
1249
\li \image extendedsceneenvironment_lensflare_0_blur.jpg
1250
{Stone courtyard with sharp lens flare}
1251
\li \image extendedsceneenvironment_lensflare_30_blur.jpg
1252
{Stone courtyard with blurred lens flare}
1253
\endtable
1254
1255
*/
1256
/*! \qmlproperty bool ExtendedSceneEnvironment::lensFlareApplyDirtTexture
1257
Set whether to apply a dirt texture to the lens flare.
1258
1259
\default false
1260
1261
\table
1262
\header
1263
\li Dirt texture disabled
1264
\li Default dirty texture enabled
1265
\row
1266
\li \image extendedsceneenvironment_lensflare_dirt_off.jpg
1267
{Stone courtyard with clean lens flare}
1268
\li \image extendedsceneenvironment_lensflare_dirt_on.jpg
1269
{Stone courtyard with lens flare showing dirt texture}
1270
\endtable
1271
1272
\sa {ExtendedSceneEnvironment::lensFlareLensDirtTexture}{lensFlareLensDirtTexture}
1273
*/
1274
/*! \qmlproperty bool ExtendedSceneEnvironment::lensFlareApplyStarburstTexture
1275
Set whether to apply a starburst texture to the lens flare.
1276
1277
\default false
1278
1279
\table
1280
\header
1281
\li Starburst texture disabled
1282
\li Default starburst texture enabled
1283
\row
1284
\li \image extendedsceneenvironment_lensflare_starburst_off.jpg
1285
{Stone courtyard with lens flare, no starburst}
1286
\li \image extendedsceneenvironment_lensflare_starburst_on.jpg
1287
{Stone courtyard with lens flare showing starburst pattern}
1288
\endtable
1289
1290
\sa {ExtendedSceneEnvironment::lensFlareLensStarburstTexture}{lensFlareLensStarburstTexture}
1291
*/
1292
/*! \qmlproperty vector3d ExtendedSceneEnvironment::lensFlareCameraDirection
1293
Sets the direction of the camera in the scene.
1294
1295
\default Qt.vector3d(0, 0, -1)
1296
*/
1297
/*! \qmlproperty Texture ExtendedSceneEnvironment::lensFlareLensColorTexture
1298
A gradient image used for the lens flare lens color.
1299
1300
By default a built-in 256x256 texture is used:
1301
1302
\image extendedsceneenvironment_lensflare_default_texture.jpg
1303
{Horizontal gradient from yellow through pink to magenta}
1304
*/
1305
/*! \qmlproperty Texture ExtendedSceneEnvironment::lensFlareLensDirtTexture
1306
An image that is used to simulate inperfections on the lens.
1307
1308
Has an effect only when \l lensFlareApplyDirtTexture is enabled.
1309
1310
By default a built-in dirty texture is used:
1311
1312
\image extendedsceneenvironment_lensflare_default_dirt.jpg
1313
{Grayscale texture with scattered bright spots on dark background}
1314
*/
1315
/*! \qmlproperty Texture ExtendedSceneEnvironment::lensFlareLensStarburstTexture
1316
A noise image to augment the starburst effect of the lens flare.
1317
Has an effect only when \l lensFlareApplyStarburstTexture is enabled.
1318
1319
By default a built-in noise texture is used:
1320
1321
\image extendedsceneenvironment_lensflare_default_noise.jpg
1322
{Grayscale noise texture with irregular light and dark patterns}
1323
*/
1324
1325
// SSGI
1326
/*! \qmlproperty bool ExtendedSceneEnvironment::ssgiEnabled
1327
Enables screen-space global illumination. This effect increases realism
1328
by adding ambient occlusion and indirect light to the scene.
1329
1330
\default false
1331
\since 6.11
1332
1333
\table
1334
\header
1335
\li SSGI disabled
1336
\li SSGI enabled
1337
\row
1338
\li \image extendedsceneenvironment_ssgi_without.jpg
1339
{Medieval hall without screen-space global illumination}
1340
\li \image extendedsceneenvironment_ssgi_with.jpg
1341
{Medieval hall with screen-space global illumination enabled}
1342
\endtable
1343
1344
\sa {Qt Quick 3D - SSGI Lightmap Example}
1345
*/
1346
/*! \qmlproperty bool ExtendedSceneEnvironment::ssgiIndirectLightEnabled
1347
1348
Controls whether indirect light is included in the result, or only ambient
1349
occlusion. By default both are enabled.
1350
1351
\default true
1352
\since 6.11
1353
1354
Setting the value to false provides a direct alternative to
1355
SceneEnvironment's \l{SceneEnvironment::aoEnabled}{ambient occlusion}. The
1356
AO results provided by SSGI are expected to be higher quality and require
1357
little or no tuning. This comes at the expense of potentially higher GPU
1358
load.
1359
1360
\table
1361
\header
1362
\li SSGI disabled
1363
\li AO-only SSGI
1364
\row
1365
\li \image extendedsceneenvironment_ssgi_ao_without.jpg
1366
{Lion sculpture without ambient occlusion}
1367
\li \image extendedsceneenvironment_ssgi_ao_with.jpg
1368
{Lion sculpture with ambient occlusion from SSGI}
1369
\endtable
1370
*/
1371
/*! \qmlproperty real ExtendedSceneEnvironment::ssgiIndirectLightBoost
1372
1373
\default 4.0
1374
\since 6.11
1375
1376
Multiplier for the indirect light results. Increasing the value makes the
1377
indirect light contribution more prominent. The suggested range is 1 to
1378
100. The appropriate value always depends on the scene and how it is lit.
1379
*/
1380
/*! \qmlproperty real ExtendedSceneEnvironment::ssgiBufferSizeFactor
1381
1382
Controls the size of the color buffers the SSGI effect works on. Performing
1383
everything with render targets matching the input and output dimensions
1384
(i.e., the View3D's pixel size) can be too costly which many GPUs and
1385
devices cannot afford in practice. Therefore, the SSGI effect operates on a
1386
reduced size for intermediate textures. By default this is 0.5, meaning half
1387
the size of the input and output textures. Increasing the value towards 1
1388
increases the quality of the results, at the expense of a heavily growing
1389
GPU load.
1390
1391
\default 0.5
1392
\since 6.11
1393
*/
1394
/*! \qmlproperty bool ExtendedSceneEnvironment::ssgiSimulatedBounceEnabled
1395
1396
Controls whether additional light bouncing is simulated by sampling the
1397
previous frame's texture.
1398
1399
\default false
1400
\since 6.11
1401
*/
1402
/*! \qmlproperty real ExtendedSceneEnvironment::ssgiSimulatedBounceFactor
1403
1404
Multiplier for the result from the simulated bounce calculation. Only has an
1405
effect when \l ssgiSimulatedBounceEnabled is \c true. This value may need to
1406
be tuned together with \l ssgiIndirectLightBoost. Depending on the scene and
1407
how it is lit, higher values for these properties can lead to overly
1408
exaggerated indirect light contribution, and even a feedback loop where the
1409
indirect light grows excessively between frames.
1410
1411
\default 0.5
1412
\since 6.11
1413
*/
1414
/*! \qmlproperty int ExtendedSceneEnvironment::ssgiSampleCount
1415
1416
Configures the global illumination algorithm. A higher sample count will give
1417
better results at the expense of increased GPU load.
1418
1419
The suggested range is 1 to 16.
1420
1421
\default 4
1422
\since 6.11
1423
*/
1424
/*! \qmlproperty real ExtendedSceneEnvironment::ssgiSampleRadius
1425
1426
Configures the global illumination algorithm.
1427
1428
The suggested range is 0.001 to 4.0.
1429
1430
\default 0.1
1431
\since 6.11
1432
*/
1433
/*! \qmlproperty int ExtendedSceneEnvironment::ssgiSliceCount
1434
1435
Configures the global illumination algorithm.
1436
1437
The suggested range is 1 to 8.
1438
1439
\default 4
1440
\since 6.11
1441
*/
1442
/*! \qmlproperty real ExtendedSceneEnvironment::ssgiHitThickness
1443
1444
Configures the global illumination algorithm.
1445
1446
The suggested range is 0.001 to 4.0.
1447
1448
\default 0.5
1449
\since 6.11
1450
*/
1451
1452
// SSR
1453
/*! \qmlproperty bool ExtendedSceneEnvironment::ssrEnabled
1454
Enables screen-space reflections, a post-processing technique that creates
1455
reflections by using data rendered on the screen.
1456
1457
\default false
1458
\since 6.11
1459
\table
1460
\header
1461
\li SSR disabled
1462
\li SSR enabled
1463
\row
1464
\li \image extendedsceneenvironment_ssr_without.webp
1465
\li \image extendedsceneenvironment_ssr_with.webp
1466
\endtable
1467
*/
1468
1469
/*! \qmlproperty real ExtendedSceneEnvironment::ssrThickness
1470
1471
Assumed thickness of scene geometry used by screen-space reflections.
1472
Larger values reduce reflection breakups (similar to shadow acne)
1473
but may cause reflections to look physically incorrect.
1474
1475
\default 20
1476
\since 6.12
1477
*/
1478
1479
/*! \qmlproperty int ExtendedSceneEnvironment::ssrMaxSteps
1480
1481
Limits how many steps the reflection ray can take across the screen.
1482
Larger values improve reflection reach and quality, but reduces
1483
performance.
1484
1485
\default 256
1486
\since 6.12
1487
*/
qtquick3d
src
quick3d
doc
src
qtquick3d-helpers.qdoc
Generated on
for Qt by
1.16.1