Weird angle based flickering/occllusion on transparent glass material

So i’m having this weird Occlusion effect on my glass material that is affecting diffuse and specular outputs. In the video the opacity is set to 1 to amplify this effect but at low opicaty it’s harder to notice. What could be causing this and what are some ideas i could remedy this with?

I don’t mind the specular occlusion but when i had the alpha set to 0.2 it was really apparent that it was affecting the shading and very visually jarring.

What i’ve tried:

  • Less Lights (It happens with any number of lights)
  • Less Objects
  • Double checking model/texture/material normals
  • Changing camera near/far planes
  • Changing object size, I.E. each plane of glas was a seperate plane, now they are all one mesh.
  • A few other but can’t think of
    Here is My Material

And here is my light layout (The red is where the lights are, the blue is where the video was showing)

Here is the video

I think it might be an issue with culling that was batching transparent materials and causing flickering with multiple different lights or env probes.

What version are you in? Is it Flax 1.10? Or daily master branch? I think we got this fixed on 1.11 branch

I’m on the master branch, I’ll see if I can build the 1.11 repo and see what happens.
Thank you.

Update: So it’s partially fixed. I can tell that there’s more lighting on diffuse and spec reflections, however, it seems to be intermittent. Seems to be mainly when lights are overlapping in close proximity, but when there’s more than 4? (Is this a hardcoded limit? if so, then it’s working as intended)

In This video:

  • 4 lights in close prox. When one is duplicated, one goes away.
  • Keep duping and some lights are occluded based on object relativity. (The wall is made up of 6, wide mesh walls with the glass material applied in a 2x3 Grid)
  • Smaller light radius isn’t contributing to occluding?

I’m glad it’s fixed. There is hardcoded limit of max 4 local lights in transparent materials. They are selected based on shortest distance to the object origin.

I’ll make it customizable option in material properties so in this case you can make it larger to support more complex scenes. In future, we will likely migrate to more optimal light culling on GPU with per-pixel support for any amount of lights in transparency.

I see, With how the engine looks i already thought it was per-pixel. Okay, that explains a bit. I can work with that though.

Thank you for the hard work ya’ll put in with the engine and responding on the forums/disc.