Sub topic 12
Glass with Transmission
This chapter assumes you can open the Shader Editor, connect a Principled BSDF to a Material Output, and set Roughness and IOR as covered in earlier chapters. You should also know what a render engine is. Here you will build clear glass, frosted glass, and tinted glass, and learn why glass often looks wrong on the first render.
What Transmission does
Transmission is light passing through a surface and continuing on the other side, bent by the surface. A solid object with Transmission turned on behaves like glass, water, or clear plastic. Light enters, bends, and leaves.
In the Principled BSDF, the Transmission Weight input (named just Transmission before Blender 4.0) blends between two behaviors:
- At 0, the surface is opaque. Base Color, Metallic, and the other layers control what you see.
- At 1, the surface transmits light. The Base Color tints the light that passes through.
Values between 0 and 1 mix the two. Real glass is almost always 0 or 1, so intermediate values are mostly for special effects.
The bending of light depends on IOR, the index of refraction. A higher IOR bends light more. Common values are:
| Material | IOR |
|---|---|
| Air | 1.0 |
| Water | 1.33 |
| Ice | 1.31 |
| Window glass | 1.45 to 1.52 |
| Crystal glass | 1.5 to 1.7 |
| Diamond | 2.42 |
Blender's default IOR of 1.5 (1.45 in Blender 4.0 and later) is a good starting point for glass.
Building clear glass
Start from a default Principled BSDF and set these inputs:
- Base Color to white (or very near it).
- Roughness to 0.
- IOR to about 1.45.
- Transmission Weight to 1.
The script below does the same thing.
import bpy
mat = bpy.data.materials.new(name="ClearGlass")
mat.use_nodes = True
bsdf = mat.node_tree.nodes.get("Principled BSDF")
bsdf.inputs["Base Color"].default_value = (1.0, 1.0, 1.0, 1.0)
bsdf.inputs["Roughness"].default_value = 0.0
bsdf.inputs["IOR"].default_value = 1.45
bsdf.inputs["Transmission Weight"].default_value = 1.0The socket name Transmission Weight exists in Blender 4.0 and later. In 3.x, use Transmission.
A glass object looks convincing only when there is something to refract and reflect. Add an HDRI environment, a textured floor, or other objects behind it. Against a plain gray world, even perfect glass looks like nothing.
Frosted and tinted glass
Frosted glass
Roughness controls how sharp the refraction is. Raise Roughness on a transmissive surface and the view through it blurs, like frosted glass. A value around 0.2 to 0.4 gives a soft frosted look. At 1 the view is almost entirely diffused.
Tinted glass
The Base Color tints light passing through. A pale green gives bottle glass. Keep the color light and not too saturated. A dark, saturated color on a thick object absorbs nearly all the light and the object turns dark or black.
For colored glass whose tint depends on thickness, use a Volume Absorption node connected to the Volume socket of the Material Output. Thick parts absorb more light and look darker, as real glass does. This works well in Cycles. It is covered in more detail with render engine differences in a later chapter.
Single-surface versus solid glass
Geometry affects how the glass renders. This catches many learners.
- Solid glass has thickness. A drinking glass is modeled with an outer wall and an inner wall. A glass sphere is a closed volume. Light refracts on entering and again on leaving.
- Thin glass is a single surface, such as a window pane modeled as one plane. Refraction at the front is not undone at the back, so the view appears distorted when it should not be.
For a thin window pane, give the plane some thickness with a Solidify modifier. Alternatively, set IOR to 1.0 so light passes straight through, and keep the reflections.
import bpy
obj = bpy.context.active_object
if obj is not None and obj.type == 'MESH':
mod = obj.modifiers.new(name="Thickness", type='SOLIDIFY')
mod.thickness = 0.01Also check that face normals point outward. Flipped normals confuse refraction because the renderer cannot tell whether a ray is entering or leaving the glass.
Eevee settings for glass
Cycles traces real refraction rays, so glass works with few extra settings. Eevee approximates refraction, and you must enable some options.
In Blender 4.2 and later (Eevee Next):
- On the material, open Settings and set Render Method to Raytraced, or enable Raytracing in the Render properties. Without it, refraction is limited.
- Turn on Thickness handling if the glass is a thin shell. The material's Thickness setting can use the object's geometry or a Thickness output.
In Blender 4.1 and earlier (legacy Eevee):
- In the Render properties, enable Screen Space Refraction.
- On the material, turn on Screen Space Refraction in Settings.
- Set Blend Mode to Opaque for glass. A transparent blend mode with Transmission often produces sorting errors.
Eevee's refraction uses only what is visible on screen, so objects out of view will not appear in the glass. This is a normal limit and not a mistake in your node setup.
Cycles settings for glass
Cycles gives accurate glass, but it needs enough light paths. Open Render properties, then Light Paths, then Max Bounces. For glass, the Transmission bounce limit and the Total limit matter. If you see black areas inside glass, raise Transmission bounces to 8 or more. Glass inside glass needs more.
Another problem is noise. Bright lights seen through glass produce speckles called fireflies. Lower Clamping values and raise the sample count to reduce them. Enable the denoiser as well.
Common problems
| Symptom | Likely cause | Fix |
|---|---|---|
| Glass renders black | Too few transmission bounces, or Base Color is dark | Raise bounces, lighten Base Color |
| Glass looks like a flat gray shape | Nothing to reflect or refract | Add an HDRI or objects behind it |
| Distorted view through a window | Single-plane geometry refracts once | Add thickness or set IOR to 1.0 |
| No refraction in Eevee | Refraction option disabled | Enable raytracing or Screen Space Refraction |
| Glass shows a hard dark edge | Flipped normals | Recalculate normals outward |
| Glass hides objects inside it | Overlapping surfaces, as with liquid in a glass | Leave a small gap between the liquid and the glass walls, or use correct IOR on each |
Exercise
A thin plane with Transmission Weight 1 and IOR 1.45 is used as a window. Looking through it, the background appears shifted and distorted. Give two ways to fix this.
Show answer
A single plane refracts light once when it enters but has no back surface to bend it straight again. Fix it by adding thickness with a Solidify modifier so the light refracts on entry and exit, or by setting IOR to 1.0 so light passes through without bending while reflections remain.
Exercise
You set Transmission Weight to 1 in Eevee and the object still looks opaque, although it works in Cycles. Name the settings you check first.
Show answer
In Blender 4.1 and earlier, enable Screen Space Refraction in the Render properties and on the material, and use an Opaque blend mode. In Blender 4.2 and later, enable raytracing and check the material's Render Method. Also confirm there is something behind the object to refract.