unity-game-enginegoogle-project-tango

How do I export Point Cloud Data (Project Tango) in Unity3D?


As show in the topic, how do I export Point Cloud Data in apk created by Unity3D? And how can I use these data to creat 3D mesh or model in Unity3D?


Solution

  • Create a 3D mesh or model with Tango in Unity3D

    There is an example scene in the Unity Tango SDK that enables you to acquire and export a colored mesh directly in the apk app. Look at Assets\TangoSDK\Examples\Scenes\ExperimentalMeshBuilderWithColor.unity.

    Export Point Cloud Data in apk

    I don't think there is a function in the SDK that does that directly, but have a look to the following script : Assets\TangoSDK\Examples\Common\Scripts\TangoDynamicMesh.cs and more precisely the function public void ExportMeshToObj(string filepath) that exports a TangoDynamicMesh to an OBJ file format.

    You could create a similar script that gets values from TangoPointCloud.m_mesh instead of a TangoDynamicMesh to export your pointcloud as an OBJ file.

    Have also a look at this question: How do I export Point Cloud Data (Project Tango)

    Create a mesh from 3D points in Unity

    Creating a mesh from 3D points is not that easy and there is no straightforward way to do it in Unity. From an exported OBJ point cloud, you can use external tools like the Point Cloud Library or Meshlab.