-
Notifications
You must be signed in to change notification settings - Fork 23
Skybox
In 3D game development, a skybox is a technique used to create a background environment for a sky. It is essentially a large cube with six textures mapped to the inside of the cube, creating the illusion of a three-dimensional environment that extends to infinity in all directions.
In the Mundus editor:
Main Menu > Environment > Skybox
From the skybox panel, you can update the 6 images. Make sure:
- all 6 images are square
- all 6 images are the same size
- you assign the correct image to the correct direction (i.e. right, left, top, bottom, front, back)
You have an option to enable/disable rotation of the skybox and also set the rotation speed.
You can also:
- Select the active skybox from the dropdown menu
- Set/Change skybox name
- Create a new skybox
- Create the default skybox (simple blue screen)
- Remove current selected skybox
Keep in mind you can only render one skybox per scene, but you are able to switch the skybox in the runtime if you need to.
The MundusRuntimeExample repo has an example here.
Below is the specific code that allows you to select a specific skybox by filename.
SkyboxAsset asset = (SkyboxAsset) mundus.getAssetManager().findAssetByFileName("night.sky");
scene.setSkybox(asset, mundus.getShaders().getSkyboxShader());
You can search on Google. The best skyboxes might have a fee or are copyrighted. However if you need an example skybox try this configurable space skybox generator.
Once you download your skybox creation, you will need to splice the downloaded image into 6 parts (i.e. right, left, top, bottom, front, back).