I’ve been investigating why a model in Blender with a x-number of vertices is exported with ~4 times as many verts.
For example, a default sphere has 482 verts but when exported there’s 1984 verts.
And I found a problem in decompose.py, line 1777:
tVertexIndex = None
for j in verticesMapList:
if verticesList[j].isEqual(tVertex):
tVertexIndex = j
break
Debugging this, the size of verticesMapList is always 0 (empty), hence, will generate new verts for every face instead of reusing previously stored vert info.
I’ve changed this to:
tVertexIndex = None
iIterator = 0
for j in verticesList:
if j.blenderIndex == tVertex.blenderIndex:
#if j.isEqual(tVertex):
tVertexIndex = iIterator
break
else:
iIterator += 1
And the number of verts exported from this routine is = 482, exactly what Blender shows. The exported sphere model renders correctly. Consequently, there is no longer a duplicate verts issue when using a model with softbody.
I don’t have a skinned model to test the exporter, but I’m curious as to whether this change will break it.