How to get this shadow / lighting effect in blender?

I’m trying to make a scene in which light is falling inside the room through a window and I want the outline of the window frame visible inside the room as in the picture.

The light outside the room is making shadows without the glass but when I add a glass panel on the window the light gets diffused. The room gets lit up evenly but I just want the sharp window frame to be visible as a shadow.
How do you make a simple thin plain glass?

Other details: Transparent shadows is turned on and rendering using cycles. Glass made with a single plane with PBSDF transparency 1.0 and roughness 0.

The term is “cookie”. Try here: How do I put a cookie on a lamp in cycles?

1 Like

Thanks but I also want the things on the shelf to cast shadows as in real world when light falls through a window. I also want the windows to have glass on it. When I add a simple plain glass between the light and the objects, light is just getting diffused which is not realistic.

Without glass

With Glass (Single plain with PBSDF Transparency=1, roughness=0)

Is it a limitation or am I doing something wrong?

Could I see a screenshot of your node setup?

Couple of points:

  1. What is the roughness of your glass material - it looks rough from the screen shots posted - which could be why your light is being diffused.

  2. Never use the actual glass shader out of the box for windows. Cycles is very poor at dealing with caustics - and any light passing through a glass material becomes a caustic. It’s better to use what is known as an “architectural glass” shader setup (see link below). Be sure that if you do use the glass shader, to ensure your object has thickness. The glass shader doesn’t work properly on simple planes.

  3. Alternatively you could use a mix shader with glossy/transparent shaders and a Fresnel node plugged into the fac slot of the mix node. You don’t really need refraction for flat planes of glass - so a transparent plane with a slightly glossy surface would be sufficient.

What do you mean Transparency=1? Transparency isn’t a setting on the Principled BSDF.

Yes here it is

Sorry I meant Transmission :sweat_smile:

Thank you. Solved!

I got the point. I should’ve used the whole setup. I heard in some tutorials that principled BSDF is the more advanced feature and you could make glass just by setting the transmission to 0 and it will automatically take care of everything else. So I ignored all other glass tutorials thinking it was the old way.

The link covered a lot of problems with glass!! Thanks for sharing :smiley: :smiley:

Use a sun lamp and turn up the exposure in the render properties tab? Also, use a principled bsdf instead of a glass shader for architectural glass because it doesn’t scatter caustic “fireflies” everywhere.

I use this kind of setup for all window pane glass for architectural use:

Facing Pow 5 add 0.05 is very close to the real fresnel curve, and you don’t have to deal with refraction/glass opaque shadows, special treatment of inverted face normals when dealing with single layer glass, and you get fresnel like shadow handling automatically.