While overall world lighting is globally controlled through the Lighting
service, games can also include in-game light sources like lamps, torches, spotlights, TV screens, etc.
Starter Project
The remainder of this course uses the Misty Harbor project as a showcase. To follow along, open it in Studio before proceeding.
Point Lights
A PointLight emits light spherically from a single point. This object is ideal for non-directional light sources like bulbs, torches, and fireballs.
Light sources like point lights need to be inserted directly into parts, meshes, or attachments. Here, a point light will be inserted into an existing model within the darkened city.
-
Find and select a LightPole model like the one shown below, near the central fountain.
-
In the Explorer window, expand the model’s tree and select the LightCasing part.
-
Change its Material property to Neon — this will make the part appear to glow brightly, although it will not actually emit any light.
-
With LightCasing still selected, insert a new PointLight object.
-
With PointLight selected, customize its Brightness and Color values.
Brightness = 4 Color = 255, 175, 100 -
Further customize the light by adjusting its Range property. This value defines the radial distance of illumination from the light’s position, measured in studs.
Range = 8 Range = 12
Spot Lights
A SpotLight emits light in the shape of a cone. This object is ideal for light sources like street lamps, flashlights, and headlights.
-
Select the taller arched StreetLight model next to the construction across the street. Currently the light is pointed out instead of down at the street.
-
Expand the model’s tree to reveal the SpotLight object.
-
With SpotLight selected, test out different values for its Face property to change which face/axis light is emitted from.
Face = Left Face = Bottom -
Adjust the Angle property to increase or decrease the spread of light emission. The maximum value is 180 which illuminates a full half sphere from the cone’s apex.
Angle = 30 Angle = 75 -
Experiment with different Brightness and Color values, as with the point light.
Surface Lights
A SurfaceLight emits light from the entire surface/face of a part, rather than just from a single point. This object is useful for light sources like TV or computer screens, lighted billboards, and fluorescent panels.
-
Find and select the lighted RobloxBillboard sign on top of the café.
-
Expand the model’s tree to reveal the SurfaceLight object.
-
With SurfaceLight selected, test out different Face values to change which face/surface light is emitted from. Notice that light is emitted from the entire surface, not a point upon it.
Face = Bottom Face = Right -
Adjust the Angle property to increase or decrease the spread 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.
Angle = 60 Angle = 0
By using lighting props instead of just general world lighting, you open up the possibility of creating new genres and environments like cyberpunk cities, traditional light festivals, or moody detective scenes.