closed SenseSpatialDepthRenderer: How to stop and save the rendered mesh? (Unity)

0 votes
asked Dec 23, 2021 by imdanoush (200 points)
closed Apr 29, 2022 by imdanoush
Hello,

I am testing EasyAR to "scan" an interior room and save its 3D mesh model with the Dense Spatial module.

Is EasyAR capable of stopping the scanning procedure and store the generated 3D model as a game object? If yes, it would be great if someone explains how to do it.

Thank you in advance.
- Dan.
closed with the note: Answered

1 Answer

0 votes
answered Dec 27, 2021 by kenn (18,750 points)
selected Dec 31, 2021 by imdanoush
 
Best answer
In short, use enable/disable of ***FrameFilter to start/stop. And the mesh is a normal Unity resource or object, if you can see it, you can save it.
commented Dec 30, 2021 by imdanoush (200 points)

Thank you for the reply, but I have two important questions. Would be great if you give me some clues.

1) I was unable to start/stop the mesh generation process with the FrameFilter.

What I did was, I opened the example scene of Dense Spatial Map of EasyAR's Unity Package. I then added a button (Unity Button on the Canvas UI of the example scene) to set the FrameFilter of the scene to either "Disable" or "AllActiveChildren". But EasyAR kept generating the mesh regardless of what the value of FrameFilter is.

2) I had hard time finding the mesh via script, How can you access the generated mesh via scripting?

Thank you in advance.

commented Dec 31, 2021 by kenn (18,750 points)
1. There is a "Build Map" switch in the sample "DeviceSupport/ARFoundation", find what is done there.
2. Read the script DenseSpatialMapBlockController, use its Info member or whatever method you can to obtain the mesh or mesh data in there. You can always learn how to create a Mesh from DenseSpatialMapBlockController.Info from the script itself.
Welcome to EasyAR SDK Q&A, where you can ask questions and receive answers from other members of the community.
...