LevelPost Skybox Tutorial
See the bundle tutorial for how to install Unity.Import assets
Import the assets from the zip file skydemo_assets.zip.
You should now have the following files in the Assets folder:
sky.shader | Custom/Sky shader, contains special display instructions for the skybox material |
---|---|
bkg1_back6.png, bkg1_bottom4.png, bkg1_front5.png, bkg1_left1.png, bkg1_right2.png, bkg1_top3.png | Skybox images, one for each of the six 'sides' of a skybox |
Editor/BuildBundles.cs | Editor script to build asset bundles (the same file as in the other tutorials) |
Note that the BuildBundles.cs file must be in a subfolder called Editor.
The skybox images come from https://opengameart.org/content/space-skyboxes-0. The images there have left and right reversed from what Unity uses.
Create cubemap
Create a legacy cubemap (Assets -> Create -> Legacy -> Cubemap), set the Face size somewhat higher (for example 1024) and drag each of the six texture assets to the matching slots of the cubemap.
Note that you must increase the Face size before you add the texture assets, otherwise the cubemap will still have a low resolution. If you already added the textures, add them all again after increasing the Face size.
You can check the cubemap by dragging it to the large scene pane, look around by using Alt+Left Mouse button.
Create material
Create a new material (Assets -> Create -> Material) and give it a name with your prefix (for example cust_sky). Select the Custom/Sky shader, select the cubemap and set the Render Queue to Transparent.
Create asset bundle
Assign an AssetBundle to the material and build the bundles (Assets -> Build AssetBundles).
Create level
Create a png file with the name of your material (for example cust_sky.png) and place it in the subdirectory LevelTextures of the OverloadLevelEditor. Now there should be a cust_sky texture in the editor. Use this texture for your window, where you want to look outside. Or simply place it on all sides of a single segment level for an "outside experience".
LevelPost
Set up your bundle and prefix and convert the level.