One of the biggest problems I have in Blender is glass. I search, watch, read some of the tutorials, advice. The results come out differently and questionable. When using the “Glass nod”, why would anyone add Fresnel when it is already applied in glass nod? Unable to get dirty windows, and the dirty shadows, shown on walls, or floor, depending on angle of light. And reflection of dirty/broken glass windows. Dirty, broken windows do have some shine/reflection. Anyone have a perfect solution to this? (Cycles, and Eevee)? And using hdri.
Trying to work on a in door old factory scene, dirty, broken windows, with god rays, hdri from a sun light.
Old example, but now on a new project. Suppose to have broken, dirty windows. One side has broken windows. But when applied to windows (arrows), nothing. Here I used, HDRI with sun rays through glass.
Still trying, and such a headache, frustration. Needing shadow of broken, dirty on ground/wall, and showing windows dirty, broken with sun rays.
Use a glass mixed with a transparent shader. In my example I used a Gradient to drive the transparency. I’m sure you could use a gray scale image to do so as well. The white color of the transparency node determines how much transparency their is.
Mix a Glass Shader with a Transparent Shader and use a gray scale image to drive the transparency. Make sure that Screen Space Refractions is turned on for the material. Also you need to set blend and shadow mode to Alpha Hashed.
One thing, what is your sun lamp or light source size? You pretty much need a size 0 point/spot light for really small inconsistencies such as dirt to not be blurred out. You can see the blur size at the edge of the windows light cast on the floor.
This 1cm crack shows how depending on the distance from the crack/dirt it becomes difficult to see
There may be other issues as well, but this would impact it even if it is showing
You can put something in front of the window to cast rays and shadows, but not make it visible to the camera.
Thanks for the help. All night struggled and finally getting places. Image shows I am getting shadows from grime on windows. Not only that, but also color shadows. Window has some reflection. Rusty window frames will give brown grime on windows from rain, moist, age, etc. This is exactly I was going for. Image is using HDRI also a Sun light. Now to get dusty place with sun rays.
This is the Nod setup, but I am sure this can be done better. ColorRamp nod does amazement things.
.
Looking way better now that you got the glass fixed.