"OrderIndependentTransparency" crashes scene

Hello

I have the same issue as mentioned in this thread, but I’m unable to reproduce the exact error in a PG. Error when using use OrderIndependent Transparency

I did however manage to find the cause.
This material makes the scene crash whenever useOrderIndependentTransparency is enabled (Doubleclick the canvas to toggle)

1 Like

This PR will fix the problem:

2 Likes

Amazing!

1 Like

I’m not sure how I can test the PR, but will this also fix disappearing Node Materials?

Open the PR on github:

and you can test the snapshot build with the following link. Replace the PG ID with your one.

1 Like

Unfortunately, node materials don’t support sub-surface scattering, as this feature is too deeply integrated into the PBR shader code.

1 Like

Not referring to sub-surface scattering, but node material in general combined with orderIndependentTransparency – is that not supported?

Unfortunately no, node materials do’nt support OIT either at the time being.

1 Like

Noted, thanks!

What about this material:

Double click to toggle OIT, then uncomment line 24 and do it again

PBR materials with scattering enabled also do not work with OIT. I’m not sure if it’s possible to make them work together, cc @CraigFeldspar who will know better than me since he is the father of both features!

2 Likes

Yep, @Evgeni_Popov is right, the depth peeling feature, which is the underlying process to render OIT, is pretty straightforward, and do not handle well special features that need offscreen textures like subsurf scattering.
Supporting both is definitely possible, but I think we chose (few years ago already, time flies :slightly_smiling_face:) to wait for a whole revamp of the rendering pipeline to make it generic and avoid these endless if..else when making features compatible with each other.
Maybe with the new frame graph feature, the engine code would be now ready to rework these features ? WDYT @Evgeni_Popov ?

Excuse me,Dual Depth Peeling was good for OIT, but was too inefficient and couldn’t use MSAA(Fxaa didn’t work well). Is there a better plan at the moment?

Yes, I think we should be able to have another look at OIT once the frame graph is fully ready and integrated into Babylon. Stay tuned!

Hi again,

The PR fixed our initial problem, but it changed the looks of our other materials quite a lot

Before:

After:

I am not sure which one is “correct”

The difference is due to PBR: Fix diffuse transmission by Popov72 · Pull Request #16337 · BabylonJS/Babylon.js · GitHub, which is a bug fix. But as this can change the output, I have updated the “breaking change” section in the documentation: