-
Notifications
You must be signed in to change notification settings - Fork 210
Adding skyboxes
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:
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")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-inIn game, entering this zone looks like:
zone-transition.mp4
- Home
- ECS
- Stations
- Main Screen/Captain
- 5-6 Player Crews
- 3-4 Player Crews
- 1 Player Crew
- Game Master
- Additional Stations and Views
- Setting up a Game
- Lore
- Expanding the Game
- Additional Features
- Building from Source