This is an old revision of the document!
Lighting guide/lighting script basics
Environmental lighting
Roblox Bhop and Surf use the Shadowmap lighting technology. To use that in Studio, in the explorer window, navigate to Lighting. Click on it and look at the properties. The Technology property needs to be changed to Shadowmap
.
Most important game.Lighting properties
- Ambient (default: 0,0,0)
- Controls the color/brightness of shadows
- Brightness (default: 1)
- Controls the overall brightness of the sun
- ColorShift_Top (default: 0,0,0)
- Controls the tint of the sun
- GlobalShadows (default: true)
- If false, there will be no shadows (not recommended, tweak part's CastShadow properties instead)
- OutdoorAmbient (default: 127,127,127)
- Controls the color/brightness of the outdoors
- ClockTime (default: 14)
- Controls the time of day
- GeographicLatitude (default: 41.733)
- Controls the latitude
- FogColor (default: 192,192,192)
- Controls the color of fog
- FogStart (default: 0)
- Controls where fog starts; measured in studs
- FogEnd (default: 10000)
- Controls where fog ends (where it is strongest); measured in studs
Note: both ClockTime and GeographicLatitude are used to control the position of the sun
Basics for environmental lighting (game.Lighting)
To change game.Lighting properties for your map, you need to add a script to your map model.
Example:
local l = game.Lighting
Assign a variable name to game.Lighting for ease of use, here we just use l
l.Ambient = Color3.fromRGB(100,100,100) l.ClockTime = 12 l.GeographicLatitude = 21
Increase the Ambient value to make shadows less dark so indoor areas have more visibility. Change the position of the sun so it is more directly overhead and creates less shadows.