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 When a child is a Model that uses \l {Model::instancing}{instancing}, the manager sets
358 its \l {Model::instancingLodMin}{instancingLodMin} and
359 \l {Model::instancingLodMax}{instancingLodMax} instead of its visibility, so each
360 instance is drawn by the child that matches its own distance, and such children are not
361 faded. When the geometry of such a child has levels of detail, the level of each
362 instance in its range is also selected automatically, unless the child sets
363 \l {Model::instancingLodFactor}{instancingLodFactor}, for example to \c 0.0 for the
364 original geometry. See \l {instanced-lod}{Instanced models}.
365
366 \badcode
367 View3D {
368 LodManager {
369 camera: camera
370 distances: [50, 100]
371 fadeDistance: 10
372
373 Model { ... }
374 Model { ... }
375 Model { ... }
376 }
377 }
378 \endcode
379*/
380
381/*! \qmlproperty QtQuick3D::Camera LodManager::camera
382 Specifies the camera from which the distance to the child nodes is calculated.
383*/
384
385/*! \qmlproperty list LodManager::distances
386 Specifies the thresholds when the detail level changes. The first number
387 is the distance when the first node changes to the second one, etc.
388*/
389
390/*! \qmlproperty real LodManager::fadeDistance
391 Specifies the distance at which the cross-fade between the detail levels
392 starts.
393*/
394
395/*!
396 \qmltype ExtendedSceneEnvironment
397 \inqmlmodule QtQuick3D.Helpers
398 \inherits SceneEnvironment
399 \brief A SceneEnvironment providing commonly used rendering effects.
400 \since 6.5
401
402 The \c ExtendedSceneEnvironment is an extension of QtQuick3D's \l
403 SceneEnvironment type that comes with a collection of commonly used effects
404 built-in. The effects are exposed through a set of properties that are
405 prefixed with the name of the effect they control.
406
407 When enabling one or more of these effects, the result is similar to
408 manually adding post-processing effects to the SceneEnvironment's
409 \l{SceneEnvironment::effects}{effects} list. ExtendedSceneEnvironment
410 provides however effects that are not available in standalone form, and
411 more importantly, \b{it efficiently combines the effects that are enabled,
412 reducing the number of additional render passes needed, which can lead to
413 significantly better performance than applying individual post-processing
414 effects} to the scene. ExtendedSceneEnvironment also plays well with
415 tonemapping, even for the more complicated multiple pass effects, and also
416 when multiple effects are enabled and combined together. This was not
417 always the case with standalone effects.
418
419 \note If additional post-processing effects are added to the
420 \l{SceneEnvironment::effects}{effects} list of \l SceneEnvironment, then
421 those effects will be applied \e before the effects provided by the \l
422 ExtendedSceneEnvironment type.
423
424 Certain features of SceneEnvironment, such as the tonemapping, are
425 inherited and extended with additional properties in
426 ExtendedSceneEnvironment. For example, SceneEnvironment offers the
427 \l{SceneEnvironment::tonemapMode}{tonemapMode} property, whereas
428 ExtendedSceneEnvironment adds control over the exposure, white point,
429 sharpening, and dithering settings of the tonemapper as well. The
430 \l{SceneEnvironment::tonemapMode}{tonemapMode} property is not duplicated
431 however since ExtendedSceneEnvironment inherits everything from
432 SceneEnvironment, so the base setting of the tonemapping mode is usable
433 regardless of which type of environment is associated with a View3D, but
434 the additional properties are available only when using
435 ExtendedSceneEnvironment. Other effects, such as screen space ambient
436 occlusion (SSAO) or fog are fully part of SceneEnvironment and are usable
437 with both types of environments.
438
439 \section1 Getting Started with ExtendedSceneEnvironment
440
441 To use the additional features offered by ExtendedSceneEnvironment,
442 associate the View3D with an instance of it. Do not forget to import the
443 \c{QtQuick3D.Helpers} module.
444
445 \qml
446 import QtQuick3D
447 import QtQuick3D.Helpers
448
449 View3D {
450 environment: ExtendedSceneEnvironment {
451 tonemapMode: SceneEnvironment.Filmic
452 vignetteEnabled: true
453 // ...
454 }
455 }
456 \endqml
457
458 \note Experimenting with the effect parameters and tuning the values to
459 achieve the desired visual results can often be more productive when done
460 visually, with controls such as sliders that give instant feedback in the
461 rendered scene when a value is changed. Using a designer tool such as Qt
462 Design Studio, or a test bed similar to the \l{Qt Quick 3D - Scene Effects
463 Example} is therefore often recommendable when aiming to set up a high
464 quality scene that looks visually appealing.
465
466 \note Switching SceneEnvironment to ExtendedSceneEnvironment automatically
467 implies at least one additional render pass, just as if an Effect with a
468 single pass was added to the
469 \l{SceneEnvironment::effects}{SceneEnvironment's effect list}.
470 This is true regardless of how many of the individual post-processing steps
471 are enabled. (the more complex effects may involve more than one additional
472 render pass)
473
474 \section1 Available Effects
475
476 Below is an overview of the effects and related features provided by
477 ExtendedSceneEnvironment, including features inherited from
478 SceneEnvironment.
479
480 \list
481
482 \li \l{SceneEnvironment::tonemapMode}{Tonemapping} - Controls how colors
483 are tonemapped from high definition range to the 0-1 range before being
484 displayed. ExtendedSceneEnvironment adds additional controls over the
485 exposure, white point, sharpening, and dithering.
486
487 Controlled by the properties \l tonemapMode, \l exposure, \l whitePoint, \l
488 ditheringEnabled.
489
490 \image extendedsceneenvironment_tonemap.jpg
491 {Scene demonstrating tonemapping}
492
493 \li \l{colorAdjustmentsEnabled}{Color adjustments} - Brightness, contrast,
494 saturation adjustment.
495
496 Controlled by the properties \l colorAdjustmentsEnabled, \l
497 adjustmentBrightness, \l adjustmentContrast, \l adjustmentSaturation.
498
499 \image extendedsceneenvironment_coloradj.jpg
500 {Scene demonstrating color adjustments}
501
502 \li \l{lutEnabled}{Color grading} via lookup table (LUT) textures.
503
504 Controlled by the properties \l lutEnabled, \l lutSize, \l lutFilterAlpha.
505
506 \image extendedsceneenvironment_colorgrade.jpg
507 {Scene demonstrating color grading with lookup table}
508
509 \li \l{depthOfFieldEnabled}{Depth of field}
510
511 Controlled by the properties \l depthOfFieldEnabled, \l
512 depthOfFieldFocusDistance, \l depthOfFieldFocusRange, \l
513 depthOfFieldBlurAmount.
514
515 \image extendedsceneenvironment_dof.jpg
516 {Scene demonstrating depth of field effect}
517
518 \li \l{glowEnabled}{Glow and bloom}
519
520 Controlled by the properties \l glowEnabled, \l glowQualityHigh, \l
521 glowUseBicubicUpscale, \l glowSuppressFireflies, \l glowBlurMode, \l
522 glowStrength, \l glowIntensity, \l glowBloom, \l glowBlendMode, \l
523 glowHDRMaximumValue, \l glowHDRMinimumValue, \l glowHDRScale.
524
525 \image extendedsceneenvironment_glow.jpg {Scene demonstrating glow effect}
526
527 \li \l{vignetteEnabled}{Vignette}
528
529 Controlled by the properties \l vignetteEnabled, \l vignetteStrength, \l
530 vignetteColor, \l vignetteRadius.
531
532 \image extendedsceneenvironment_vignette.jpg
533 {Scene demonstrating vignette effect}
534
535 \li \l{lensFlareEnabled}{Lens flare}
536
537 Controlled by the properties \l lensFlareEnabled, \l lensFlareBloomBias, \l
538 lensFlareGhostDispersal, \l lensFlareGhostCount, \l lensFlareHaloWidth, \l
539 lensFlareStretchToAspect, \l lensFlareDistortion, \l lensFlareBlurAmount,
540 \l lensFlareApplyDirtTexture, \l lensFlareApplyStarburstTexture, \l
541 lensFlareCameraDirection, \l lensFlareLensColorTexture, \l
542 lensFlareLensDirtTexture, \l lensFlareLensStarburstTexture.
543
544 \image extendedsceneenvironment_lensflare.jpg
545 {Scene demonstrating lens flare effect}
546
547 \li \l{SceneEnvironment::aoStrength}{Screen space ambient occlusion} -
548 Provided by \l SceneEnvironment. Note that \l{ssgiEnabled}{SSGI} also
549 provides ambient occlusion, and it will often give better quality results in
550 practice. Avoid enabling both SceneEnvironment's ambient occlusion and
551 ExtendedSceneEnvironment's screen-space global illumination, since it is
552 unnecessary and wasteful to perform both. Controlled by
553 \l{SceneEnvironment::aoEnabled}, \l{SceneEnvironment::aoStrength},
554 \l{SceneEnvironment::aoDistance}, \l{SceneEnvironment::aoSoftness},
555 \l{SceneEnvironment::aoDither}, \l{SceneEnvironment::aoSampleRate},
556 \l{SceneEnvironment::aoBias}.
557
558 \image extendedsceneenvironment_ssao.jpg
559 {Scene demonstrating screen space ambient occlusion}
560
561 \li \l{SceneEnvironment::fog}{Fog} - Provided by \l SceneEnvironment. This
562 is not a post-processing type of effect, but is rather applied to the
563 materials of the renderable objects in the scene.
564
565 Controlled by the \l{QtQuick3D::Fog}{Fog} object associated with the
566 \l{SceneEnvironment::fog} property.
567
568 \image extendedsceneenvironment_fog.jpg {Scene demonstrating fog effect}
569
570 \li \l{SceneEnvironment::antialiasingMode}{Antialiasing} - Multisampling,
571 supersampling, progressive antialiasing, specular antialiasing, temporal
572 antialiasing are provided by \l SceneEnvironment. \l
573 ExtendedSceneEnvironment adds the option for using \l{fxaaEnabled}{a form
574 of FXAA}.
575
576 FXAA is controlled by \l fxaaEnabled. Other antialiasing modes are
577 controlled by \l{SceneEnvironment::antialiasingMode},
578 \l{SceneEnvironment::temporalAAEnabled},
579 \l{SceneEnvironment::temporalAAStrength}, and
580 \l{SceneEnvironment::specularAAEnabled}.
581
582 \image extendedsceneenvironment_aa.jpg {Scene demonstrating antialiasing}
583
584 \li \l{ssgiEnabled}{Screen-space global illumination} Provides ambient
585 occlusion and indirect lighting. Note that enabling this effect may have a
586 big impact on GPU load and performance. Controlled by the properties \l
587 ssgiEnabled, \l ssgiIndirectLightEnabled, \l ssgiIndirectLightBoost, \l
588 ssgiBufferSizeFactor, \l ssgiSimulatedBounceEnabled, \l
589 ssgiSimulatedBounceFactor, \l ssgiSampleCount, \l ssgiSampleRadius, \l
590 ssgiSliceCount, \l ssgiHitThickness
591
592 \image extendedsceneenvironment_ssgi.jpg
593 {City with buildings, red awnings, and outdoor cafe seating}
594
595 \endlist
596
597 \sa SceneEnvironment, {Qt Quick 3D - Scene Effects Example}
598*/
599
600// Depth of Field Effect
601/*! \qmlproperty bool ExtendedSceneEnvironment::depthOfFieldEnabled
602 Enables the depth of field blur effect.
603
604 \default false
605*/
606/*! \qmlproperty real ExtendedSceneEnvironment::depthOfFieldFocusDistance
607 Sets the distance from the camera at which objects are in focus.
608
609 \default 600
610
611 Here the
612 \l{https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/Sponza}{Sponza}
613 scene has a scale of \c 100 applied in order to have a suitably big range
614 to get blur applied to the back and the front of the view. The picture
615 below is taken with a focus distance of 753 and a focus range of 482.
616
617 \image extendedsceneenvironment_dof.jpg
618 {Scene demonstrating depth of field effect}
619*/
620/*! \qmlproperty real ExtendedSceneEnvironment::depthOfFieldFocusRange
621 The distance around the \l
622 {ExtendedSceneEnvironment::depthOfFieldFocusDistance}{depthOfFieldFocusDistance}
623 where items are fully in focus. The focus then fades away to fully blurred
624 by the same distance on both the near and far sides.
625
626 \default 100
627*/
628/*! \qmlproperty real ExtendedSceneEnvironment::depthOfFieldBlurAmount
629 Sets the amount of blur applied to objects outside the focus range.
630 Sensible values are in the range \b 0 to \b 10. A value of 0 applies
631 no additional blur.
632
633 \default 4.0
634
635 \table
636 \header
637 \li Blur amount of 0
638 \li Blur amount of 15
639 \row
640 \li \image extendedsceneenvironment_dof_no_blur.jpg
641 {Scene without depth of field blur}
642 \li \image extendedsceneenvironment_dof_15_blur.jpg
643 {Scene with depth of field blur at 15}
644 \endtable
645*/
646// Tonemapper
647/*!
648 \qmlproperty enumeration ExtendedSceneEnvironment::tonemapMode
649 \default SceneEnvironment.TonemapModeLinear
650
651 This property defines how colors are tonemapped before rendering. All
652 rendering in Qt Quick 3D is performed in linear color space and can in
653 many cases lead to generating color values that are not displayable. The
654 tonemapMode determines the technique that is used to remap colors into a
655 displayable range.
656
657 The default value is \c SceneEnvironment.TonemapModeLinear
658
659 \value SceneEnvironment.TonemapModeNone
660 All Tonemapping is bypassed. This mode is useful when performing post
661 processing effects.
662 \value SceneEnvironment.TonemapModeLinear
663 Linear tonemapping is applied. Colors are gamma corrected and returned
664 in sRGB color space.
665 \value SceneEnvironment.TonemapModeAces
666 Academy Color Encoding System tonemapping is applied.
667 \value SceneEnvironment.TonemapModeHejlDawson
668 Hejl-Dawson tonemapping is applied.
669 \value SceneEnvironment.TonemapModeFilmic
670 Filmic tonemapping is applied.
671
672 \note When using post-processing effects, many effects expect untonemapped
673 linear color data. It is important to bypass the built-in tonemapping in
674 this case by using the \c SceneEnvironment.TonemapModeNone value. This does
675 not apply to the built-in effects of ExtendedSceneEnvironment because those
676 automatically take care of proper tonemapping.
677
678 \table
679 \header
680 \li Tonemap mode
681 \li Example
682 \row
683 \li None
684 \li \image extendedsceneenvironment_tonemap_none.jpg
685 {Scene with no tonemapping}
686 \row
687 \li Linear
688 \li \image extendedsceneenvironment_tonemap_linear.jpg
689 {Scene with linear tonemapping}
690 \row
691 \li Aces
692 \li \image extendedsceneenvironment_tonemap_aces.jpg
693 {Scene with ACES tonemapping}
694 \row
695 \li HejlDawson
696 \li \image extendedsceneenvironment_tonemap_hejldawson.jpg
697 {Scene with Hejl-Dawson tonemapping}
698 \row
699 \li Filmic
700 \li \image extendedsceneenvironment_tonemap_filmic.jpg
701 {Scene with filmic tonemapping}
702 \endtable
703*/
704/*! \qmlproperty real ExtendedSceneEnvironment::exposure
705 Exposure level used by the tonemapper.
706
707 \default 1.0
708
709 \table
710 \header
711 \li Filmic tonmapping with exposure 8
712 \li Filmic tonmapping with exposure set to 0.5
713 \row
714 \li \image extendedsceneenvironment_tonemap_exposure_8.jpg
715 {Scene with exposure value 8}
716 \li \image extendedsceneenvironment_tonemap_exposure_05.jpg
717 {Scene with exposure value 0.5}
718 \endtable
719*/
720/*! \qmlproperty real ExtendedSceneEnvironment::whitePoint
721
722 Reference value for \e white when tonemapping is enabled. The value must be
723 larger than 0.
724
725 \note This value is ignored when using \l{SceneEnvironment::tonemapMode}{SceneEnvironment.TonemapModeLinear}.
726
727 \default 1
728
729 \table
730 \header
731 \li Filmic tonmapping with white point set to 0.1
732 \li Filmic tonmapping with white point set to 1
733 \row
734 \li \image extendedsceneenvironment_tonemap_whitepoint_01.jpg
735 {Stone hallway with brighter film tonemapping, white point 0.1}
736 \li \image extendedsceneenvironment_tonemap_whitepoint_1.jpg
737 {Stone hallway with darker film tonemapping, white point 1}
738 \endtable
739*/
740/*! \qmlproperty bool ExtendedSceneEnvironment::ditheringEnabled
741 Enables dithering to reduce banding artifacts.
742
743 \default false
744*/
745/*! \qmlproperty real ExtendedSceneEnvironment::sharpnessAmount
746 Set the sharpening amount. Valid values are from \c 0.0 (off) to \c 1.0 (full).
747
748 \default 0.0
749
750 \table
751 \header
752 \li Filmic tonmapping with sharpness set to 0
753 \li Filmic tonmapping with sharpness set to 1
754 \row
755 \li \image extendedsceneenvironment_tonemap_sharpness_0.jpg
756 {Stone hallway with sharpness set to 0}
757 \li \image extendedsceneenvironment_tonemap_sharpness_1.jpg
758 {Stone hallway with sharpness set to 1}
759 \endtable
760*/
761// FXAA
762/*! \qmlproperty bool ExtendedSceneEnvironment::fxaaEnabled
763 Enables fast approximate antialiasing (FXAA).
764
765 \table
766 \header
767 \li FXAA disabled
768 \li FXAA enabled
769 \row
770 \li \image extendedsceneenvironment_without_fxaa.jpg {Stone hallway
771 without antialiasing}
772 \li \image extendedsceneenvironment_with_fxaa.jpg {Stone hallway with
773 fast approximate antialiasing}
774 \endtable
775
776 \default false
777*/
778// Adjustments
779/*! \qmlproperty bool ExtendedSceneEnvironment::colorAdjustmentsEnabled
780
781 Enables color adjustments.
782
783 \default false
784 \sa {ExtendedSceneEnvironment::colorAdjustmentsEnabled}{colorAdjustmentsEnabled}
785*/
786/*! \qmlproperty real ExtendedSceneEnvironment::adjustmentBrightness
787 Adjusts the brightness of the scene.
788
789 \table
790 \header
791 \li Brightness of 1
792 \li Brightness of 4
793 \row
794 \li \image extendedsceneenvironment_brightness_contrast_saturation_at_1.jpg
795 {Stone hallway with default brightness level}
796 \li \image extendedsceneenvironment_brightness_at_4.jpg
797 {Stone hallway with brightness increased to 4}
798 \endtable
799
800 \default 1
801*/
802/*! \qmlproperty real ExtendedSceneEnvironment::adjustmentContrast
803 Adjusts the contrast of the scene.
804
805 \table
806 \header
807 \li Contrast of 1
808 \li Contrast of 4
809 \row
810 \li \image extendedsceneenvironment_brightness_contrast_saturation_at_1.jpg
811 {Stone hallway with default brightness level}
812 \li \image extendedsceneenvironment_contrast_at_4.jpg
813 {Stone hallway with contrast increased to 4}
814 \endtable
815
816 \default 1
817*/
818/*! \qmlproperty real ExtendedSceneEnvironment::adjustmentSaturation
819 Adjusts the saturation of the scene.
820
821 \table
822 \header
823 \li Saturation of 1
824 \li Saturation of 4
825 \row
826 \li \image extendedsceneenvironment_brightness_contrast_saturation_at_1.jpg
827 {Stone hallway with default brightness level}
828 \li \image extendedsceneenvironment_saturation_at_4.jpg
829 {Stone hallway with saturation increased to 4}
830 \endtable
831
832 \default 1
833*/
834// Color Grading Effect
835/*! \qmlproperty bool ExtendedSceneEnvironment::lutEnabled
836 Enables color grading with look-up tables (LUTs).
837 The look-up table is given as a texture.
838
839 \default false
840*/
841/*! \qmlproperty real ExtendedSceneEnvironment::lutSize
842 Sets the size of the LUT texture. The texture should have the dimensions:
843
844 \c {width = lutSize * lutSize}
845 and
846 \c {height = lutSize}
847
848 \default 16
849*/
850/*! \qmlproperty real ExtendedSceneEnvironment::lutFilterAlpha
851 Sets the amount of color grading to mix with the scene.
852 The value is expected to be between \b 0 and \b 1.
853
854 \default 1
855*/
856/*! \qmlproperty Texture ExtendedSceneEnvironment::lutTexture
857 Source of look-up texture. If no texture is set a built-in identity
858 table is used.
859
860 Pictured below is an example texture with a size of 256x16, matching the
861 default \l lutSize of 16.
862
863 \image extendedsceneenvironment_lut_texture_used_for_invert.jpg
864 {Horizontal gradient strip showing LUT color mapping for inversion}
865
866 The result of this effect:
867
868 \image extendedsceneenvironment_lut_invert.jpg
869 {Stone hallway with inverted colors using LUT}
870*/
871// Glow Effect
872/*! \qmlproperty bool ExtendedSceneEnvironment::glowEnabled
873 Enables the glow effect. It can also provide bloom, when the value of \l
874 glowBloom is larger than 0.
875
876 \default false
877*/
878/*! \qmlproperty bool ExtendedSceneEnvironment::glowQualityHigh
879 Increases the samples used for the glow when downsampling to improve the
880 quality of the glow effect.
881
882 \default false
883
884 \note Enabling this is a trade off between rendering quality and performance. Consider if
885 \l {ExtendedSceneEnvironment::ditheringEnabled}{dithering} can be used instead.
886*/
887/*! \qmlproperty bool ExtendedSceneEnvironment::glowUseBicubicUpscale
888 Reduces the aliasing artifacts and boxing in the glow effect.
889
890 \default false
891
892 \note Using bi-cubic up-scaling will come at the cost of performance. Consider if
893 \l {ExtendedSceneEnvironment::ditheringEnabled}{dithering} can be used instead.
894*/
895/*! \qmlproperty bool ExtendedSceneEnvironment::glowSuppressFireflies
896 Reduces flickering of the glow around very small bright sources by
897 weighting the first downsampling pass by inverse brightness.
898
899 \default false
900
901 \note Only has an effect when \l glowBlurMode is \c DualFilter.
902
903 \since 6.13
904*/
905/*! \qmlproperty int ExtendedSceneEnvironment::glowBlurMode
906 Blur algorithm used for the glow effect.
907
908 \list
909 \li ExtendedSceneEnvironment.GlowBlurMode.Gaussian: separable gaussian
910 blur of each enabled level.
911 \li ExtendedSceneEnvironment.GlowBlurMode.DualFilter: dual-filter blur
912 chain. Round halos, lower GPU cost, no cost for levels above the
913 highest enabled \l glowLevel, slightly wider falloff.
914 \endlist
915
916 \default ExtendedSceneEnvironment.GlowBlurMode.Gaussian
917
918 \since 6.13
919*/
920/*! \qmlproperty real ExtendedSceneEnvironment::glowStrength
921 Glow strength. Acceptable values are from \b 0 to \b 2.
922
923 The strength is effectively a scale factor (multiplier) that is applied
924 per-level. This means the more levels are enabled in \l glowLevel, the
925 more pronounced effect a larger glowStrength has.
926
927 \note In \c DualFilter mode the strength is applied once per
928 downsampling pass, so it also compounds with each level, but more slowly
929 than in \c Gaussian mode, which applies it in both the horizontal and
930 the vertical blur pass of each level.
931
932 In practice the values for \l glowStrength, \l glowIntensity, and \l
933 glowBloom will often be tuned together to achieve the desired results.
934
935 \default 1
936
937 For example, with a glowIntensity of 1.0, glowBloom of 0.25, and the
938 first four levels enabled:
939
940 \table
941 \header
942 \li glowStrength of 0.5
943 \li glowStrength of 1.5
944 \row
945 \li \image extendedsceneenvironment_glow_strength_05.jpg
946 {Scene with glow strength 0.5}
947 \li \image extendedsceneenvironment_glow_strength_15.jpg
948 {Scene with glow strength 1.5}
949 \endtable
950
951*/
952/*! \qmlproperty real ExtendedSceneEnvironment::glowIntensity
953 Glow intensity. Expected values are in the range \b 0 to \b 8.
954
955 The intensity is effectively a scale factor (multiplier) for the
956 accumulated glow color (including all levels).
957
958 In practice the values for \l glowStrength, \l glowIntensity, and \l
959 glowBloom will often be tuned together to achieve the desired results.
960
961 \default 1
962
963 For example, with a glowStrength of 1.0 and glowBloom of 0.25:
964
965 \table
966 \header
967 \li glowIntensity of 0.25
968 \li glowIntensity of 1.25
969 \row
970 \li \image extendedsceneenvironment_glow_intensity_025.jpg
971 {Stone courtyard with glow intensity 0.25}
972 \li \image extendedsceneenvironment_glow_intensity_125.jpg
973 {Stone courtyard with glow intensity 1.25}
974 \endtable
975*/
976/*! \qmlproperty real ExtendedSceneEnvironment::glowBloom
977 Sets the amount of bloom applied to the glow effect.
978 Values from \b 0 to \b 1 are expected.
979
980 The \l glowHDRMinimumValue, \l glowHDRMaximumValue, \l glowHDRScale, and \l
981 glowBloom values together control the amount of \c{luminance feedback}
982 generated by the glow/bloom effect.
983
984 \default 0
985
986 In practice the values for \l glowStrength, \l glowIntensity, and \l
987 glowBloom will often be tuned together to achieve the desired results.
988
989 For example, with four glow levels enabled, a strength of 1.5, and an
990 intensity of 1:
991
992 \table
993 \header
994 \li glowBloom set to 0
995 \li glowBloom set to 0.5
996 \row
997 \li \image extendedsceneenvironment_glow_level4_strength15_intensity1_bloom0.jpg
998 {Stone hallway with glow bloom set to 0}
999 \li \image extendedsceneenvironment_glow_level4_strength15_intensity1_bloom05.jpg
1000 {Stone hallway with glow bloom set to 0.5}
1001 \endtable
1002*/
1003/*! \qmlproperty int ExtendedSceneEnvironment::glowBlendMode
1004 Blending mode for the glow effect.
1005
1006 Available modes are:
1007 \list
1008 \li ExtendedSceneEnvironment.GlowBlendMode.Additive
1009 \li ExtendedSceneEnvironment.GlowBlendMode.Screen
1010 \li ExtendedSceneEnvironment.GlowBlendMode.SoftLight
1011 \li ExtendedSceneEnvironment.GlowBlendMode.Replace
1012 \endlist
1013
1014 \default ExtendedSceneEnvironment.GlowBlendMode.SoftLight
1015
1016 \c Additive is often recommendable for outdoor scenes, where a sky or sun
1017 is visible, whereas the default \c SoftLight may work better for in-door
1018 environments.
1019
1020 \c Replace does not perform any blending, but rather results in displaying
1021 only the contribution the glow/bloom effect would blend with the actual
1022 content. In practice this can be useful for experimenting and
1023 troubleshooting when setting up the parameters of a glow/bloom effect.
1024
1025 \table
1026 \header
1027 \li Blend mode
1028 \li Example
1029 \row
1030 \li Glow disabled
1031 \li \image extendedsceneenvironment_glow_disabled.jpg
1032 {Stone hallway without glow effect}
1033 \row
1034 \li Additive
1035 \li \image extendedsceneenvironment_glow_additive.jpg
1036 {Scene with glow additive blend mode}
1037 \row
1038 \li Screen
1039 \li \image extendedsceneenvironment_glow_screen.jpg
1040 {Scene with glow screen blend mode}
1041 \row
1042 \li SoftLight
1043 \li \image extendedsceneenvironment_glow_softlight.jpg
1044 {Stone hallway with glow using soft light blend mode}
1045 \row
1046 \li Replace
1047 \li \image extendedsceneenvironment_glow_replace.jpg
1048 {Scene with glow replace blend mode}
1049 \endtable
1050*/
1051/*! \qmlproperty real ExtendedSceneEnvironment::glowHDRMaximumValue
1052 Sets the maximum brightness of the glow, in high dynamic range.
1053 Value range is from \b 0 to \b 256.
1054
1055 The \l glowHDRMinimumValue, \l glowHDRMaximumValue, \l glowHDRScale, and \l
1056 glowBloom values together control the amount of \c{luminance feedback}
1057 generated by the glow/bloom effect.
1058
1059 \default 12.0
1060*/
1061/*! \qmlproperty real ExtendedSceneEnvironment::glowHDRMinimumValue
1062 Sets the minimum brightness of the glow, in high dynamic range.
1063 Expected values are in the range \b 0 to \b 4.
1064
1065 The \l glowHDRMinimumValue, \l glowHDRMaximumValue, \l glowHDRScale, and \l
1066 glowBloom values together control the amount of \c{luminance feedback}
1067 generated by the glow/bloom effect.
1068
1069 \default 1.0
1070*/
1071/*! \qmlproperty real ExtendedSceneEnvironment::glowHDRScale
1072 The bleed scale of the HDR glow.
1073 Expected values are in the range \b 0 to \b 8.
1074
1075 The \l glowHDRMinimumValue, \l glowHDRMaximumValue, \l glowHDRScale, and \l
1076 glowBloom values together control the amount of \c{luminance feedback}
1077 generated by the glow/bloom effect.
1078
1079 \default 2.0
1080*/
1081/*! \qmlproperty int ExtendedSceneEnvironment::glowLevel
1082 Sets which of the blur passes get applied to the glow effect. There are a
1083 total of 7 levels available.
1084
1085 Not having any levels set means that the glow will have no visual effect.
1086
1087 In \c DualFilter \l glowBlurMode, the highest enabled level sets the depth
1088 of the blur chain, and with it the GPU cost. Each lower enabled level is
1089 added to the chain on the way back up, so it is blurred further by the
1090 remaining upsampling passes instead of being added separately at the end.
1091
1092 For example, to enable Glow Level \e One and \e Six we just OR the two enums together:
1093 \badcode
1094 glowLevel = (ExtendedSceneEnvironment.GlowLevel.One | ExtendedSceneEnvironment.GlowLevel.Six)
1095 \endcode
1096
1097 \default 1
1098
1099 \table
1100 \header
1101 \li glowLevel value
1102 \li Example
1103 \row
1104 \li One
1105 \li \image extendedsceneenvironment_glow_levels_1.jpg
1106 {Stone courtyard with glow at level 1}
1107 \row
1108 \li One | Two
1109 \li \image extendedsceneenvironment_glow_levels_1_2.jpg
1110 {Stone courtyard with glow at levels 1 and 2}
1111 \row
1112 \li One | Two | Three
1113 \li \image extendedsceneenvironment_glow_levels_1_2_3.jpg
1114 {Stone courtyard with glow at levels 1, 2, and 3}
1115 \row
1116 \li One | Two | Three | Four
1117 \li \image extendedsceneenvironment_glow_levels_1_2_3_4.jpg
1118 {Scene showing glow at 1, 2, 3, and 4 levels}
1119 \endtable
1120*/
1121
1122*/
1123// Vignette
1124/*! \qmlproperty bool ExtendedSceneEnvironment::vignetteEnabled
1125 Enables the vignette effect.
1126
1127 \default false
1128*/
1129/*! \qmlproperty real ExtendedSceneEnvironment::vignetteStrength
1130 Sets the strength of the vignette effect. Ranges from \b 0 to \b 15.
1131
1132 \default 15
1133
1134 \table
1135 \header
1136 \li Strength of 15
1137 \li Strength of 10
1138 \row
1139 \li \image extendedsceneenvironment_vignette_strength_15.jpg
1140 {Stone hallway with vignette strength set to 15}
1141 \li \image extendedsceneenvironment_vignette_strength_10.jpg
1142 {Stone hallway with vignette strength set to 10}
1143 \endtable
1144*/
1145/*! \qmlproperty color ExtendedSceneEnvironment::vignetteColor
1146 Sets the color of the vignette effect.
1147
1148 \default "gray"
1149
1150 For example, changing the color to red, pictured here with radius 4 and
1151 strength 15:
1152
1153 \image extendedsceneenvironment_vignette_red.jpg
1154 {Stone hallway with red vignette effect}
1155*/
1156/*! \qmlproperty real ExtendedSceneEnvironment::vignetteRadius
1157 Sets the radius of the vignette effect. Ranges from \b 0 to \b 5.
1158
1159 \default 0.35
1160
1161 \table
1162 \header
1163 \li Radius of 0.35
1164 \li Radius of 5.0
1165 \row
1166 \li \image extendedsceneenvironment_vignette_radius_default.jpg
1167 {Stone hallway with vignette radius set to 0.35}
1168 \li \image extendedsceneenvironment_vignette_radius_5.jpg
1169 {Stone hallway with vignette radius set to 5.0}
1170 \endtable
1171*/
1172// Lens Flare
1173/*! \qmlproperty bool ExtendedSceneEnvironment::lensFlareEnabled
1174 Enables the lens flare effect.
1175
1176 Once enabled, the first property to tune is typically \l
1177 lensFlareBloomBias.
1178
1179 \default false
1180*/
1181/*! \qmlproperty real ExtendedSceneEnvironment::lensFlareBloomScale
1182 Sets the scale of the lens flare bloom effect. Expected scale value ranges
1183 from \b 0 to \b 20.
1184
1185 In practice this acts as a multiplier for the zero-clamped color value with
1186 the \l lensFlareBloomBias subtracted.
1187
1188 \default 10
1189
1190 \table
1191 \header
1192 \li Scale 2, bias 0.81
1193 \li Scale 20, bias 0.81
1194 \row
1195 \li \image extendedsceneenvironment_lensflare_scale_2_bias_081.jpg
1196 {Stone hallway with lens flare scale 2}
1197 \li \image extendedsceneenvironment_lensflare_scale_20_bias_081.jpg
1198 {Stone hallway with lens flare scale 20}
1199 \endtable
1200*/
1201/*! \qmlproperty real ExtendedSceneEnvironment::lensFlareBloomBias
1202 Sets the level at which the lens flare bloom starts.
1203
1204 The bias value is subtracted from the high dynamic range color value, with
1205 the result clamped to 0. This means that, depending on the scene, it may
1206 sometimes need be set to a quite low value, e.g. below 1, in order to make
1207 the lens flare obvious. Hence the default of 0.95. Whereas when having a
1208 higher range of colors, a bigger value may make more sense.
1209
1210 \default 0.95
1211
1212 \table
1213 \header
1214 \li Bias of 0.81
1215 \li Bias of 0.31
1216 \row
1217 \li \image extendedsceneenvironment_lensflare_bias_081.jpg
1218 {Stone courtyard with subtle lens flare, bias 0.81}
1219 \li \image extendedsceneenvironment_lensflare_bias_031.jpg
1220 {Stone courtyard with prominent lens flare, bias 0.31}
1221 \endtable
1222*/
1223/*! \qmlproperty real ExtendedSceneEnvironment::lensFlareGhostDispersal
1224 Sets the distance between the lens flare ghosts. Expected values are
1225 between \b 0 and \b 5. The value should be larger than 0.
1226
1227 \default 0.5
1228
1229 \table
1230 \header
1231 \li Ghost dispersal of 0.25
1232 \li Ghost dispersal of 0.90
1233 \row
1234 \li \image extendedsceneenvironment_lensflare_ghostdispersal_025.jpg
1235 {Stone courtyard with closely spaced lens flare ghosts}
1236 \li \image extendedsceneenvironment_lensflare_ghostdispersal_090.jpg
1237 {Stone courtyard with widely spaced lens flare ghosts}
1238 \endtable
1239*/
1240/*! \qmlproperty int ExtendedSceneEnvironment::lensFlareGhostCount
1241 Sets the amount of lens flare ghosts. Expected values are from \b 0 to \b 20.
1242
1243 \default 4
1244
1245 \table
1246 \header
1247 \li Ghost count of 2
1248 \li Ghost count of 16
1249 \row
1250 \li \image extendedsceneenvironment_lensflare_ghostcount_2.jpg
1251 {Stone courtyard with 2 lens flare ghosts}
1252 \li \image extendedsceneenvironment_lensflare_ghostcount_16.jpg
1253 {Stone courtyard with 16 lens flare ghosts}
1254 \endtable
1255*/
1256/*! \qmlproperty real ExtendedSceneEnvironment::lensFlareHaloWidth
1257 Sets the size of the lens flare halo. Ranges from \b 0 to \b 1.
1258
1259 \default 0.25
1260*/
1261/*! \qmlproperty real ExtendedSceneEnvironment::lensFlareStretchToAspect
1262 Set correction factor for roundness of the lens flare halo.
1263
1264 \default 0.5 [0, 1]
1265*/
1266/*! \qmlproperty real ExtendedSceneEnvironment::lensFlareDistortion
1267 Set amount of chromatic aberration in the lens flare. Expected values
1268 ranges from \b 0 to \b 20.
1269
1270 \default 5
1271
1272 \table
1273 \header
1274 \li Distortion set to 0
1275 \li Distortion set to 15
1276 \row
1277 \li \image extendedsceneenvironment_lensflare_distortion_0.jpg
1278 {Stone courtyard with lens flare, no chromatic aberration}
1279 \li \image extendedsceneenvironment_lensflare_distortion_15.jpg
1280 {Stone courtyard with lens flare showing chromatic aberration}
1281 \endtable
1282*/
1283/*! \qmlproperty real ExtendedSceneEnvironment::lensFlareBlurAmount
1284 Set amount of blur to apply to the lens flare. Ranges from \b 0 to \b 50.
1285
1286 \default 3
1287
1288 \table
1289 \header
1290 \li Blur amount set to 0
1291 \li Blur amount set to 30
1292 \row
1293 \li \image extendedsceneenvironment_lensflare_0_blur.jpg
1294 {Stone courtyard with sharp lens flare}
1295 \li \image extendedsceneenvironment_lensflare_30_blur.jpg
1296 {Stone courtyard with blurred lens flare}
1297 \endtable
1298
1299*/
1300/*! \qmlproperty bool ExtendedSceneEnvironment::lensFlareApplyDirtTexture
1301 Set whether to apply a dirt texture to the lens flare.
1302
1303 \default false
1304
1305 \table
1306 \header
1307 \li Dirt texture disabled
1308 \li Default dirty texture enabled
1309 \row
1310 \li \image extendedsceneenvironment_lensflare_dirt_off.jpg
1311 {Stone courtyard with clean lens flare}
1312 \li \image extendedsceneenvironment_lensflare_dirt_on.jpg
1313 {Stone courtyard with lens flare showing dirt texture}
1314 \endtable
1315
1316 \sa {ExtendedSceneEnvironment::lensFlareLensDirtTexture}{lensFlareLensDirtTexture}
1317*/
1318/*! \qmlproperty bool ExtendedSceneEnvironment::lensFlareApplyStarburstTexture
1319 Set whether to apply a starburst texture to the lens flare.
1320
1321 \default false
1322
1323 \table
1324 \header
1325 \li Starburst texture disabled
1326 \li Default starburst texture enabled
1327 \row
1328 \li \image extendedsceneenvironment_lensflare_starburst_off.jpg
1329 {Stone courtyard with lens flare, no starburst}
1330 \li \image extendedsceneenvironment_lensflare_starburst_on.jpg
1331 {Stone courtyard with lens flare showing starburst pattern}
1332 \endtable
1333
1334 \sa {ExtendedSceneEnvironment::lensFlareLensStarburstTexture}{lensFlareLensStarburstTexture}
1335*/
1336/*! \qmlproperty vector3d ExtendedSceneEnvironment::lensFlareCameraDirection
1337 Sets the direction of the camera in the scene.
1338
1339 \default Qt.vector3d(0, 0, -1)
1340*/
1341/*! \qmlproperty Texture ExtendedSceneEnvironment::lensFlareLensColorTexture
1342 A gradient image used for the lens flare lens color.
1343
1344 By default a built-in 256x256 texture is used:
1345
1346 \image extendedsceneenvironment_lensflare_default_texture.jpg
1347 {Horizontal gradient from yellow through pink to magenta}
1348 */
1349/*! \qmlproperty Texture ExtendedSceneEnvironment::lensFlareLensDirtTexture
1350 An image that is used to simulate inperfections on the lens.
1351
1352 Has an effect only when \l lensFlareApplyDirtTexture is enabled.
1353
1354 By default a built-in dirty texture is used:
1355
1356 \image extendedsceneenvironment_lensflare_default_dirt.jpg
1357 {Grayscale texture with scattered bright spots on dark background}
1358 */
1359/*! \qmlproperty Texture ExtendedSceneEnvironment::lensFlareLensStarburstTexture
1360 A noise image to augment the starburst effect of the lens flare.
1361 Has an effect only when \l lensFlareApplyStarburstTexture is enabled.
1362
1363 By default a built-in noise texture is used:
1364
1365 \image extendedsceneenvironment_lensflare_default_noise.jpg
1366 {Grayscale noise texture with irregular light and dark patterns}
1367*/
1368
1369// SSGI
1370/*! \qmlproperty bool ExtendedSceneEnvironment::ssgiEnabled
1371 Enables screen-space global illumination. This effect increases realism
1372 by adding ambient occlusion and indirect light to the scene.
1373
1374 \default false
1375 \since 6.11
1376
1377 \table
1378 \header
1379 \li SSGI disabled
1380 \li SSGI enabled
1381 \row
1382 \li \image extendedsceneenvironment_ssgi_without.jpg
1383 {Medieval hall without screen-space global illumination}
1384 \li \image extendedsceneenvironment_ssgi_with.jpg
1385 {Medieval hall with screen-space global illumination enabled}
1386 \endtable
1387
1388 \sa {Qt Quick 3D - SSGI Lightmap Example}
1389*/
1390/*! \qmlproperty bool ExtendedSceneEnvironment::ssgiIndirectLightEnabled
1391
1392 Controls whether indirect light is included in the result, or only ambient
1393 occlusion. By default both are enabled.
1394
1395 \default true
1396 \since 6.11
1397
1398 Setting the value to false provides a direct alternative to
1399 SceneEnvironment's \l{SceneEnvironment::aoEnabled}{ambient occlusion}. The
1400 AO results provided by SSGI are expected to be higher quality and require
1401 little or no tuning. This comes at the expense of potentially higher GPU
1402 load.
1403
1404 \table
1405 \header
1406 \li SSGI disabled
1407 \li AO-only SSGI
1408 \row
1409 \li \image extendedsceneenvironment_ssgi_ao_without.jpg
1410 {Lion sculpture without ambient occlusion}
1411 \li \image extendedsceneenvironment_ssgi_ao_with.jpg
1412 {Lion sculpture with ambient occlusion from SSGI}
1413 \endtable
1414*/
1415/*! \qmlproperty real ExtendedSceneEnvironment::ssgiIndirectLightBoost
1416
1417 \default 4.0
1418 \since 6.11
1419
1420 Multiplier for the indirect light results. Increasing the value makes the
1421 indirect light contribution more prominent. The suggested range is 1 to
1422 100. The appropriate value always depends on the scene and how it is lit.
1423*/
1424/*! \qmlproperty real ExtendedSceneEnvironment::ssgiBufferSizeFactor
1425
1426 Controls the size of the color buffers the SSGI effect works on. Performing
1427 everything with render targets matching the input and output dimensions
1428 (i.e., the View3D's pixel size) can be too costly which many GPUs and
1429 devices cannot afford in practice. Therefore, the SSGI effect operates on a
1430 reduced size for intermediate textures. By default this is 0.5, meaning half
1431 the size of the input and output textures. Increasing the value towards 1
1432 increases the quality of the results, at the expense of a heavily growing
1433 GPU load.
1434
1435 \default 0.5
1436 \since 6.11
1437*/
1438/*! \qmlproperty bool ExtendedSceneEnvironment::ssgiSimulatedBounceEnabled
1439
1440 Controls whether additional light bouncing is simulated by sampling the
1441 previous frame's texture.
1442
1443 \default false
1444 \since 6.11
1445*/
1446/*! \qmlproperty real ExtendedSceneEnvironment::ssgiSimulatedBounceFactor
1447
1448 Multiplier for the result from the simulated bounce calculation. Only has an
1449 effect when \l ssgiSimulatedBounceEnabled is \c true. This value may need to
1450 be tuned together with \l ssgiIndirectLightBoost. Depending on the scene and
1451 how it is lit, higher values for these properties can lead to overly
1452 exaggerated indirect light contribution, and even a feedback loop where the
1453 indirect light grows excessively between frames.
1454
1455 \default 0.5
1456 \since 6.11
1457*/
1458/*! \qmlproperty int ExtendedSceneEnvironment::ssgiSampleCount
1459
1460 Configures the global illumination algorithm. A higher sample count will give
1461 better results at the expense of increased GPU load.
1462
1463 The suggested range is 1 to 16.
1464
1465 \default 4
1466 \since 6.11
1467*/
1468/*! \qmlproperty real ExtendedSceneEnvironment::ssgiSampleRadius
1469
1470 Configures the global illumination algorithm.
1471
1472 The suggested range is 0.001 to 4.0.
1473
1474 \default 0.1
1475 \since 6.11
1476*/
1477/*! \qmlproperty int ExtendedSceneEnvironment::ssgiSliceCount
1478
1479 Configures the global illumination algorithm.
1480
1481 The suggested range is 1 to 8.
1482
1483 \default 4
1484 \since 6.11
1485*/
1486/*! \qmlproperty real ExtendedSceneEnvironment::ssgiHitThickness
1487
1488 Configures the global illumination algorithm.
1489
1490 The suggested range is 0.001 to 4.0.
1491
1492 \default 0.5
1493 \since 6.11
1494*/
1495
1496// SSR
1497/*! \qmlproperty bool ExtendedSceneEnvironment::ssrEnabled
1498 Enables screen-space reflections, a post-processing technique that creates
1499 reflections by using data rendered on the screen.
1500
1501 \default false
1502 \since 6.11
1503 \table
1504 \header
1505 \li SSR disabled
1506 \li SSR enabled
1507 \row
1508 \li \image extendedsceneenvironment_ssr_without.webp
1509 {Green Qt logo and red cube on a floor without reflections}
1510 \li \image extendedsceneenvironment_ssr_with.webp
1511 {Green Qt logo and red cube mirrored on a reflective floor}
1512 \endtable
1513*/
1514
1515/*! \qmlproperty real ExtendedSceneEnvironment::ssrThickness
1516
1517 Assumed thickness of scene geometry used by screen-space reflections.
1518 Larger values reduce reflection breakups (similar to shadow acne)
1519 but may cause reflections to look physically incorrect.
1520
1521 \default 20
1522 \since 6.12
1523*/
1524
1525/*! \qmlproperty int ExtendedSceneEnvironment::ssrMaxSteps
1526
1527 Limits how many steps the reflection ray can take across the screen.
1528 Larger values improve reflection reach and quality, but reduces
1529 performance.
1530
1531 \default 256
1532 \since 6.12
1533*/