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

Systems — Migrating to the Cloud

Android Unity Game Development Blog, Day 2: “Jumping The Gun”

DOCKER — CMD vs ENTRYPOINT

System76 Continues to Work on HiDPI

Spark Jobs — Induce Parallelism

HOT🔥 OpenSea Clone script allows anyone to create an NFT marketplace!

CS371p Fall 2020: Barrett Schonefeld

The parables of software engineering

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

2.5D Platformer: Moving Platforms

Week 24: How to add SFX to you game without going mad

Quick and Easy: Alter Your Pre-Built Unity Texture Maps using Krita.

Game Development: Beginners Prospective