Creating a Transparent Window Effect in Unity
In order to create a transparent window effect in Unity we’ll first need to create a new material by right clicking in the Project view and selecting Create > Material. We can then assign it an appropriate name, such as ‘Glass_mat’ or ‘Window_mat’ and then begin to edit the material.
Normally to add transparency to an object in Unity we’d need to select it’s main colour and reduce the value in the alpha channel down from 100, and while this is still the case when working with materials (only here we’ll be selecting the colour on the Albedo channel) we also need to remember to change the rendering mode from Opaque to Transparent:
With this done, we can now change the alpha value on the albedo channel in order to decrease it’s opacity and increase its transparency. We probably don’t want to go for complete transparency for this particular effect, so a value of about 18 or 40 should do us fine.
You can also couple this with an appropriate normal map if we wanted to give this a frosted look perhaps. And lastly, while it will inevitably make the material more expensive to use, I’d recommend turning on Reflections under Forward Rendering Options. Couple this with reflections probes in your 3D space and you can end up with some pretty neat results 😉