The normals have been recalculated to face outwards and look okay in Blender. If I use no material they look fine. If I use the PBR material with no textures it looks wrong. The normal map is in tangent space.
I tried reversing the normals and it looks much worse, so it’s not that.
Is there a way to make the material two-sided to get around this? What is likely to be wrong with it?
I’ve already tried that and it made it appear completely inverted. I’ve also verified that the normals all face the right direction before exporting it to GLB. This feels like a PBR material problem.
That did it! Between that and removing backface culling it’s helped a lot.
It looks like one of the original issues I had is caused by geometry/normal mirroring, so I’ll have to go back to the original geometry and keep the material two-sided in order for it to look right, but that definitely got me 99% of the way there. Thanks everyone!
Sorry I mean internal mirroring - there are mirrored, overlapping UV islands. Not my favourite optimization technique when it comes to normals. Once I restore the original unaligned normals it should be good now.
I guess the Y component of the normal map needs to be inverted some of the time. Going back to my mesh I finally found how to explicitly show normal facing in Blender and they’re all aligned and facing outwards. Any suggestions on how to improve this? I don’t really want to have to get these models all the way back into something like Substance Painter and re-unwrap, re-bake the texture then fix it by hand.
I could fix the Y orientation with an object space test in a custom webgl shader but then I’ll lose any PBR material and lighting support in the process making a normal map useless.
I’ve only just discovered that the node editor is a web-based tool today (before I didn’t have the foggiest clue for six months how to find it) and I’m told that it isn’t supported in Babylon 4.5, so probably no chance of using it.
I’m not baking the normal map, this asset is straight from a marketplace. I’m currently trying to project it into a non-overlapping UV layout in Substance Painter so I can fix it up manually but I’m not having much luck getting it to project between UV maps.