0
$\begingroup$

My workflow for producing glTF file involves importing my OBJ file into blender. Tweaking things then exporting it from blender as an glTF.

After import blender shows that the old python OBJ importer and the new C++ OBJ importer produce a mesh with exactly the same number of vertices/edges/polygons:

image showing the number of vertices of old to new import

When I then export it as a glTF file the new import version's binary file is almost double in size and taking it into a viewer shows the vertex count is almost double for most primitives.

showing higher vertex count with new import

I'm guessing the issue is that the internal indexing or storage of the newly imported object causes a less efficient output with the glTF so for now I always have to use the legacy importer but this isn't ideal.

Can anyone suggest what might be different with the new importer to account for this, or what might be changed in the exporter to fix this?

$\endgroup$
2
  • $\begingroup$ There are no developers here, nor does anyone here have any association with the Blender Foundation. I suggest you report that as a bug via Blender's Help > Report a Bug menu. $\endgroup$
    – John Eason
    Commented Jul 4, 2023 at 13:49
  • 1
    $\begingroup$ tl;dr – the new importer might be handling normals or UVs differently than the old one, requiring more vertices to export to glTF (and to render in any graphics API). Try disabling export for any vertex attributes you don't need, particularly normals and UVs. $\endgroup$ Commented Jul 5, 2023 at 15:48

0

Browse other questions tagged .