Black backface on 2 sided polygons

Hello everyone! I’m new to modeling/texturing for real time so I might be missing something…

Has anyone ever experienced the backface of a two-sided polygon to show completely black, and not rendering the material properly?

Is it black or completely absent?
Could you provide a repro in PlayGround?

Hey Andrey! Thank you very much for your quick response.

When I load the file to the sandbox, it is absent. But then I untick the “Backface Culling” under the Material properties and it shows up, completely black.

I’d love to share a repro of the issue on Playground, but unfortunately I still don’t know how to do it. Coming from a 3D for product vis background, this is still a new universe for me, still learning… Here’s a picture of the issue though, I hope it helps in the meantime. The black ribbons should be also textured silver. This is the back side of the polygons.

I have modeled this in Modo and have used Substance Painter for texturing. The GLB/GLTF was exported from Substance Painter as well.

This doc could help - Using External Assets In the Playground | Babylon.js Documentation
Would be great if you could share your model at Github or Dropbox so we may have a look.
I’ve never used Modo and don’t know how it deals with materials (which propreties, I believe, may be responsible for incorrect displaying in this case).

1 Like

Maybe the normals are wrong. Try to display them from the mesh inspector:

1 Like

Hello again @labris and @Evgeni_Popov and thank you very much for the help and suggestion.

About the Normals, since I’m new to working with 2-sided polys, I’m not sure if it should show the Normal pointing for both sides as well. All the ribbons show one correct side and one wrong (all black) side. You can rotte the model below to see it, after unticking “bakface culling” under the “Trofeu_Mat” material.

I’ve followed the doc that Andrey shared and I believe I got the model to show in the playground. Heres the link:

The problem is the ambient texture.

With the ambient texture:

Ambient texture removed:

Note: the ambient texture is the occlusion texture.

1 Like

I think people kinda missed your issue here.

The issue is that on ribbon polygon backfaces are black (image above), basically they receive no lighting. And normals should point only to one side of course. And that kinda explains why there is no lighting. Now I am not sure what solution for this would be (except to just create double sided ribbon in 3D software, or maybe some kind of custom shader). I think that environment map just doesn’t account backface of these ribbons, as normals are pointing to the other side. And as you have high metallic value, which is basically taking the light color and multiplying it with the object color (as metallic objects basically reflect the color of the light and we see them colored), and the backside of ribbons doesn’t get any lighting due to normals, they appear black.

In the image bellow, I set backfaceCulling to “false”, to show both sides of the polygon. I reduced environment texture level to 0, and set metallic to 0.

And you can see that both sides are rendered actually. So backfaceCulling = false is doing its job, but environment lighting are not getting to these backfaces. And, as I mentioned, I don’t have a solution, but I thought I should try to clarify a problem for someone who actually might.

1 Like

I did a test in 3dsMax, and exported the object with the material where “2-Sided” is checked kinda helps with the issue. If there is a similar option for you to test out, maybe it works for you too. .

1 Like

Hello @Evgeni_Popov and @nogalo, thank you very much for your help.

Yes, removing the ambient texture does help a lot, but for stylistic purposes (it will be a part of a pack of models) I may need to leave the AO on, or at least simulate the shading style somehow. I found this example on Sketchfab of the PL trophy with ribbons and it doesnt have baked AO:

I’ve noticed in this model, however, that it also have all the Normals of the ribbons pointing outwards. Because of the knot I’ve modeled on my ribbons, half of each ribbon end up pointing to the inside of the trophy’s handle.

When I exported from Modo, I made sure to check the 2-sided polys option.
I’ll try to flip the sides of the ribbons in a way that all normals point outside. I’ll also remove the metallic from them, since it seems to be adding to the problem.

I might have the time to modify the model only tonight, but I’ll post here as soon as I have the results of these tests. Once again, thank you very much for the suggestions and help Evgeni and Marko!

You should be able to keep AO in and disable Radiance occlusion on your material, I am pretty sure between double sided + AO, this might over darken some parts of your material.

1 Like

The problem here is with double-sided material.
I still cannot find any working example of double-sided material in GLTF inspite it is in the specs.

Adding @bghgary for a couple examples.

1 Like

Here are some unit test models you can look at:

The only sample model that I know of which uses double sided (in the model and not some text) is the tube in the Flight Helmet:

I’ve checked models from glTF-Asset-Generator/ at master · KhronosGroup/glTF-Asset-Generator · GitHub and didn’t notice any double-sidedness in them :frowning:
Meanwhile in C4D there is already an option “Double-sided” when exporting GLTF, but seems it have no effect for GLTF (native static render is OK).
Here are some tips how to make double-sided material in Blender - Double-Sided Materials – Blender Knowledgebase
But how to render double-sided materials in GLTF?

Maybe we are not on the same page for double-sided. I see the planes as double-sided.



What are you seeing?

I see the same but there is no double-sidedness here. At the back side I see mirroring texture, the same way as with usual material.
If the material would be double sided according to its definition (and how it is done in DCC tools), we could see a different texture (the second UV) at the other side of the plane.
Or, maybe, these definitions are different for DCC tools and GLTF format?

That’s not what double-sided means in glTF. Double-sided in glTF means the texture is shown in reverse (i.e., no backface culling) but with the normals flipped (sometimes this is called two-sided lighting).

1 Like

Thank you for clarification!

1 Like