How do I clear existing dense meshes?

0 votes
asked Nov 15, 2024 by exarstudios (140 points)
Unity / ARFoundations Integration

So i'm using the meshing from the DenseSpatialMapBuilderFrameFilter, but my use case requires the user to be able to clear the existing mesh and start over if they need to. The only way i've managed to get this work is to completely destroy the EasyARSession the DenseSpatialMapBuilderFrameFilter is attached to, which also doesnt work for me because then I also lose the active SparseSpatialMap that is currently loaded.

I've tried just accessing the mesh blocks and just destroying all of them, but there is a internal inaccesible Dictionary that also has references to the blocks, so it ends up just erroring because its trying to access what is now null meshblocks.

The closest i've got to working without completely redoing the entire ARSession is to destroy the DenseSpatialMapBuilderFrameFilter, remove it from the ARSession.Assembly.FrameFilters list, create a new DenseSpatialMapBuilderFrameFilter parented to the ARSession, and then add the new one to the ARSession.Assembly.FrameFilters. However this just results in it never building new mesh blocks.

I'm really stumped on this. Using other AR SDK's like Niantic Lightship its been as simple as Meshing.ClearExistingMeshBlocks.
Any help would be greatly appreciated.

2 Answers

0 votes
answered Jan 29 by pebitech00 (220 points)

I've tried just accessing the mesh blocks and just destroying all of them, but there is a internal inaccesible Dictionary that also has references to the blocks, so it ends up just erroring because its trying to access what is now null meshblocks.
Design Studio Cricut
Cricut Canvas
Cricut on Mac
Cricket Projects
Cricut Online
Cricut Joy Design Space
Cricut Explore

0 votes
answered Feb 7 by tanvirai (180 points)

Escort services are hiring some people, mostly women, to accompany clients for social or entertainment purposes. Such services might include dinner dates, parties, events, or even travel. Escort service in new Delhi are legal in most parts of the world, including Delhi, as long as they do not involve any illegal activities like prostitution.

Welcome to EasyAR SDK Q&A, where you can ask questions and receive answers from other members of the community.
...