Merging two scans

Description of the issue:

I would like to create a single scan from twoBecause I need to have a unique map and understand which are the various neighbors of the pieces to be able to create a path and place objects. So just do a single scan to be located and recognize all the environment created. I tried to use other programs to put together two or more scans, but the JSON with the various information is missing.

How can I merge two scans into one and make sure to show it from VPS Authoring Assistant?
Can I take the scan ID (or map) to figure out where I am exactly?

Hi Stefano!

Unfortunately there isn’t native functionality within Lightship to combine scans, but you have several options on what you could do depending on when you need the combination to occur. If you want to quickly combine scans within Unity, I would recommend looking at the Mesh#CombineMeshes() function – or creating your own Mesh from the vertices of your input scans. Also, consider Editor Scripting to generate meshes if you plan on combining premade meshes often. However, if you are more comfortable working in a 3D modeling tool such as Maya, 3ds Max, or Blender, you could use one to achieve what you want.

I hope that helps!

Hi Maverick,

Thanks for your reply.
I want to ask you how to use a combined mesh with the VPS Assistant, I mean if I combine two meshes with blender, how can I pass it to the VPS Assistant?

Hello again,

By “VPS Assistant” do you mean the Remote Authoring Assistant? You’re able to combine your private scans/meshes on your end, but it wouldn’t be recognized if you upload it. VPS will only localize to the mesh in the Wayspot generated by our system. Could you please clarify what your goal is in combining the meshes? Does this have anything to do with your previous ticket related to pathfinding?

Maverick L.

Hi Maverick,
Yes, it refers to my previous ticket related to pathfinding. I want to make a single scan where I can recognize the whole building. But I’m understanting that it is impossible, right?

The good news is that what you’re looking to accomplish is possible, but you have to go about it in a different way than you think. You could overlay both meshes (scans), one as a navigation mesh and the other as a map of Wayspots. Keep in mind that our system does not currently support large Wayspots, so you’ll have to make several within the building to determine where the player is.

Maverick L.

Hi Maverick,
I’m trying to use the image detection instead of the localization because I’m assuming to work without internet and GPS actived, so I can localize inside the building and then calculating the pathfinding. But now I’m stuck with another logical problem:
How can I detect an Image and, then, use the scans that I made to locate myself?

In circumstances where your player might have limited bandwidth or no network connectivity, you could bypass the VPS localization process by using Image Detection. I would recommend first attempting to use the VPS localization but fallback to image detection in the event of a CannotConnectToServer failure. Each Wayspot should have a unique image associated with it to make this possible. If Lightship detects an image associated with a Wayspot, you can conclude that pathfinding needs to start at the location of that Wayspot. Make sure your app ships with the scan meshes included.

I hope that gives you a good starting point!

Hi Maverick,
So can I load a VPS using Image Detection and without conncetion?
Can I load more than one VPS at the same time?
How can I make the pathfinding if I can’t use a merged scan? I mean, if I have to go from A to B, how can I load the whole scans between A and B?
is GPS needed for scanning a VPS?

Thanks btw!

“So can I load a VPS using Image Detection and without conncetion?”
VPS requires network connectivity as the data is retrieved from our servers. You’re able to load more than one Wayspot but can only be localized to at most one at any specific time. Specifics on pathfinding is up to the developer on what approach they want to take but in this circumstance you could overlay your geometry over your aligned VPS scans. I would recommend that you look into navmesh (navigation meshes) within the Unity documentation, our tutorial on Image Detection, and TensorFlow’s tutorials on image detection. Lightship includes TensorFlow as a dependency already, so you don’t have to worry about installing another package.

Thanks Maverick.
I’ve another question. You said “you could overlay your geometry over your aligned VPS scans”, I made it, but I don’t know how to use it with ARDK. How can i use it?

Hi Stefano!

I hope you had an excellent weekend! I’m working on a sample to give you a demonstration of what I’m talking about here. It should clarify what I mean and offer a good starting point to achieve what you’re looking for. I will get back to you later on this week with it!

Maverick L.

Thank you very much Maverick, I’ll wait you! :smile: