Light QML Type

Lets you define the lighting for a 3D item. More...

Import Statement: import QtQuick3D 1.0

Properties

Detailed Description

Property Documentation

ambientColor : color

The property defines the diffuse color (and intensity) applied to materials before being lit by this light.


areaHeight : real

This property controls the height of an Area lights rectangle


areaWidth : real

This property controls the width of an Area lights rectangle.


brightness : real

This property defines an overall multiplier for a Point light’s effects.


castShadow : bool

When this property is enabled, the light will cast shadows.


diffuseColor : color

This property defines the diffuse color (and intensity) applied to models illuminated by this light.


exponentialFade : real

This property increases the rate at which the lighting effect dims on surfaces that are extra far away from a Point light.


lightType : enumeration

This property defines which type of light is being used.

  • Light::Directional - Lighting is applied uniformly in the direction of the Z axis for this light. The rotation of directional lights affects the result, but not the position or scale.
  • Light::Point - Lighting is applied outwards from the center of the light, becoming increasingly dim away from the center. The position of point lights affects the result, but not the rotation or scale.
  • Light::Area - Lighting emits from the +Z face of a rectangular light. Use the Light::AreaWidget and Light::AreaHeight properties to control the size of the area light.

linearFade : real

This property increases the rate at which the lighting effect dims the farther surfaces are from a Point light.


scope : Node

The propery allows the selection of a Node in the scene which has the affect that only that Node and it's children are affected by this light.


shadowBias : real

This property is used to tweak the shadowing effect when when objects are casting shadows on themselves


shadowFactor : real

This propery determines how dark the cast shadows should be.


shadowFilter : real

This property sets how much blur is applied to the shadows.


shadowMapFar : real

The property determines the maximum distance for the shadow map. Smaller values ma improve the precision and effects of the map.


shadowMapFieldOfView : real

This property determines the field of view used by the simulated cameras that render to the shadow map.


shadowMapResolution : int

The propery sets the size of the shadow map created for shadow rendering. This is specified as 2^n. The larger the value the larger the shadow map and this can have a huge affect on resource usage.


specularColor : color

This property defines the specular color (and intensity) applied to models illuminated by this light.

Note: A model’s material must have a non-zero Specular Amount for any specular lighting to take effect.