Is there any way to export scans I made with the Example app named "Scanning"?

Include the following details (edit as applicable):

  • Issue category: Scanning
  • Device type & OS version: Android
  • Host machine & OS version: Windows
  • Issue Environment : On Device
  • ARDK version: 2.5

Description of the issue:
Hi, I’m using the Scanning scene to make scans and try it. I understand how it works, but I don’t understand how can I save and use a scan I made with it…
If I save the scan, it is saved in-app, in a folder. But it is “built” a run time, or am I wrong?
I want to save it to use it in other app. I see it is saved as .mesh file with a texture.jps file, but when I try to import it in Blender, it gives me an error. Any way to use it in other apps or to export it in a .pbx file?

I know I can use Scaniverse to save a scan and export it in .pbx, but I want to use it on android without LiDar.

Where are you finding the .mesh file?

If you can retrieve the vertices, normals, triangles, you can easily export the mesh to obj etc

Hi,
you can find them in Android/data/~name of your poject like com.DefaultName.NameProject~/
now, if you doesn’t save a scan, you can find it in cache/scankit, otherwise in files/scankit
I don’t know what you’re saying, I’m new so… can you explain me or help me?


These are the files you can find in the folder…

thanks!

Hi Stefano!

Blender doesn’t understand .mesh files, so that’s why you receive an error when you try to import one. You would have to convert your mesh data into one of the file formats Blender understands. For instance, you could use a mesh to OBJ exporter to save your mesh data as an .obj file which you would then be able to open.

I found this resource that exports Unity meshes to OBJ: http://gist.github.com/MattRix/0522c27ee44c0fbbdf76d65de123eeff

The texture on the mesh would also need to be saved into an image format such as JPEG or PNG and have a companion .mtl file that references it. To learn more about .mtl files visit this article: https://www.loc.gov/preservation/digital/formats/fdd/fdd000508.shtml

Tl;dr: You must convert your mesh and its texture into formats both Blender and Unity understand. For example, you could export your mesh within Unity to an obj file and generate a companion mtl file that references the image texture.

Best,
Maverick L.

Hi Maverick,
Thanks for your reply!
I’m trying to use the script you linked me, but when I import the folder when I found the scan I made, Unity gives me an error
“Failed to load ‘~path~/mesh.mesh’. File may be corrupted or was serialized with a newer version of Unity”
So I can’t export with the script you linked. How can I resolved it?
I’m using Unity 2021.3.18f1

Could you provide the .mesh file so I can look it over and test it out? Of course, if you aren’t comfortable sharing it publicly you can always DM it to me.

I was able to reproduce that error. Was the mesh generated with the same version of Unity you’re trying to run the script with? Have you tried regenerating the mesh and directly passing it to the script?

Hi Maverick,
when I scan, in the app I can use it, it works, but when I try to work on it on windows, it gives me the error.
I used the 2021.3.18f1

Could you try to generate the OBJ and MTL files within your app and save it to your device?