An object that defines properties of a spot light source.
Name | Description | Default | Required |
---|---|---|---|
intensity | Light intensity, in the [0, 1] range | 1.0 | no |
shadow_type | Type of shadowing to use for this light. Valid values are “none”, “shadow_map”, and “raytraced”. | “none” | no |
shadow_softness | If the light casts shadows, this is the softness factor to apply to the shadow. | 0.0 | no |
shadow_bias | For shadow mapped shadows, this is the shadow bias. | 1.0 | no |
constant_attenuation | See Details | 1.0 | no |
linear_attenuation | See Details | 0.0 | no |
quadratic_attenuation | See Details | 0.0 | no |
falloff_angle | See Details | 180.0 degrees | no |
falloff_exponent | See Details | 0.0 | no |
The constant_attenuation, linear_attenuation, and quadratic_attenuation are used to calculate the total attenuation of this light given a distance. The equation used is:
color_scaling = constant_attenuation + ( Dist * linear_attenuation ) + (( Dist^2 ) * quadratic_attenuation )
The falloff_angle and falloff_exponent are used to specify the amount of attenuation based on the direction of the light.
{ "intensity" : 0.34, "shadow_type" : "shadow_map", "shadow_softness" : 3.0, "shadow_bias" : 2.8, "constant_attenuation" : 0.8, "falloff_angle" : 25.0 }