Transparent Material Clipping (or how is this called)

Hi everyone,

I’m curious about what exactly is happening here. When i rotate the arc camera this happens:

On a certain alpha of the camera the meshes inside the machine ignore the glass.
As there’s a NDA for this project I’m not able to create a playground demo unfortunately :frowning_face:

How is this “bug” or side effect called? And do you have any idea on what could cause this?

Thanks a lot!
Robin

I think it’s because for some angles the door is drawn before the objects that seem to pop up, hence there’s is no blending between the door and those objects.

In Babylon, the transparent objects are drawn after all the opaque objects, so I would guess that your door is not flagged as transparent or the other objects are also flagged as transparent?

A quick fix is to put the door in a higher rendering group than the other objects so that it is always displayed last, but as said above, I think the right way is to have the transparent flag set to the right objects and that should normally fix the problem.

2 Likes

Yep, alpha can be a pain in the ass in realtime. You can read some tips here: Transparency and How Meshes Are Rendered - Babylon.js Documentation

This reminds me of a probable feature request: how would it be difficult to implement OIT (Order-independent transparency) on our beloved BabylonJS? (webGL example, Lumberyard example) (pinging @Deltakosh who love new challenges :smiley: )

4 Likes