How to create a glass shader into which light can pass?

Hi everybody,

I’m a beginner in 3D and I have some problem with blender 2.8 with a glass effect. It seems to be impossible to make a glass shader into wich a light can pass.

For example I have a oil lamp and I want to make a light into it and lit the rest of the scene like a flame.

I have tested some tutorials (with the Screen Space Refraction and all the good paramaters) and there is two problems. First my oil lamp don’t make a glass effect after the render. The second one, the light doesn’t seem to be into the lamp. The scene is lit outside from it. :pensive: (See the image)

I make a shader Emission to cheat with my little knowledge, but I définitly want a flame effect passing through the lamp !

You should use Cycles for glass stuff.

It looks like you need to change the blend mode of your material to alpha hashed:
image
Also take a look at this topic to achieve good looking glass materials in Eevee:

It’s hard to guess without seeing the scene but maybe your light is too big? Try to reduce the radius of the light.

Thanks everyone, I’ll try all the different propositions and publish as soon I can a new image. :wink:

In fact, i had a problem with the glass surface. I remade it and tested some effects like a fake flame. It’s not perfect right now but it seems to work with EEVEE.

Also if you use irradiance volume and reflection cubemap, then bake indirect lighting, the scene will look a lot better and closer to Cycles.

1 Like

Thanks again ! I’ll try this.

Right now, I looking for a good (and easy) tutorial for a candle flame effect with blender 2.8.

@filibis

can you elaborate on the Blend hash mode ?

is this for the glass ?
and is it for thick or single pan glass ?

did a test and cannot see light through the glass!

thanks
happy bl

More details about the Blend Modes are here:
https://docs.blender.org/manual/en/latest/render/eevee/materials/settings.html

Basically Alpha Blend modes are for transparent surfaces. You may also need to enable both “Screen Space Refraction” under material settings and “Refraction” under Screen Space Reflection settings:
https://docs.blender.org/manual/en/latest/render/eevee/render_settings/screen_space_reflections.html

I know for EEVEE

more talking about cycles
is there a way to make glass pass light rays ?

thanks
happy bl

I just posted this:


Light will pass if you enable caustics and render for long enough. That transparency trick is for when you don’t have caustics enabled (or helping it out). There is no way to render glass accurately using transparency shadow trick, and there may be cases where what I did will fail miserably. But that is the technique I rely on. Full transparency for all shadow looks just broken imo.