I’m trying to create a fake glass material for a more complex scene I’m working on. My scene has large glass windows and a sun lamp, with the sun pointed towards the windows, so lots of sunlight should be entering the room. When I use a pure transparent material, it looks great. Here’s from an earlier render (many materials still unfinished)
there you can see the sunlight hitting the floor and even reflecting off the floor and hitting the ceiling. Still a bit grainy even with the maximum number of samples, but it looks okay.
After some more work on the scene I decided to try using real glass for the windows, with the same number of samples, and I got this:
The caustics from the chandelier didn’t pose too much of a problem, probably because of their relative size and distance to the rest of the scene, but the caustics from the sun looked terrible. While reflections can’t be seen from this angle, reflective glass does affect the way light bounces around the room, and I may want to produce HDR tonemapped images of the room later, which will make reflections show up a lot better.
So I decided to make a fake glass material, which would produce the same transparent shadows as the transparent material, but also produce the reflections of the glass. I did it by using a mix shader to combine a transparent shader with a glossy shader, using a fresnel node set to the same IOR as glass as the mix factor. This produced a weird artifact. Adjusting the roughness of the glass doesn’t appear to change the dark artifact. Changing the IOR does, and applying the same mix with a diffuse instead of transparent also looks fine, so it must be the transparent shader that’s mesing things up here. Here’s a look at my render + nodes
Anybody have a clue what’s going wrong here and some way to fix it? I also tried a glass material with light paths shadow mixing factor for transparent shadows, which gave me the shadows I wanted but refractive caustics were still shining through. This would be okay if I disabled refractive caustics, but I want to keep the real glass material and caustics from the chandelier in my scene, so it’s not ideal.