Transparent backgrounds through glassy materials

I was just wondering, I know there’s a way to get a transparent background, but I don’t know how to do so when I’m dealing with glass. I keep getting a result similar to this whenever I try to render it out


It also happens when it involves the door here, the gap between the door and body is transparent, but the glass still renders out the background. There any way to fix this issue?

Come on… This has been asked a gazillion times before.
Any refractive shader will render opaque in Cycles. Use a transparent/glossy mix instead.

So are you saying that you unchecked the visible to camera for the background but it still renders in the glass? Usually this happens with specular materials as well. But just trying to clarify first.

Not sure how you go about doing that, but I checked the “transparent background” option before I rendered out the example pic.

It’s supposed to be a transparent material though. I’m not sure exactly how doing it with a transparent/glossy mixed node will make it look better.

Glass has three major characteristics: You can see through it (transparency), it changes the direction of light rays as they travel through it (refraction) and it reflects incoming light rays to a certain degree (glossiness).

As I already said, you can’t use any refractive shader in your example as it renders opaque in Cycles. That means the Glass shader is out. The Refraction shader as well. And also the Principled shader with an IOR <> 1.

So, your only option is to use a material that replicates at least two of the three characteristics of glass: And that is a Transparent shader plus a sharp Glossy shader, mixed e.g. by using Fresnel or Layer Weight > Facing as mixing factor.

Using just a Transparent shader would mean that you could as well delete the entire windshield/window pane, as it would be invisible anyway. And there is one thing that a glass pane is not: Invisible. Clear now?

What IkariShinji said. Due to refraction you won’t see directly through transparent object unless it is very thin or has IOR of 1.0, so to prevent false results in compositing, materials with refraction are rendered with solid alpha so thay you see what was refracted, not what is directly behind them. The Transparent shader does not have refraction, so for that it is ok to see straight through and have transparency expressed on alpha channel.