Hi all,
I´m here regarding an issue with glass material in Path Tracing.
Let me explain my goal first so that you can better understand the issue. I am trying to prepare a Metahuman to be rendered in Path Tracing. Most of it works now out of the box, but the eyes change quite a lot from one renderer to another. The main feature that can be improved upon is the watery effect on the eye. While realtime metahuman has it, it´s almost non visible in path tracing and it does not use any refraction.
Real Time
Path Tracing
So my task was simple, just apply a water material to the geometry MH provides for the tearline in the eye. This is where I encountered some ugly artifacts.
I simplified the textures to make the error clear. You can see the glass/water geometry, the eye and the black areas.
At first I thought they were intersecting geometries. But I realized it shouldn´t be doing that anyway. It seems like there is some kind of milimetric occlusion going on.
Let me show you what is happening in here if we intersect a glass cube into the floor.
You can see that in the last moment, the glass turns black. It goes into that small distance that turns the glass back like in the eye. The distance seems to be around 0,004 UE units and I can´t find a way of making it just be 0.
More examples with a normal and a glass sphere
the more parallel the polygons are, the most visible the gap.
This is a big problem to create realistic eyes in Path tracing, the way we do in other offline renderers.
My glass shader is the most basic at the moment, in case you were wondering.
I tried touching almost any checkbox I could find, even the ones that didn´t make sense but couldn’t get rid of the effect. I tried light bounces, disabling occlusions, changing IOR values… Nothing changes this.
This picture shows the same intersection, this time the material does not have refraction, instead it’s 0,5 opaque. You can see there is still an artifact, but it’s not black.
Which means this must be happening all the time but we don´t notice it because we mostly work with opaque materials.
It seems that there is some kind of occlussion or shadow bias size that affects this that does not let the light go through really small gaps between geometries. Does anyone know if there is a fix or a command for this?
This is all 5.4, by the way.
Thanks!