Through a Looking Glass: Making a Window Effect in Unity (Game Dev Day 47)

Jack Leavey
2 min readNov 17, 2021

--

Objective: Create a believable glass window

While meshing and texturing solid objects in Unity is straightforward, getting a believable semi-opaque visual effect like glass takes a bit more work.

Let’s take a look at our window gameobject first.

The glass in the window is just a default “plain” material for now.

So we need to create a new material for our glasswork.

I named mine Glass_mat.

In the Inspector, the very first option “Rendering Mode” defaults to opaque. Change this to Transparent in the drop down menu.

Now go into the “Albedo” channel and lower the Alpha channel (bottom slider, labeled A)

Now if we drag our new material into the appropriate material slot on our game object (in this case, the slot for the panes of glass), they should be partially see through.

And that’s it! If you want to tint the glass, go into Albedo and change the colors to your liking. Keep in mind, you cannot put your Alpha channel to 0 and still retain any color (as this makes the object completely transparent).

--

--

Jack Leavey
Jack Leavey

Written by Jack Leavey

I am a software engineer with years of experience branching into game development, specifically in Unity. Follow along for guides on creating game mechanics!

No responses yet