Path finder glb convertToFlatShadedMesh() error

I’m using Babylon-navigation-mesh to perform a path finder … and it works fine when exporting from blender in .babylon but exporting .glb does not work.

specifically when using the function convertToFlatShadedMesh () the mesh is deformed, why does this happen?

this is blender :

This is exporting in .babylon

This is exporting in .glb

this one is for @MackeyK24

Interesting… gonna see what convert to flat shaded mesh actually does. I never used that function for my nav meshes… using both .babylon and .gltf files.

I’ll grt back to you when I find something out

1 Like

Yo @NeoAngel I don’t know how blender is making your nav mesh. But I don’t think you need to even use convert to flat shader… that function (I believe) is for flattening the normals. It’s probably more relevant when working with raw vertices …

In my case I get the triangles for the nav mesh and use a function to calculate the normals at design time when serializing the mesh to Babylon. Just use regular mesh normals. That’s works for me :blush:

Unless there is some special feature in the nav mesh API that needs you flatten the normals.

Why are you calling that function anyways ???

thanks … it’s true it was not necessary to convert to flat shader

1 Like