Eevee refraction

Greetings, people!

In this image, the back object is not being refracted on the first one. I’ve seen videos in which two refracting objects are in front of each other (like the headlight of the vehicle in this Eevee video:

Is there anyway to fix (or fake) this kind of refractions in Eevee? Thanks in advance!

Hi, no need to fake, there are “real” refractions enabling screen space refractions both in material and render tab.

Thanks, for the answer.

At the Render tab, I activated “Screen Space Reflections”, and inside it “Refraction”.

At the object tab, this is my setup:

Blend mode: alpha blend
Transparent shadow: Hashed
Refraction depth: 5m (changed it, refractions look different, but still the back object doesn’t show).

Material is just a glass shader.

What could I be missing?

I think you have to use a refraction shader instead of glass (or mix)

I changed the glass to just a refraction shader. Same problem. :frowning:

Alpha add? Else, i’ll try tomorrow

Glass or Principled (Transmission) both work.

Alpha doesn’t affect refraction itself, you can just use “Opaque”. If you want to use Alpha because of transparent shadows, use “Alpha Hashed”, not “Alpha Blend” (it is glitchy because Blender doesn’t sort faces).

This setting is meant to approximate “double refraction”, set it to zero. A value of 5m will clip anything that’s five meters beyond your object. That should be your problem.

Thanks for your support, BeerBaron, but still no success. These are my settings.

I’m attaching the file…untitled.blend (163.4 KB)

BTW, is there already any manual of the Eevee new features, or at least a decent video tutorial teaching these refraction and reflection settings?

Actually I think your setup was good, sounds like a bug with back suzanne material. When we change back suzanne it seems to work: .

Yes, refractions work. What I’m curious is if it’s possible to make one refractive object behind another refractive object. In the video I posted, the headlights of the vehicle (made in Eevee) have two glass objects, one behind the other, and refractions work fine in it. How can I achieve that?

I don’t think so, at least not reliably and efficiently. This is one of the limitations of rasterization. Even the refraction you have right now is not correct, as the back faces are not taken into account. To do this properly, you need raytracing.

1 Like

if you disable screen space refractions on the rear object you can get it to work:



SterlingRoth, indeed it works if I remove screen space refractions on the rear object. Now I’m curious how your rear object has no screen space refraction and still I can see the refractions of the background photo.

Refractions on the background always work, because it’s just a texture that can be sampled at any point in time.

For refractions on scene objects to work, first the objects need to be rendered, then refractions can be sampled from that. Hence you need to first draw all non-screen-space-refracting objects, then the screen-space-refracting ones.

It would be possible (in theory) to draw refracting objects one after another to have “nested” refraction (which would still break down e.g. for interlocking objects). I’m not aware of Blender enabling artists to have that kind of control, however.


OK, people, thanks a lot for the info! :slight_smile:

Hi All,
I join this conversation because on 2.8 Alpha 2 still no solution on this problem.
Also unchecking Screen Space Refraction on red glass.

Hope this could help developers. Cheers.

Hmmm i’m thinking. Are light probes a good candidate to simulate (because EEVEE is mainly that) those effects ?

Basically it would use a pre-calculated texture and deform/bend it upon the refraction.

It can’t be difficult to preview with many probes but in the end i think it’s more to get a final accurate render result than previewing.

The thing is to associate the light probe with a single object. I’m no pro in blender, and 2.80b is new to me. I understand that it’s not possible at the moment but i think it would be probably achievable.

That would exclude game engine rendering. So there would be EEVEE for static render and EEVEE for the game way of doing things. To me it’ll be ok.

fuckin true!