The Rect Light emits light into the scene from a rectangular plane with a defined width and height. You can use them to simulate any kind of light sources that have rectangular areas, such as televisions or monitor screens, overhead lighting fixtures, or wall sconces.
RectLights do not behave like true area lights in all situations. See the discussion on mobility settings below.
Each Rect Light has two key settings, Source Width and Source Height, which determine the size of its rectangle along its local Y and Z axes:
The Rect Light has a spherical attenuation radius, like a Point Light or a Spot Light. As shown in the image above, the Rect Light emits light within its sphere of attenuation only in the positive direction of its local X axis, similar to a Spot Light with its cone set to 180 degrees. However, specular highlights for Rect Lights show the width and height of the light's rectangular area.
Like other types of light sources, Rect Lights have three Mobility settings:
- Static: With this setting, the light's direct and indirect illumination are both baked to lightmaps when you build lighting for your level. This is the fastest method for rendering, but it means that the light cannot be changed in the game at runtime.
- Stationary: With this setting, only the indirect illumination from the light is baked into lightmaps when you build lighting for your level. The direct lighting cast by the light is calculated dynamically every frame in the game. This setting preserves the high-quality soft shadowing and global illumination pre-computed by Lightmass, but it also permits you to change the color and intensity of the light in the game at runtime.
- Movable: With this setting, the light is totally dynamic. None of its direct or indirect illumination is baked by Lightmass at all. This allows your light to cast correct shadows from moving objects in the game at runtime every frame. However, this setting is typically the slowest to render.