# Model import issues

**URL:** <https://forum.babylonjs.com/t/model-import-issues/5593>\
**Category:** Questions\
**Created:** [September 12, 2019, 1:48am UTC](https://forum.babylonjs.com/t/model-import-issues/5593 "2019-09-12T01:48:31Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![i73](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/i73/32/3167_2.png) [@i73](https://forum.babylonjs.com/u/i73)\
**Post date:** [September 12, 2019, 1:48am UTC](https://forum.babylonjs.com/t/model-import-issues/5593/1 "2019-09-12T01:48:31Z")

</div>

Is it possible to import an object with smooth shading without it merging the split UV maps as seen in the picture above, both are UV mapped identically but the latter has smooth shading, windows model viewer and Blender display properly but Babylon is merging the split UV’s it seems.

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/9/95afff3a54b4c43ff256f89b16f9d6aef3a04052.jpeg)

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/3/3e513be4d4a03cfe2fba0001350c651e91aca831.jpeg)

---

<div class="post-metadata">

**Author:** ![bghgary](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bghgary/32/48532_2.png) [@bghgary](https://forum.babylonjs.com/u/bghgary)\
**Post date:** [September 12, 2019, 4:20pm UTC](https://forum.babylonjs.com/t/model-import-issues/5593/2 "2019-09-12T16:20:40Z")

</div>

Can you share the model or repro in a playground? Hard to tell what is going on with just the screenshots.

---

<div class="post-metadata">

**Author:** ![J\_G](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/j_g/32/4580_2.png) [@J\_G](https://forum.babylonjs.com/u/J_G)\
**Post date:** [September 23, 2019, 7:27pm UTC](https://forum.babylonjs.com/t/model-import-issues/5593/4 "2019-09-23T19:27:02Z")

</div>

Hey Gary, I’m the fellow working with OP who made the models. [https://puu.sh/Ekx4J/8f54cb3c1f.zip](https://puu.sh/Ekx4J/8f54cb3c1f.zip) . If you load the models in the default windows viewer, or in Blender, the UV’s should be identical, with the smoothing groups the only difference between them. cube\_smooth has it’s UV’s merged along the split edge only in this smooth version of the mode. Is there something we are doing wrong when importing as when using other model viewers the cube\_smooth shows identical UV mapping.

---

<div class="post-metadata">

**Author:** ![JCPalmer](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jcpalmer/32/42_2.png) [@JCPalmer](https://forum.babylonjs.com/u/JCPalmer)\
**Post date:** [September 23, 2019, 7:47pm UTC](https://forum.babylonjs.com/t/model-import-issues/5593/5 "2019-09-23T19:47:08Z")

</div>

This is the first I have seen of this. You can export faces as they exist in Blender. To change an entire mesh from one to the other, right click the mesh in Object mode, and select either `Shade Flat` or `Shade Smooth` off the menu.

Looks like it is wanted to do both in the same mesh. You do that by entering edit mode. You must also be in `Face select` not vertex or edge. Select the faces which you wish switch, right click, & pick the appropriate menu item.

Also, from this example, you might want to convert quads to tris.

---

<div class="post-metadata">

**Author:** ![JCPalmer](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jcpalmer/32/42_2.png) [@JCPalmer](https://forum.babylonjs.com/u/JCPalmer)\
**Post date:** [September 23, 2019, 7:54pm UTC](https://forum.babylonjs.com/t/model-import-issues/5593/6 "2019-09-23T19:54:08Z")

</div>

Never mind, you are not exporting .babylon format. Split edge modifiers should work there also. Set the entire mesh smooth, and add modifier.

---

<div class="post-metadata">

**Author:** ![bghgary](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bghgary/32/48532_2.png) [@bghgary](https://forum.babylonjs.com/u/bghgary)\
**Post date:** [September 24, 2019, 12:56am UTC](https://forum.babylonjs.com/t/model-import-issues/5593/7 "2019-09-24T00:56:34Z")

</div>

This looks like a bug in the obj loader. Can you file a bug on GitHub?

---

<div class="post-metadata">

**Author:** ![bghgary](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bghgary/32/48532_2.png) [@bghgary](https://forum.babylonjs.com/u/bghgary)\
**Post date:** [September 24, 2019, 12:57am UTC](https://forum.babylonjs.com/t/model-import-issues/5593/8 "2019-09-24T00:57:54Z")

</div>

Note that the UVs are not the same between the two models as the vertices have to be split differently. I suspect that’s where the bug is.

---

<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:** [September 24, 2019, 10:14pm UTC](https://forum.babylonjs.com/t/model-import-issues/5593/9 "2019-09-24T22:14:14Z")

</div>

You should be able to get what you need by calling this before loading the obj file

```auto
BABYLON.OBJFileLoader.OPTIMIZE_WITH_UV = true

```

---

<div class="post-metadata">

**Author:** ![J\_G](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/j_g/32/4580_2.png) [@J\_G](https://forum.babylonjs.com/u/J_G)\
**Post date:** [September 24, 2019, 11:25pm UTC](https://forum.babylonjs.com/t/model-import-issues/5593/10 "2019-09-24T23:25:42Z")

</div>

“BABYLON.OBJFileLoader.OPTIMIZE\_WITH\_UV = true” - Worked like a charm!

---

<div class="post-metadata">

**Author:** ![J\_G](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/j_g/32/4580_2.png) [@J\_G](https://forum.babylonjs.com/u/J_G)\
**Post date:** [September 24, 2019, 11:27pm UTC](https://forum.babylonjs.com/t/model-import-issues/5593/11 "2019-09-24T23:27:10Z")

</div>

Yeah this is what I had thought as well, was hoping it would be a line of code fix… and it was 😛 , how rare!

---

<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:** [September 25, 2019, 3:44pm UTC](https://forum.babylonjs.com/t/model-import-issues/5593/12 "2019-09-25T15:44:38Z")

</div>

This is the power of Babylon.js 😉
