Issue with Objects Not Appearing Using Different Node Material Snippets

I’m encountering a peculiar issue with two Playgrounds where objects fail to appear in one. The PGs differ only in their Node Material snippets: I87P34 and I87P34#2. The first, using ‘I87P34’, functions correctly, but in the second, certain objects are invisible. My scene includes a Sphere as a skybox.

I suspect the problem relates to the NodeMaterial, potentially involving alpha or visibility settings. I’m looking for a solution that doesn’t require setting the renderingGroupId for each object.

PG1: https://www.babylonjs-playground.com/#8ZY2K9#1
PG2: https://www.babylonjs-playground.com/#8ZY2K9#2

Any suggestions?

Yes, your second node material has something connected to the FragmentOutput.a input, so it is considered transparent.

You can order the transparent meshes thanks to mesh.alphaIndex. By default, there’s a very big value in this property. So, if for the sphere you set a small value (like 0), it will be displayed before the plane:

1 Like

Thank you so much, I spent too much time on it!