Adding a Light Source
Adding a Light Source
Students will be able to:
To build a lamp, you’ll learn about creating complex parts, adding particle effects like fire, and then using light sources to illuminate a room.
Creating the Complex Part
The oil lamp will be a combination of parts. The base will be a sphere that will be carved to create the design.
Create the Base
In the Home tab, create a Sphere part named Base.
In the Home tab, change the Material to cobblestone.
Subtract Parts from the Base
Now that you have a base, you’ll create two blocks that will be subtracted from the sphere, carving out the quarter sphere shape. Carving out parts is similar to carving out the door in building the Parthenon.
Since you’ll be moving parts into other parts, turn off Collisions by making sure there’s not a gray box around the Collisions button.
Add a Block part that cuts the sphere in half. Carving out this side will let the lamp fit on a wall.
Add a Block part that will remove the top half of the sphere. After building the lamp, the fire will go on top.
While holding down CTRL, select both Block parts. In the Model tab, click Negate to tell Studio you want to subtract these parts.
Select the Base part and both red block parts. In the Model tab, click Union.
- Rename the unioned part LightBase.
Before adding a light source to the lamp, you’ll add an oil well and fire to the top of LightBase.
Add a Oil Well
In the Home tab, add a Sphere named OilWell.
In the Home tab, change the color to black.
Scale and move the OilWell halfway through LightBase like below.
Create a Fire
Fires are one type of particle emitter, just like smoke or sparkles, that can be added to a game.
- In the Workspace, inside OilWell, add a Fire object.
- While selecting Fire, go to the Properties Window and find Data. These properties let you adjust the fire’s appearance. Change the numbers for Heat and Size until the fire fits the lamp.
Select LightBase and OilWell, move them inside the Parthenon’s room, and place them on a wall.
Create a Light
Lights can be added onto parts in Roblox Studio to make light. While there are different types of lights, this project will use a PointLight, a light source that shines light in all directions.
In the Workspace, inside the lamp part, add a PointLight.
- In the PointLight properties, under Appearance, find Range. This is how far away the light shines. Change the Range by clicking and dragging the circle until there is enough light in the room.
Light at 15 range
Light at 30 range
Adjust the Fire Color
Right now the color of the PointLight is set to white, giving the room an unrealistic look. To make the room feel more realistic and to match the color of the fire, you’ll change the PointLight’s color.
Under Appearance, click the box right of Color.
Pick a new color that will naturally go with the fire and press OK.
Duplicate the lamp and move it around the room until the room has enough light.
Now your avatar can see as they explore the inside of the Parthenon!
These documents are licensed by Roblox Corporation under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Roblox, Powering Imagination, and Robux are trademarks of Roblox Corporation, registered in the United States and other countries.