# Path finder glb convertToFlatShadedMesh() error

**URL:** <https://forum.babylonjs.com/t/path-finder-glb-converttoflatshadedmesh-error/2820>\
**Category:** Questions\
**Created:** [April 27, 2019, 3:12pm UTC](https://forum.babylonjs.com/t/path-finder-glb-converttoflatshadedmesh-error/2820 "2019-04-27T15:12:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![NeoAngel](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/neoangel/32/1711_2.png) [@NeoAngel](https://forum.babylonjs.com/u/NeoAngel)\
**Post date:** [April 27, 2019, 3:12pm UTC](https://forum.babylonjs.com/t/path-finder-glb-converttoflatshadedmesh-error/2820/1 "2019-04-27T15:12:03Z")

</div>

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 :

 ![blender](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/4/4bd5d99316acb27c354e5856c5495fed0db66d45.jpeg)

This is exporting in .babylon

 ![babylon](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/6/6922e38b482c6a0e59fdc36ddacade55693c8153.png)

This is exporting in .glb

 ![gltf](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/d/d18f4eb088dfbe09edbc4ab49da2862e29f6fc02.png)

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [April 27, 2019, 5:00pm UTC](https://forum.babylonjs.com/t/path-finder-glb-converttoflatshadedmesh-error/2820/2 "2019-04-27T17:00:44Z")

</div>

this one is for @MackeyK24

---

<div class="post-metadata">

**Author:** ![MackeyK24](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mackeyk24/32/3741_2.png) [@MackeyK24](https://forum.babylonjs.com/u/MackeyK24)\
**Post date:** [April 27, 2019, 9:46pm UTC](https://forum.babylonjs.com/t/path-finder-glb-converttoflatshadedmesh-error/2820/3 "2019-04-27T21:46:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![MackeyK24](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mackeyk24/32/3741_2.png) [@MackeyK24](https://forum.babylonjs.com/u/MackeyK24)\
**Post date:** [April 28, 2019, 10:26am UTC](https://forum.babylonjs.com/t/path-finder-glb-converttoflatshadedmesh-error/2820/4 "2019-04-28T10:26:05Z")

</div>

> [@NeoAngel](#):
>
> convertToFlatShadedMesh

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 😊

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

Why are you calling that function anyways ???

---

<div class="post-metadata">

**Author:** ![NeoAngel](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/neoangel/32/1711_2.png) [@NeoAngel](https://forum.babylonjs.com/u/NeoAngel)\
**Post date:** [May 3, 2019, 6:32pm UTC](https://forum.babylonjs.com/t/path-finder-glb-converttoflatshadedmesh-error/2820/5 "2019-05-03T18:32:47Z")

</div>

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