ModelIO - Accessing original Obj data

Hi Devs,

I have been trying to access the original obj data from an asset I loaded in using ModelIO.

I import the asset using the MDLAsset(url: vertexDescriptor: bufferAllocator: preserveTopology: error:)

I set preserve topology to true, which from my understanding should keep all the data consistent with the original.

My question is how does one correlate the submesh face data to the vertex data and the index data?

I have read the documents which mention you should use the order of the faceTopologyBuffer, which will result in a 3D object that does look correct but all the points have unique vertices (non welded edges).

I can make an assumption and loop over all the vertices and remove any duplicates, there by creating my own index buffer, but that would create an assumption that all faces have been welded which is also not correct.

Is there a way to get the original data out of MDLAsset, or should I look to other avenues like assimp?

Thank you for the help,

Simon

ModelIO - Accessing original Obj data
 
 
Q