Glass is NOT Transparent in Cycles with Transparent Background and HDR Lighting
Closed, InvalidPublic

Description

When using Cycles with HDR lighting and transparent background (Render -> Film -> Transparent), materials like glass will render with no transparency and will show the HDR image through the glass object. I did the exact same thing inside Blender Internal and the glass object will keep it's transparency and it will only render the influence of the HDR image.

--- Operating System, Graphics card ---
Windows 7 Ultimate x64

--- Blender version with error, and version that worked ---
Blender 2.67. It has never worked.

--- Short description of error ---
Glass is NOT Transparent in Cycles with Transparent Background and HDR Lighting

--- Steps for others to reproduce the error (preferably based on attached .blend file) ---
Open the attached Blend file. It will open in Compositing layout. There are two render layers which belong to two scenes. Top render layer node is Blender Internal and Bottom one is Cycles. Hit render for both render layers and see the difference. Blender Internal renders glass with transparency with only the influence of the HDR image. Cycles will render wrong and show the HDR image through the glass (no transparency).

There is one blend file and one image comparison to easily see the difference.

Details

Type
Bug

This was a design choice, not a bug. The rule in Cycles is to render the Transparent BSDF transparent, and the Glass BSDF not. It's impossible to represent refraction with an alpha channel, the light rays change direction and compositing it afterwards will not give the same result as rendering. What to consider transparent then and what not is ill defined especially in when considering full global illumination instead of just direct lighting.

http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/Shaders#Transparent
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Light_Paths#Transparency

If you want to have a material similar to the Blender internal one it can be created by adding a Glossy and Transparent BSDF.

That is fine if it's a design choice but it's in conflict with Render -> Film -> Transparent which means only render the influence of the HDR cuz the HDR is showing through the glass.

I've tried other raytracing render engines like mental ray and Keyshot's default render and if transparent background is enabled, they will actually render the glass transparent. This is usually used when doing product viz with HDR.

Thanks for explanation.

I hope some day it will change, 'cause it would be very useful.

Yea, especially for product visualization, transparent glass is VERY useful! Oh well!