Help with 2.8 Cycles Reflections in Architectural Glass

Had this problem in the latest Weekend Challenge – fixed a bit by adding some Metallic but I’m trying to find the right way to do it. Six individual planes in a box shape, a small sphere inside, two checkerboard planes outside, all normals facing the camera, two point lights. The box’s planes are all Transmission: 1 and IOR: 0 (because it’s simple window glass). What I’m trying for is the box’s front panes reflecting what’s outside the box enough to see it but not so much that the interior is obscured, and what’s inside the box reflecting off the back planes enough to see those reflections but not so much that what’s outside the box is obscured. But what’s happening is the planes reflecting what’s outside the box so strongly that what’s inside can’t be seen.

ReflectionTestCycles003.blend (719.1 KB)

What am I missing?

Something like that is what I’m trying for, but I got it by layering three renders in GIMP. This is what I’m getting:

Your IOR is set to zero. IOR of glass is something just over 1.45.

1 Like

The Index of Refraction of architectural glass / window glass is effectively the same as air, so I set the IOR to 0. But writing that I realized I hadn’t checked the IOR of air – the IOR of air isn’t zero, it’s one (1.0003). :flushed: Setting the IOR to 1 fixed the issue, thanks!

ReflectionTestCycles005.blend (738.9 KB)

Edited to add: Darn it, no it didn’t – I had Metallic set to 0.23, that’s where the reflections came from. Without it there’s no reflections, even though there should be. :rage: Still looking for help on this.

When we talk about “Architectural Glass” we mean fake glass that doesn’t do any refraction. So you wouldn’t use glass shader or refraction+glossy, but instead transparency+glossy, controlled with either fresnel or a curved layer weight. Using layer weight is safe but not as accurate as fresnel. But fresnel will cause IOR to be inverted for the backfacing faces, and you’ll have to pre-invert them. If you rely on refraction based glass, glass is transparent to camera rays, opaque to light rays, so you’ll need to use transparency shader for shadow handling unless you do caustics. Also, for regular glass (not architectural), make a regular box object with normals pointing outward. If you want air inside a glass box (walled glass box you can put something inside, like an aquarium), real glass can help (but has shadow issue which can be more tricky than a simple plane) at the cost of speed, since you will get effects like total internal reflections etc.

1 Like

What brought this up was air and a tree inside a glass box like a terrarium – I wanted the outside of the glass box to reflect the surrounding landscape while the inside reflected the tree. Although that issue’s solved (see my previous post) your solution might be better – would you please post an example?

Darn it, no it didn’t – I had Metallic set to 0.23, that’s where the reflections came from. Without it there’s no reflections, even though there should be. :rage: Still looking for help on this.

try with a solidify modifier on the cube, at a very low thickness

2 Likes

Still using the Principled node???
As CarlG said, it’s better to use Transparent+Glossy with a Fresnel mix factor with backface fix.

1 Like

That worked once I’d put the IOR back to 1.45, essentially simulating a box made out of glass panes. Thanks!

Thanks for posting the node tree! I’ll try that later.

No. At fresnel 1 there should be no reflections at all. I.e. diamond is called a brilliant material because of its high IOR causing lots of reflections. Dense transmissive materials are harder to look through, increasing its reflections. Interfaces between same materials have no reflections. It’s called index matching - see here for example of this - can you spot the gem? :slight_smile:

Secrop already posted an example. Using RBG mix node (or a custom fLerp node group) can make it a bit simpler, but the end result it the same. Make sure to preview the fresnel node on a plane from both sides with and without the fix going into it, to understand what is going on.

Note that you only need this for “accuracy” - if you want to simplify you should use regular layer weight/facing into a curve shaped as a fresnel curve response. Layer weight/facing doesn’t do any “IOR inverting” because it doesn’t have anything to do with IOR. Layer weight/fresnel will need it though.

1 Like

I didn’t do much with material nodes before the Principled BDSF came out, so most of this is quite a stretch for me and I don’t understand much of what you’re saying.

Here’s a render of my testscene using the node setup that Secrop posted:

For comparison here’s a render of Botoni’s suggestion of using a solidify modifier with the Principled BDSF:

Both give good results, just what I’m looking for. Tried them on the scene that I was having trouble with earlier, starting with the node setup that Secrop posted:

And a solidify modifier with the Principled BDSF:

For this I’m happier with Secrop’s nodes, IMHO the Solidified/Principled glass effect is too complicated for the low-poly style of the scene.

Would like to try it, but without a blend file or node screenshot to work from I’ve little idea how. Regardless, you, Secrop, and Botoni have solved my problem – much appreciated!


Left one uses the IOR fix for backfacing. Right is standard fresnel.
You could tune the curve to approximate the fresnel output and not bother with the IOR fix.
Curve is not tweaked but give the general idea of the shape.