Irradiance Volume, Environment Map and Glass Transparency

Hi. I’m creating a scene in Blender 3.3.0 and using Eevee to render.

My glass material has the Principled BSDF shader and transmission set to 1. But when I bake the irradiance volume it stops the world environment map from showing through the glass. Instead it simply goes black.

Can someone tell me the cause? And perhaps a way to prevent it?

The glass will eventually be stained glass with warping, which is why I’m trying to use a glass material, rather than simple alpha transparency. I’ve tried looking for a way to have an object ignore an irradiance volume, but couldn’t find one.

Hi,

It’s not the irradiance volume that’s causing the issue. It’s the cubemap (irradiance probes aren’t applied to glossy component of materials). Baking irradiance bakes both irradiance volume and cubemaps (Bake indirect lighting button).

I think the issue is that cubemaps render glossy / specular objects as solid black, and refraction samples from cubemaps.

There are few options that came to mind, neither is a full fix:

Swap the material during bake with light path node

Exclude glass materials from cubemap bake via collections:

Overrall it’s odd behaviour, there might be some additional method that I’m overlooking atm to fix it.

Edit: This seems to be the issue that causes this behaviour:

Looks like the refraction ray doesn’t get tagged as hit when the ray hit would be the world cubemap and resorts to then using the interior cubemap as a fallback. Without modifing it, it will render glass as black when modified it will display interior as part of outside instead of sampling the world.

Even with the fix the behaviour isn’t correct. Might get around it with careful cubemap placement.

Edit2:
Something like this:


Box cubemaps and multiple irradiance volumes.

1 Like

Thank you very much for your reply, it was perfect. I tried both solutions, but excluding the glass from the cubemap seemed the best way to go. I wasn’t aware of the light path node, but it seems like an interesting node to play with.

I was also keen to find out what was causing the behaviour as well as fix, so I appreciate the follow up greatly.

Thanks again.

1 Like

OOOOhh can’t believe it finally i get it right thank you
(use the 2nd way)

1 Like