Define lighting and clouds in studio directory

g
This commit is contained in:
2023-12-29 03:24:13 -05:00
parent 93d2c3772d
commit 5639dbbc53
4 changed files with 71 additions and 6 deletions

View File

@@ -0,0 +1,49 @@
local function Sky(): Sky
local SkyBox = Instance.new("Sky")
SkyBox.MoonAngularSize = 8
SkyBox.MoonTextureId = "rbxassetid://62326944"
SkyBox.SkyboxBk = "rbxassetid://9544505500"
SkyBox.SkyboxDn = "rbxassetid://9544547905"
SkyBox.SkyboxFt = "rbxassetid://9544504852"
SkyBox.SkyboxLf = "rbxassetid://9544547694"
SkyBox.SkyboxRt = "rbxassetid://9544547542"
SkyBox.SkyboxUp = "rbxassetid://9544547398"
SkyBox.SunTextureId = "rbxassetid://5392574622"
SkyBox.StarCount = 200
SkyBox.SunAngularSize = 9
return SkyBox
end
local function Atmosphere(): Atmosphere
local Atmosp = Instance.new("Atmosphere")
Atmosp.Density = .25
Atmosp.Offset = 0
Atmosp.Color = Color3.fromRGB(199, 199, 199)
Atmosp.Decay = Color3.fromRGB(106, 112, 125)
return Atmosp
end
local function Clouds(): Clouds
local _Clouds = Instance.new("Clouds")
_Clouds.Cover = .7
_Clouds.Density = .15
_Clouds.Color = Color3.fromRGB(180,180,180)
return _Clouds
end
export type exports = {
Sky: Sky,
Atmosphere: Atmosphere,
Clouds: Clouds,
}
local export: exports = {
Sky = Sky,
Atmosphere = Atmosphere,
Clouds = Clouds
}
return export

View File

@@ -1,18 +1,21 @@
local Lighting = game:GetService("Lighting") local Lighting = game:GetService("Lighting")
local Terrain = workspace:WaitForChild("Terrain")
local Sky = require(script:WaitForChild("Sky"))
type LightingProps = { [string]: Color3 | number | boolean | string } type LightingProps = { [string]: Color3 | number | boolean | string }
local Lighting_PropsTree: LightingProps = { local Lighting_PropsTree: LightingProps = {
["Ambient"] = Color3.fromRGB(70, 70, 70), ["Ambient"] = Color3.fromRGB(40,40,40),
["Brightness"] = 0, ["Brightness"] = 3,
["ColorShift_Bottom"] = Color3.new(0,0,0), ["ColorShift_Bottom"] = Color3.new(0,0,0),
["ColorShift_Top"] = Color3.new(0,0,0), ["ColorShift_Top"] = Color3.new(0,0,0),
["EnvironmentDiffuseScale"] = 1, ["EnvironmentDiffuseScale"] = 1,
["EnvironmentSpecularScale"] = .7, ["EnvironmentSpecularScale"] = .7,
["GlobalShadows"] = true, ["GlobalShadows"] = true,
["OutdoorAmbient"] = Color3.fromRGB(70,70,70), ["OutdoorAmbient"] = Color3.fromRGB(50,50,50),
["ShadowSoftness"] = 1, ["ShadowSoftness"] = 1,
["ClockTime"] = 0, ["ClockTime"] = 7,
["GeographicLatitude"] = 0, ["GeographicLatitude"] = 0,
["Name"] = "Lighting", ["Name"] = "Lighting",
["ExposureCompensation"] = 0, ["ExposureCompensation"] = 0,
@@ -26,7 +29,10 @@ export type Effects = {
} }
return function(): Effects return function(): Effects
--Effects Lighting:ClearAllChildren()
Terrain:ClearAllChildren()
--VFX Effects for later
local ColorCorrection = Instance.new("ColorCorrectionEffect") local ColorCorrection = Instance.new("ColorCorrectionEffect")
ColorCorrection.Parent = Lighting ColorCorrection.Parent = Lighting
@@ -39,6 +45,10 @@ return function(): Effects
end end
end end
Sky.Sky().Parent = Lighting
Sky.Atmosphere().Parent = Lighting
Sky.Clouds().Parent = Terrain
return { return {
ColorCorrection = ColorCorrection ColorCorrection = ColorCorrection
} }

View File

@@ -0,0 +1,3 @@
return function()
workspace.Gravity = 150
end

View File

@@ -13,7 +13,10 @@ EditorEntities.Name = "StudioIndexedEntities"
EditorEntities.Parent = ServerStorage EditorEntities.Parent = ServerStorage
local StudioEntities = HideEditorEntities.indexAll(not RS:IsStudio()) local StudioEntities = HideEditorEntities.indexAll(not RS:IsStudio())
Lighting()
StarterPlayer_Stuff()
Lighting_Stuff()
Workspace_Stuff()
EditorEntities.OnInvoke = function(): HideEditorEntities.Entities EditorEntities.OnInvoke = function(): HideEditorEntities.Entities
return StudioEntities.IndexedEntities return StudioEntities.IndexedEntities