Directional Light

A Directional Light simulates an infinitely far away source of light that casts parallel rays which emit in one direction towards an object in a scene. As such, the position of a directional light is not factored into calculations - only its rotation will have an effect. Thus, directional lights are ideal for representation of sources such as the sun.

Properties

Light

PROPERTY

DESCRIPTION

Color

Defines the color used for light emitted. We use a color picker that can use RGB, HSV or HEX inputs.

Intensity

Specifies strength of the light.

Numeric Range:

  • 2 = Defaulted value

  • 100 = Max; The higher the value the more intense the color.

Shadow

Enabling this allows for real-time webGL rendered shadows to be cast from light source.

PROPERTY

DESCRIPTION

Enable

Enables casting of shadows from light sources.

Bias

Computes the shadow at a point that is displaced toward the light from the actual surface being shaded. Can be used to minimize incorrect self-shadowing.

Numeric Range:

  • 0 = Defaulted value. No bias.

  • 100 = The further the displaced shadow becomes.

Map Size

This determines the size of the shadow texture. The smaller the resolution is less detailed but loads faster.

128

Saves out a 128x128 texture for the shadow.

256

Saves out a 256x256 texture for the shadow.

512

Defaulted value. Saves out a 512x512 texture for the shadow.

1024

Saves out a 1024x1024 texture for the shadow.

2048

Saves out a 2048x2048 texture for the shadow.

Camera Size

The lighting effect is calculated by placing a camera at the light’s origin and taking a quick render of the scene from that virtual camera’s point of view. This setting adjusts the size of the camera’s viewport size. The light will cast a shadow in the area dictated by this setting.

Much like the map size determining the detail, this effect can also play a large role in how defined and natural the shadow effect is. A larger viewport size takes into account more area need to be calculated for the shadow effect. Thus more area’s need to be calculated and fit in the same render. This can give you a more pixelated effect since more needs to be included in the texture. A smaller viewport size gives you a smaller area to calculate and more room in the render. However, you could cut-off an area you need to be calculated if you bring the value to low.

Numeric Range:

  • 500 = Defaulted size.

  • A higher value means a larger area of shadow is calculated. It can result in a lower resolution and less detailed shadow effect.

  • The lower the value the smaller the area where shadow is received. A smaller area is calculated for shadows but it can result in a more detailed and natural looking shadow effect.

Near Clip

Specifies the starting distance from the light where the real-time webGL shadows will be calculated.

Numeric Range:

  • .01 = Defaulted value.

  • The higher the value the further the starting point of shadow calculation from the light source.

Far Clip

Specifies the ending distance from the light where the real-time webGL shadows will be calculated

Numeric Range:

  • 500 = Defaulted value.

  • The higher the value the further the ending point of shadow calculation from the light source.

Last updated