Adding skyboxes - daid/EmptyEpsilon GitHub Wiki
Skyboxes are cubemap image sets that compose the background in 3D viewports. Each image set is a subdirectory of the resources/skybox directory.
To add a new skybox, create a new directory and add six square images, one for each side of the cube:
- right.png
- left.png
- top.png
- bottom.png
- front.png
- back.png
For example, this is the top image of the simulation skybox image set:
And this is what that skybox looks like in game, as used in the tutorial scenarios:
Using skyboxes
Setting the default skybox
The default skybox uses the default directory, which depicts a starfield. To change the skybox using the Lua API, for instance during a scripted scenario, pass the skybox image set's directory name as the parameter of the setDefaultSkybox() function:
setDefaultSkybox("simulation")
Using local skyboxes in zones
Accessing zone properties requires ECS features that might be available only in development builds.
Zone() entities, which define a region of space, can change the skybox using a fade transition as a player enters or exits them. Set the skybox property of a zone to define its custom skybox, and the skybox_fade_distance property of a zone to define how far inward from the zone's edge that the fade transition area extends.
local zone = Zone():setPoints(-1000, 1000, 1000, 1000, 1000, -1000, -1000, -1000) -- 2U square zone around 0,0
zone:setLabel("Purple zone")
zone.components.zone.skybox = "purple"
zone.components.zone.skybox_fade_distance = 250 -- 0.25U fade-in
In game, entering this zone looks like:
https://github.com/user-attachments/assets/91af8cf8-7607-4b3c-8855-77838f7b7817