More mesh formats for the VPS private Test Meshes

I tried scanning and uploading a private mesh using Wayfarer, everything worked fine but when I download the mesh the format is .drc (Draco)

This seems strange as it is not supported by Unity natively - where I assume most developers will be using ARDK.
Could we get the data as an OBJ with textures? of FBX? or even a GLTF?

I know there is a Unity Draco package but it just throws errors for me when I try it with the niantic mesh data
Draco.DracoNative.CreateMesh throws

ArgumentException: Invalid vertex attribute format+dimension value (UInt8 x 3, data size must be multiple of 4)`

Hello Matthew,

Yes, as you mentioned, a mesh for your Private VPS Location which you can use for development purposes in your Unity project would be provided in Draco format. You may need to convert from Draco format to OBJ format before importing it into Unity. Please refer to the developer documentation for more information.
There are a few tools available to convert .drc to .obj. Here is an example for your reference.

Also, I have passed your request for the data as an OBJ with textures, FBX, or a GLTF format to our internal team for consideration.
Appreciate your feedback.
Thank you.

1 Like

Thanks. btw will the meshes of the public waypoints every be available for download?

they would be very useful for occlusion, mesh effects, etc

1 Like

Absolutely this issue. The ONLY quick hits I’m finding on anything that supports Draco files with any degree of convenience are basically that one unlit adbloated web viewer/downloader (not great for private projects with assets under any degree of IP restriction) or making a DIY viewer project on some platform with an available conversion library.

There is a way to get Draco files into Unity directly, which is the route I ultimately found for my current project, but it’s more than a little convoluted.

  1. Google provides a Draco package for Unity on their github. Check the unity folder at GitHub - google/draco: Draco is a library for compressing and decompressing 3D geometric meshes and point clouds. It is intended to improve the storage and transmission of 3D graphics.
  2. Add ONLY the .cs script files and the appropriate library for your Editor platform to the specified locations (You may also need to restrict the library to be used only in editor; the first time I tried to use the Draco Unity package I pulled in the libraries for both my editor (DLL) and build (SO) platforms, with default settings, only to find that my Build button was stuck throwing a critical error before the build process even started, until I fully removed all the Draco elements and started fresh). Restart Unity.
  3. Rename your .drc files so they end in .bytes and place them specifically in Assets/Resources (no other location will work)
  4. If they don’t auto-import (as they probably won’t), right-click each .bytes file in the Editor and Reimport it. A prefab object and a mesh object will be generated.
  5. Open each prefab and find the corresponding Mesh Renderer(s). They probably will not have meshes assigned, and I’ve never seen one with a material assigned. Assign the corresponding imported mesh and a default material.
  6. Note that the mesh is now conditionally visible, if your camera is in exactly the right place, and there’s probably some Z-fighting going on. This is because the mesh seems to have Unity’s default bounding box, and the entire object will be clipped if that bounding box is sufficiently off-camera even if the geometry itself is on-camera.
  7. In the block around line 42 of Editor/DracoFileImporter.cs, add a couple lines to manually RecalculateBounds on each imported mesh:
    // Create mesh assets. Combine the smaller meshes to a single asset.
    // TODO: Figure out how to combine to an unseen object as .obj files.
    AssetDatabase.CreateAsset (meshes [0], "Assets/Resources/" + fileName + ".asset");
    meshes[0].RecalculateBounds();// <--- HERE
    AssetDatabase.SaveAssets ();
    for (int i = 1; i < meshes.Count; ++i) {
      meshes[i].RecalculateBounds();// <--- AND HERE
      AssetDatabase.AddObjectToAsset(meshes [i], meshes [0]);
      AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath (meshes [i]));
  1. Bomb out and reimport your .bytes assets, and re-doctor the prefabs. You can now, finally, view the meshes in Unity intuitively (although since I don’t 100% follow how the meshes are being assembled, particularly the inner workings of AddObjectToAsset, I won’t 100% swear the bounds fix will work for models of arbitrarily high complexity)
  2. Reopen your current scene to get rid of the random unlisted pink geometry that the importer caused to show up in it.

If you have any question/issues, please open a new topic on the Lightship Community Forum at: Lightship community.

@Matthew_Hudson @NNDev
I made a new thread about this which might be worth checking out


1 Like