Trying to re-create this in Node Material Editor

I don’t know if front facing is doing what I expect?
I am trying make it so it looks like fake liquid by cutting the mesh in half, have its back face showing, and color the backface a separate color.

basically Is there a way to just color the backface in the node material editor?

I am trying to re-create this https://i.imgur.com/CTSwHHv.png

https://nme.babylonjs.com/#D7FLLA

What you are doing is fine, the problem being that because you link the alpha input of the FragmentOutput block, the rendering system considers you want to display your object with transparency and so flag the object as “transparent”. It means it does not write to the depth buffer and because the faces are drawn in no particular order (in fact, they are drawn in their creation order), the display is all mixed up.

Instead, you should use the Discard block:

https://nme.babylonjs.com/#D7FLLA#2

This way, the object is not considered as transparent and is rendered with the depth buffer on.

2 Likes

thank you!

Sorry for necrobumping the thread, but has there been some changes in nme/engine that prevent the backface from showing up? Trying to recreate this effect as well and at least the latest nme by @Evgeni_Popov shows like this to me:
image
Should there been green “top”?

You have to enable “Render without back face culling” in the NME (button in the bottom right of the preview window):

2 Likes