armory3d / armortools

3D Content Creation Tools
https://armorpaint.org
Other
3.31k stars 338 forks source link

Importing .obj mesh with ngons crashes ArmorPaint #1724

Open Anthony-Gaudino opened 5 months ago

Anthony-Gaudino commented 5 months ago

ArmorPaint version: 23.08 tag

OS / GPU model: macOS 14.5 (23F79), M1 Pro

Issue description: Importing .obj files that have ngons might crash ArmorPaint or load the file incorrectly, with missing faces. To be fair other 3D software may fail too, for example FreeCAD imports the file, but broken, with missing faces. The .obj was exported from Blender, importing the .obj in blender happens flawlessly. Cad Assistant can also import the .obj flawlessly. Godot can import the .obj, but with geometry errors, it can import a glTF2 model perfectly. glTF2 seems to not be supported by ArmorPaint at the moment even with the plugin enabled.

To solve the problem while importing on ArmorPaint one might convert faces to triangles in Blender.

Steps to reproduce: Create a model in Blender that has multiple ngons. Export to .obj Try to import into ArmorPaint