Sky
Interact with built-in Sky & Weather system.
🗿Static Class
This is a Static Class. Access it's methods directly with
.
. It's not possible to spawn new instances.💂Authority
This static class can be accessed only on 🟧 Client side.
HELIX natively integrates Ultra Dynamic Sky, one of best Unreal Marketplace Asset Packs, it provides a dynamic sky and weather solution for games!
Through the Sky
class, we expose it's methods to allow customizing it's parameters in real time!
Examples​
Client/Index.lua
-- Spawns a new Ultra Dynamic Sky actor
Sky.Spawn()
-- Sets the time to 16:30
Sky.SetTimeOfDay(16, 30)
Static Functions​
Returns | Name | Description | |
---|---|---|---|
Spawn | Replaces all Sky/Sun actors with the Ultra Dynamic Sky Actor, to be able to use the functions from this page | ||
DestroyAllSky | Destroys all Directional Lights, Sky Lights, Exponential Height Fogs, Volumetric Clouds, Sky Atmosphere, Ultra Dynamic Sky Actors and all Actors with the Sun Actor Tag from the Level | ||
Reconstruct | Reconstruct the Ultra Dynamic Sky Actor, forces most of the changes to be applied | ||
SetMoonTexture | Sets the Moon Texture | ||
SetMoonTextureRotation | Sets the Moon Texture Rotation | ||
SetMoonVerticalOffset | Sets the Moon Vertical Offset | ||
SetMoonScale | Sets the Moon Scale | ||
SetMoonPhase | Sets the Moon Phase | ||
SetMoonGlowIntensity | Sets the Moon Glow Intensity | ||
SetMoonLightIntensity | Sets the Moon Light Intensity | ||
SetSunAngle | Sets the Sun Angle | ||
SetSunRadius | Sets the Sun Radius | ||
SetSunLightIntensity | Sets the Sun Light Intensity | ||
SetSkyMode | Sets the Sky Mode | ||
SetVolumetricCloudColor | Sets the Volumetric Cloud Color | ||
SetCloudCoverage | The amount of coverage for the cloud layer, from a clear sky to overcast | ||
SetFog | The fogginess of the scene. The impact this has on fog density is scaled from the Fog Density category | ||
SetContrast | A simple contrast boost for the sky material. Cannot affect volumetric clouds | ||
SetOverallIntensity | The overall brightness of the shader | ||
SetNightBrightness | Can be used to scale the brightness of the sky and lighting, at night | ||
SetAnimateTimeOfDay | Sets whether or not to animate the time of day | ||
SetTimeOfDay | Sets the current time | ||
integer, integer, integer | GetTimeOfDay | Gets the current time | |
boolean | IsSpawned | Returns if the Ultra Dynamic Sky was spawned | |
WeatherType | GetWeather | Gets the current weather | |
ChangeWeather | Changes the current weather |
Spawn
​
Replaces all Sky/Sun actors with the Ultra Dynamic Sky Actor, to be able to use the functions from this page. Internally this calls Sky.DestroyAllSky()
automatically
Sky.Spawn(spawn_weather?)
Type | Parameter | Default | Description |
---|---|---|---|
boolean | spawn_weather? | false | Whether or not to spawn the Weather Actor (to be able to use Weather related methods) |
DestroyAllSky
​
Destroys all Directional Lights, Sky Lights, Exponential Height Fogs, Volumetric Clouds, Sky Atmosphere, Ultra Dynamic Sky Actors and all Actors with the Sun
Actor Tag from the Level
Sky.DestroyAllSky()
Reconstruct
​
Reconstruct the Ultra Dynamic Sky Actor, forces most of the changes to be applied
Sky.Reconstruct()
SetMoonTexture
​
Sets the Moon Texture
Set it to empty to restore the default. After setting it, you must callSky.Reconstruct()
to have it applied properly
Sky.SetMoonTexture(texture)
Type | Parameter | Default | Description |
---|---|---|---|
Image Path | texture |
SetMoonTextureRotation
​
Sets the Moon Texture Rotation
Sky.SetMoonTextureRotation(rotation)
Type | Parameter | Default | Description |
---|---|---|---|
float | rotation |
SetMoonVerticalOffset
​
Sets the Moon Vertical Offset
Sky.SetMoonVerticalOffset(offset)
Type | Parameter | Default | Description |
---|---|---|---|
float | offset |
SetMoonScale
​
Sets the Moon Scale
Sky.SetMoonScale(scale)
Type | Parameter | Default | Description |
---|---|---|---|
float | scale |
SetMoonPhase
​
Sets the Moon Phase
Sky.SetMoonPhase(phase)
Type | Parameter | Default | Description |
---|---|---|---|
float | phase | Ranges from 0-30 |
SetMoonGlowIntensity
​
Sets the Moon Glow Intensity
Sky.SetMoonGlowIntensity(glow_intensity)
Type | Parameter | Default | Description |
---|---|---|---|
float | glow_intensity |
SetMoonLightIntensity
​
Sets the Moon Light Intensity
Sky.SetMoonLightIntensity(intensity)
Type | Parameter | Default | Description |
---|---|---|---|
float | intensity |
SetSunAngle
​
Sets the Sun Angle
Sky.SetSunAngle(angle)
Type | Parameter | Default | Description |
---|---|---|---|
float | angle |
SetSunRadius
​
Sets the Sun Radius
Sky.SetSunRadius(radius)
Type | Parameter | Default | Description |
---|---|---|---|
float | radius |
SetSunLightIntensity
​
Sets the Sun Light Intensity
Sky.SetSunLightIntensity(intensity)
Type | Parameter | Default | Description |
---|---|---|---|
float | intensity |
SetSkyMode
​
Sets the Sky Mode
After setting it, you must callSky.Reconstruct()
to have it applied properly
Sky.SetSkyMode(sky_mode)
Type | Parameter | Default | Description |
---|---|---|---|
SkyMode | sky_mode |
SetVolumetricCloudColor
​
Sets the Volumetric Cloud Color
This is only applied ifSetSkyMode(SkyMode.VolumetricClouds)
is set
Sky.SetVolumetricCloudColor(color)
Type | Parameter | Default | Description |
---|---|---|---|
Color | color |
SetCloudCoverage
​
The amount of coverage for the cloud layer, from a clear sky to overcast
Sky.SetCloudCoverage(cloud_coverage)
Type | Parameter | Default | Description |
---|---|---|---|
float | cloud_coverage |
SetFog
​
The fogginess of the scene. The impact this has on fog density is scaled from the Fog Density category
Sky.SetFog(fog_percentage)
Type | Parameter | Default | Description |
---|---|---|---|
float | fog_percentage |
SetContrast
​
A simple contrast boost for the sky material. Cannot affect volumetric clouds
Sky.SetContrast(contrast)
Type | Parameter | Default | Description |
---|---|---|---|
float | contrast |
SetOverallIntensity
​
The overall brightness of the shader
Sky.SetOverallIntensity(intensity)
Type | Parameter | Default | Description |
---|---|---|---|
float | intensity |
SetNightBrightness
​
Can be used to scale the brightness of the sky and lighting, at night
Sky.SetNightBrightness(brightness)
Type | Parameter | Default | Description |
---|---|---|---|
float | brightness |
SetAnimateTimeOfDay
​
Sets whether or not to animate the time of day
Sky.SetAnimateTimeOfDay(animate, day_length?, night_length?)
Type | Parameter | Default | Description |
---|---|---|---|
boolean | animate | Whether or not to animate the time of day | |
float or nil | day_length? | 30.0 | The time (in minutes) from sunrise to sunset |
float or nil | night_length? | 15.0 | The time (in minutes) from sunset to sunrise |
SetTimeOfDay
​
Sets the current time
Sky.SetTimeOfDay(hours, minutes)
GetTimeOfDay
​
Gets the current time
— Returns integer, integer, integer (hours, minutes, seconds).
local ret_01, ret_02, ret_03 = Sky.GetTimeOfDay()
IsSpawned
​
Returns if the Ultra Dynamic Sky was spawned
— Returns boolean.
local ret = Sky.IsSpawned(including_weather)
Type | Parameter | Default | Description |
---|---|---|---|
boolean | including_weather | if to check for Weather Actor too |
GetWeather
​
Gets the current weather
— Returns WeatherType.
local ret = Sky.GetWeather()
ChangeWeather
​
Changes the current weather
Sky.ChangeWeather(weather, transition_time)
Type | Parameter | Default | Description |
---|---|---|---|
WeatherType | weather | weather to change | |
float | transition_time | fade time to completely change to new weather |