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.
Can you share the model or repro in a playground? Hard to tell what is going on with just the screenshots.
Hey Gary, I’m the fellow working with OP who made the models. 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.
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.
Never mind, you are not exporting .babylon format. Split edge modifiers should work there also. Set the entire mesh smooth, and add modifier.
This looks like a bug in the obj loader. Can you file a bug on GitHub?
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.
You should be able to get what you need by calling this before loading the obj file
BABYLON.OBJFileLoader.OPTIMIZE_WITH_UV = true
“BABYLON.OBJFileLoader.OPTIMIZE_WITH_UV = true” - Worked like a charm!
Yeah this is what I had thought as well, was hoping it would be a line of code fix… and it was , how rare!
This is the power of Babylon.js