Roblox Studio · Lesson 14

Lighting and Atmosphere: Illuminating the Night Camp

Combined with ClockTime, Atmosphere and PointLight, create a night scene with atmosphere and clear visibility.

10–15 years old 60 minutes Lighting / PointLight Hands-on practice Testing and Saving

Course overview

Make a camp where there is darkness and you can find the exit.

Lighting is not just decoration, it also tells players where is safe and where to go. In this lesson, we will not write complicated scripts, but use several observable attributes to complete a scene design.

A beautiful screenshot does not equal a fun level. You need to repeatedly look at the path from your character's height to make sure that the night doesn't hide the steps and exits together.

01 · BEFORE

Before starting

Objects are selected, Properties are modified, and versions are saved. Create a new Lesson14 Baseplate.

02 · MAKE

Your work

Night camp with street lights, soft mist and clear exits.

03 · CHECK

Complete flag

The difference between global light and local light can be explained; the next road can be seen from the point of birth.

Official Atmosphere scene effect reference, not the camp results of this lesson
Figure 14-1: Official Atmosphere effect reference: distant colors and air levels will affect the atmosphere of the scene. This is not the finished product of this lesson camp.Roblox Creator Documentation · CC BY 4.0 · The original image has not been modified · Description of the permit

Learning route

Prepare first, then do it; after seeing the result, remember to save it.

Every time a small step is completed, it is tested. Say what you expect to see first, and then use Play and Output to check it. Don't rush to write all the code at once.

1

01 · First clear the road during the day

Build a cabin, three road signs and the end platform. Make them visible in the daytime first, then start coloring them at night.

2

02·ClockTime determines the position of the sun

ClockTime uses a number of hours from 0–24. 18 is near evening, and 20 is closer to night; the specific look and feel is also affected by other lighting settings of the scene.

3

03 · PointLight will illuminate the surroundings

The Neon material makes the lampshade look bright, but to illuminate the road, PointLight is also needed. PointLight emits light in all directions, while SpotLight is more like a flashlight shining in one direction.

4

04 · Mist is just an embellishment, don’t cover the route

Looking for Atmosphere in Lighting. If it already exists, adjust it directly and do not superimpose multiple objects of the same type. Density controls the density of the fog, start with a very light effect.

5

05 · Use the player’s eyes to make the final judgment

From God's point of view, it's easy to see the exit, but from a role perspective it can be covered on the roof. Please walk, not just in the editor.

Step by step

01 · First clear the road during the day

Build a cabin, three road signs and the end platform. Make them visible in the daytime first, then start coloring them at night.

This lesson only uses Parts and built-in light objects created by you. There is no need to import external models, skyboxes or paid materials.

  1. Set all building parts to Anchored.
  2. Select Lighting in Explorer and note down the current ClockTime, Brightness and Ambient for easy restoration.
  3. Use screenshots or notes to save the appearance before dimming.

Step by step

02·ClockTime determines the position of the sun

ClockTime uses a number of hours from 0–24. 18 is near evening, and 20 is closer to night; the specific look and feel is also affected by other lighting settings of the scene.

Brightness affects the intensity of global light, and Ambient affects the ambient color of shadow areas. Do not change ten numbers at the same time, otherwise it will be difficult to know which parameter makes the screen black.

  1. Set Lighting.ClockTime to 19 and Brightness to 2 first.
  2. Set Ambient to a bluish dark gray, such as RGB 70, 80, 105.
  3. Check the character's feet after Play, and then Stop to continue adjusting.
02·ClockTime determines the position of the sun
PropertiesTry this value firstWhat to Observe
ClockTime19Sky and Sun Direction
Brightness2Overall light and shade
Ambient70, 80, 105Do the steps in the shadow be identifiable?
Official screenshot of setting ClockTime in Lighting
Figure 14-2: Official Lighting attribute screenshot: at the ClockTime adjustment time; first ensure that the route is identifiable, and then pursue the night scene effect.Roblox Creator Documentation · CC BY 4.0 · The original image has not been modified · Description of the permit

Step by step

03 · PointLight will illuminate the surroundings

The Neon material makes the lampshade look bright, but to illuminate the road, PointLight is also needed. PointLight emits light in all directions, while SpotLight is more like a flashlight shining in one direction.

Place the PointLight inside the lampshade Part. Don't wrap the lights completely in opaque walls and wonder why they can't be seen.

  1. Create Lamp, position about 0, 8, -12, Anchored=true, Material=Neon.
  2. Insert PointLight in Lamp, Brightness=2, Range=20, Color=255, 220, 170.
  3. First put only one light, observe how far it covers, and then copy it to the intersection.
  4. Reduce the number and range of lights, and try to make each light have a guiding role.

Step by step

04 · Mist is just an embellishment, don’t cover the route

Looking for Atmosphere in Lighting. If it already exists, adjust it directly and do not superimpose multiple objects of the same type. Density controls the density of the fog, start with a very light effect.

Set Density to 0.2 and Haze to 1 as a starting point. The effect will be different under different map scales. Your judgment is based on "can you still see the next foothold clearly?"

  1. Create or select a unique Atmosphere under Lighting.
  2. First compare Density=0 and 0.2, and then decide which one to keep.
  3. If necessary, improve the street lights or reduce the fog, without pursuing the same as the reference picture.

Step by step

05 · Use the player’s eyes to make the final judgment

From God's point of view, it's easy to see the exit, but from a role perspective it can be covered on the roof. Please walk, not just in the editor.

Colours can't be the only hint. Add a door frame or arrow with a clear shape to the exit, and you can find directions even if people don't know the difference between red and green.

  1. Walk the entire route from the spawn point, making sure you can see every step clearly.
  2. Look back once from the opposite direction to avoid the back being completely dark.
  3. Keep the daytime copy and the night scene copy, and record the three attributes you changed.

Homework

It's your turn to change and make your own version.

1 Two atmospheres

Save two versions of evening and night, and compare which one is easier to see the road clearly.

2 One light, one task

Write a sentence for each light's purpose: to illuminate an entrance, indicate a turn, or mark a destination.

3 Choosing: Warm-cold contrast

Let the security camp use a warm light and a long road sign a cold light, while retaining a shape tip.

Completion criteria:First verify the work in Playtest, then click Stop and save it as "Initials_Lesson14" or a copy of the corresponding Homework; do not overwrite the runnable version of the previous lesson.

Exit questions

Answer it yourself first, and then expand on it.

Will Neon automatically light up the ground?

Does not replace actual light objects. Can join PointLight or SpotLight.

Must it look better with the fog?

Not necessarily, fog may block level information. You should first ensure that the player can see the road clearly.

Why only change one item at a time?

This would allow the results to be linked to specific parameters and could easily be reversed.

Is it enough to just look at screenshots to determine the quality of lighting?

If that's not enough, you have to actually walk from the player's perspective and check for occlusion, turns and footholds.

Explore further

This is where we start when we need to check the data.

The text code can be copied directly. First confirm the script type, placement, and whether this code is a complete version or a small experiment; do not run multiple versions of the same script superimposed. The source of the interface reference picture has been marked. The object names in the picture may be different from those in this lesson. Please refer to the operation steps.

Download the code and placement instructions for this lesson