Light QML Type
An uncreatable abstract base type for all lights. More...
|Import Statement:||import QtQuick3D|
- ambientColor : color
- brightness : real
- castsShadow : bool
- color : color
- scope : Node
- shadowBias : real
- shadowFactor : real
- shadowFilter : real
- shadowMapFar : real
- shadowMapQuality : enumeration
Light itself is an uncreatable base for all of its subtypes. The subtypes provide multiple options to determine the style of the light.
For usage examples, see Qt Quick 3D - Lights Example.
ambientColor : color
The property defines the ambient color applied to materials before being lit by this light. The default value is black, rgb(0, 0, 0).
brightness : real
This property defines an overall multiplier for this light’s effects. The default value is 1.
castsShadow : bool
When this property is enabled, the light will cast shadows. The default value is false.
color : color
This property defines the color applied to models illuminated by this light. The default value is white, rgb(255, 255, 255).
scope : Node
The property allows the selection of a Node in the scene. Only that node and its children are affected by this light. By default the value is null, which indicates no scope selected.
Note: Scoped lights cannot cast shadows, meaning a Light with a scope set should not set castsShadow to true.
shadowBias : real
This property is used to tweak the shadowing effect when objects are casting shadows on themselves. The value range is [-1.0, 1.0]. Generally, a value inside [-0.1, 0.1] is sufficient. The default value is 0.
shadowFactor : real
This property determines how dark the cast shadows should be. The value range is [0, 100], where 0 means no shadows and 100 means the light is fully shadowed. The default value is 5.
shadowFilter : real
This property sets how much blur is applied to the shadows. The default value is 5.
shadowMapFar : real
The property determines the maximum distance for the shadow map. Smaller values improve the precision and effects of the map. The default value is 5000.
shadowMapQuality : enumeration
The property sets the quality of the shadow map created for shadow rendering. Lower quality uses less resources, but produces lower quality shadows while higher quality uses more resources, but produces better quality shadows.
Supported quality values are:
|Render shadowmap using 256x256 texture.|
|Render shadowmap using 512x512 texture.|
|Render shadowmap using 1024x1024 texture.|
|Render shadowmap using 2048x2048 texture.|
The default value is
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.