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

1 Like

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: )

5 Likes

I think I am also struggling with same issue. Any solution for this issue?

I’m wondering how many times this page of the doc has been read. You can put in a hundred times just for me;)

Why not :slight_smile: this is totally something we can try to add

2 Likes