How can I fix these refraction artifacts ?

Hi,

I made a basic refraction glass material, following the example in UE4 documentation (fresnel, lerp between 1 and 1.5, normal map).
I put it on a plane.
I put Robert the Robot near my plane and I get this:

As you can see, the robot’s silhouette is drawing, duplicated, on the panel, disturbing refraction.
Same thing if I disconnect the normal map.
Same thing if I try to tweak parameters (IOR, fresnel node parameters, any parameter on the material).

The nearer meshes are from the plane, the stronger the artifact is.
I suppose it’s a well known problem but is there a way to get rid of this?

1.5 is too much for max refraction. Try 1.1 or less, and tweak Refraction Depth Bias value(in material editor Details panel.)

1 Like

Thanks.
How much am I supposed to increase Depth Bias? I tried several values between 0.1 to 20, and I see no real difference.

Many games has this “reflection” problem.

No idea how to fix this :/.

Yes, good catch!
I’ve seen this video but didn’t notice it.
Depending on how you use refraction, it can be a brief artifact, like in this shot
and then it’s not really a problem. The player doesn’t care.

The picture of the Kite demo shows a different problem than what EdWasHere described. It’s a limitation of the screen space reflection technique and has nothing to do with refraction. Unfortunately there is no way around it as of now.

The most disturbing thing about this “glitch” is the weird reflection in border of the screen on a huge reflective surface (in this case “water”).

You can also see this on KiteDemo video and ARK trailer.

@The_distiller:

Yes, in fact, i think that’s it. Refraction is not exactly disturbed this way, actors in front of a refractive surface don’t add color. At least, I never noticed such a thing.

@ ExpMini:

What if you increase the FOV (or decrease? I don’t know. I mean zooming a bit) to exclude these borders? Is it “FOV independant”?

I was asking about these refraction artifacts because, extending the possible uses of a post process material i’m working on to fake a blurring glass material, I found out that I could use it
to remove them. But as my setup is a bit expensive in terms of performance cost, I was wondering if you could make it in a simpler and cheaper way.

Unfortunately, change the FOV is not the solution, we could maybe render something more “wide” and zoom in, but, I don’t really like this solution.

Bias value of 5 or 10 should help reduce the artifact but yeah, i doubt that you’ll be able to remove it all together.

Did you find any solution? Got the same artifact and this is the only post I can find adressing the issue.

I am also experiencing this issue in 5.03, no luck finding a solution

I’m struggling to progress with my VR project for the same reason and I can’t find anything online, I’d like to know why objects in front of a refracted surface are getting distorted by the refraction bellow, it’s ruining the experience and I’m starting to lose hope

I believe this is because refraction in UE is a screen space effect. This problem occurs with screen space reflections as well. I’d love to fix this too, perhaps doing some trickery with a depth pass can help but I have no idea how to approach this. Please let me know if you find something that helps!

1 Like

Did you manage to fix this?

The fix is to use raytraced refraction. It’s a limitation of screen space techniques. The refracted ray hit a spot where there is no background information because it is obscured by a foreground object. You can also use cubemaps to fake refraction but that has its own issues although it doesn’t have this problem.

I did not unfortunately, using darker colors on objects close to the refracting surface makes it less noticeable