Fun with Skyboxes in Unity

Objective: learn how to create a background for a scene, using a custom skybox material.

All scenes in unity have a background that is displayed by default. Usually, it is this generic blue sky, grey ground, and horizon.

However, we can use a custom skybox material to change this. We can create a new material and use the6-Sided Skybox shader.

Next, we can add 6 images to this shader. This creates a cube that has each image displayed on each of its faces. By using this material, it will enclose the entire game scene within this cube, so every direction will display this image of a city skyline.

We utilize this new material in the Lighting window and Environment tab. We just select “Skybox Material” and change it to the new 6-Sided Skybox material we made.

Now the background has become a city! Not only that, but the Environment Lighting in that same tab uses the Skybox as its source, the city imagery also affects the lighting in the scene. After generating the baked lighting, all the surfaces look blue and dim, which matches the surrounding environment.

--

--

--

I’m a passionate and talented software engineer seeking an opportunity in game development.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Connect Xero OAuth 2.0 Using Python Without A Website

Static Code Analysis: RuboCop

Creating a Tile Palette in Unity

HTML, CSS, JS

Companies I have worked with

Singleton Design Pattern

Monitoring MongoDB Using CloudWatch

Burning the midnight oil

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Blake Zoeckler

Blake Zoeckler

I’m a passionate and talented software engineer seeking an opportunity in game development.

More from Medium

Installing Unity & Getting Started with Game Development

Mobile Game Progression

Modeling An Elevator Console With Unity ProBuilder

Learn to code by making a 2D space shooter.