In this short tutorial, we’ll see how to correctly set up the Material for window glass in Blender, specifically using the Cycles rendering engine.



Video Transcript

Hello everyone! In this short tutorial, we’ll see how to correctly set up the Material for window glass in Blender, specifically using the Cycles rendering engine.

What you’re seeing on screen is the Render Preview of a Blender scene with some colored window panes. Outside, there is a Sun light source positioned so that the light should enter through the windows and reach the wall on the left.

The window panes are transparent, created using a Principled material with Transmission and Alpha both set to 1, yet something is clearly wrong with the lighting. The sunlight is not visible on the floor or on the wall.

The situation doesn’t improve if we replace the Principled shader with a Glass node, even if we connect the Roughness and Normal Textures used to create some frosted glass inserts.

A Transparent node allows the sunlight to pass correctly, but it removes all the typical refraction effects of glass, essentially making it disappear. So we need to mix these two nodes properly.

Let’s add a Mix Shader node to the setup, connecting the Glass node to the first Shader input of Mix and Transparent to the second Shader input. The order matters, and we’ll come back to that in a moment. Then, connect Mix to the Material Output.

The Texture Image nodes must be connected to the various inputs of these two nodes. The Color information should be connected to both Glass and Transparent, while Roughness and Normal should only be connected to the Glass node.

The Mix node uses the first Shader input when Factor is 0 and the second input when Factor is 1, blending proportionally for intermediate values.

As for the Factor input of the Mix node, we need a Light Path node, which provides several outputs that return either 0 or 1 depending on the type of light ray available in the scene.

For our purposes, we want to use the Transparent node when the ray is, specifically, of the Shadow or Reflection type. In those cases, the Transparent node will be used, allowing light to pass through as if the glass weren't there.

To get Factor equal to 1 when at least one of these two outputs returns the value 1, we use a Math Maximum node, connecting it between these two Light Path outputs and the Factor input of the Mix Shader.

To avoid having to rebuild this setup from scratch every time we need this material in other projects, we can create the specific Material in an empty project and turn it into an Asset. We can also save the file and Append the Material from another project. It depends on your preferences.

Alright, that’s it for this video! If you found it helpful, feel free to thank me with a Like and by subscribing to the channel! Remember to turn on notifications so you don’t miss upcoming tutorials! See you soon!

Search Tutorials

Enter a phrase or multiple comma-separated keywords to search.

This is a personal website and does not constitute a sales channel. The pages dedicated to 3D models document a selection of my work and do not contain offers, prices, purchasing procedures, or commercial links. I am not currently accepting requests for custom work, consulting, or other professional collaborations.


EXTENDED PRIVACY AND COOKIE USAGE POLICY