Skip to content

Latest commit

 

History

History
156 lines (115 loc) · 8.68 KB

File metadata and controls

156 lines (115 loc) · 8.68 KB
title description
Light sources
Light sources simulate realistic lighting from objects such as torches, spotlights, and screens.

Local light sources simulate realistic lighting from objects such as lamps, torches, spotlights, and TV screens. By using the different types of light sources instead of just general global lighting through the Class.Lighting service, you can create immersive environments such as cyberpunk cities, traditional light festivals, and moody detective scenes.

A far out view of a diner bulding in the middle of a nighttime city. The diner is utilizing several local light sources.

The `Class.Lighting.LightingStyle|LightingStyle` property, modifiable only in the [Properties](../studio/properties.md) window for the global `Class.Lighting` object, sets your experience's lighting style. For more information, see [Appearance](../environment/lighting.md#appearance). To view **light guides** that indicate the color and field of effect from light sources, such as the angle of light emission from the cone's apex of a `Class.SpotLight`, open [Studio Settings](../studio/setup.md#customization) and toggle on **Show Light Guides**.

Light types

Local light sources include PointLight, SpotLight, and SurfaceLight. Each shares various properties from the Class.Light class, including Class.Light.Color|Color, Class.Light.Brightness|Brightness, and Class.Light.Shadows|Shadows.

PointLight

A Class.PointLight emits light spherically from a single point. This object is ideal for non-directional lights like bulbs, torches, and fireballs.

To create a point light in Studio, insert a Class.PointLight into an Class.Attachment or a Class.BasePart (Class.Attachment is recommended for point‑specific light emission). Then adjust the object's Class.PointLight.Range|Range as well as shared properties like Class.PointLight.Brightness|Brightness and Class.PointLight.Color|Color.

Range

A point light's Class.PointLight.Range|Range property defines the radial distance of illumination from the light's position, measured in studs.

A street lamp point light with a small range.

The same street lamp point light with a larger range.

SpotLight

A Class.SpotLight emits light in the shape of a cone with a spherical base. This object is ideal for directional lights like street lamps, flashlights, and headlights.

To create a spotlight in Studio, insert a Class.SpotLight into an Class.Attachment or a Class.BasePart and set its Class.SpotLight.Face|Face property to specify which direction light emits from. Then adjust the Class.SpotLight.Angle|Angle and Class.SpotLight.Range|Range, as well as shared properties like Class.SpotLight.Brightness|Brightness and Class.SpotLight.Color|Color.

Face

A spotlight's Class.SpotLight.Face|Face property determines which face/axis light emits from, as shown from the following streetlamp's glowing light part:

A street lamp spotlight that emits light from its bottom face.

A street lamp spotlight that emits light from its left face.

Angle

A spotlight's Class.SpotLight.Angle|Angle property defines the angle of light emission from the cone's apex. The maximum value is 180 which illuminates a full half sphere from the apex.

A street lamp spotlight with a 30 degree angle of emission.

The same street lamp spotlight with a 75 degree angle of emission.

SurfaceLight

A Class.SurfaceLight emits light from the face of a Class.BasePart. This object is ideal for lighting from computer screens, billboards, signs, and fluorescent panels.

To create a surface light in Studio, insert a Class.SurfaceLight into a Class.BasePart and set its Class.SurfaceLight.Face|Face property to specify which surface light emits from. Then adjust the Class.SurfaceLight.Angle|Angle and Class.SurfaceLight.Range|Range, as well as shared properties like Class.SurfaceLight.Brightness|Brightness and Class.SurfaceLight.Color|Color.

Face

A surface light's Class.SurfaceLight.Face|Face property determines the face of the Class.BasePart from which light emanates. Notice that light emits from the entire surface, not just a point on the surface.

A sign surface light that emits light from its bottom face.

A sign surface light that emits light from its right face.

Angle

A surface light's Class.SurfaceLight.Angle|Angle property defines the angle of light emission from the part's surface. An angle of 0 means that light travels directly outward from the surface while an angle of 180 means light travels outward perpendicular to the surface.

A sign surface light with a 0 degree angle of emission.

A sign surface light with a 60 degree angle of emission.

Shared properties

All light sources share various properties from the Class.Light class, including color, brightness, and shadows.

Color

The Class.Light.Color|Color property sets the Datatype.Color3 value of the emitted light.

A torch that emits red light.

A torch that emits green light.

A torch that emits blue light.

Brightness

The Class.Light.Brightness|Brightness property sets the light's brightness with maximum effect at the center of the light. Note that Class.Light.Brightness|Brightness is still limited to the light's defined range, so a higher Class.Light.Brightness|Brightness value doesn't light up a larger region around the light.

A torch that emits low light.

A torch that emits medium light.

A torch that emits bright light.

Shadows

The Class.Light.Shadows|Shadows property projects shadows where light is blocked by an obstacle.

A corner view of the diner with shadows enabled.

A corner view of the diner with shadows disabled.