I'm trying to get fragment data using the VRAR Toolkit API so that we can make some optimizations to the mesh data. We can create a scene, process the SVF into toolkit scene, and scene process finishes, but we're having issues when we actually have to get the fragment data.
Using the following endpoint:
https://developer-api.autodesk.io/modelderivative/v2/arkit/MODEL_URN/mesh/MESH_ID/FRAG_ID
Returns a 200 with an octet-stream, but I can't find any documentation as to what the contents of the octet-stream are. According to the documentation (https://app.swaggerhub.com/apis/cyrillef/forge-ar_kit/1.2.1#/ARVR-Toolkit/get_asset_fragment) we can specify whether to use legacy
or openctm
.
1) What is the legacy format? How can verts, normals, uv, etc. be extracted?
2) I tried the openctm option and saved the returned octet-stream to a .ctm file and tried opening in the OpenCTM Viewer available from (http://openctm.sourceforge.net/) but always get CTM_BAD_FORMAT error when trying to open the file for viewing. How can I confirm my openctm payload is correct?
The SVF format (including the mesh data format) isn't publicly documented but you can get some idea about its structure from the AR/VR Toolkit's Unity package source code: https://github.com/wallabyway/ARVRToolkit/blob/master/unity-src/ARVRToolkit/Assets/Forge/ARKit/MeshRequest.cs#L54-L89.