When area learning in Project Tango SDK's examples are running, where is the learning data stored? - unity3d

I have using Phap 2 pro for my graduation project.
The project theme is 3D object recognition using Google Tango.
So, I run the area learning in Project Tango SDK's example!
I need the area learning data!
However, I can't find it.
Where is the learning data stored?
Area description picker image

I can't find where ADF is stored from Google's document.
I think there is no specific path to ADF.
But we can export ADF to any path by using areaDescription.ExportToFile(string filePath)
How to use :
AreaDescription m_areaDescription = AreaDescription.ForUUID(string UUID);
m_areaDescription.ExportToFile(Application.persistentDataPath);
reference
UUID is an unique ID allocated to each ADF. In your picture, small size string like "7ad2e08e-..." is the UUID.
ADF is a binary file. So you can't use this outside a Tango application. If you want a captured mesh data, maybe ExperimentalMeshBuilderWithColor scene can be helpful.
good luck!

I personally never managed to get into Area Description Files, but looking at your question here are two facts that came to my mind:
The A of ADF is for Area... so I am not sure that the learnt data can help to recognize objects (except maybe for some key points)
PTC (Vuforia) recently came out with 3D objects recognition in their SDK (if you haven't checked it out already, their demo is pretty cool)

Related

Including non-standard resources in Unity HoloLens app

I'm building an app that must visualize a large point cloud on HoloLens 1st gen. As performance is an issue wit large clouds, I'm using Potree, an octree that takes care that only a preset number of points from the cloud are rendered.
The solution works in the editor, but, you guessed it, not when deployed on HL.
The point cloud in the Potree format is a set of couple of .json and hundreds of .bin files stored in hundreds of subfolders following the octree structure, all of that stored within a single folder, and the path to this folder is accessed by the renderer at runtime. However, I don't know how to include this folder in the HL app. Using Resources doesn't work as it's not really a standard resource. I've seen Asset Bundle suggested elsewhere, but according to this post asset bundling doesn't work on HL.
Is there a way to simply put this complex file structure in an accessible directory on HoloLens?
I feel completely stuck here and any help would be much appreciated.
Some of the things I've tried:
Keijiro Pcx doesn't work here. If rendered as single pixels, points cannot be seen in AR, and if rendered as meshes, the performance is abysmal (which led me to a conclusion octree structure should be used)
the solution here shows how to load one .xml file, but I have hundreds of files so I don't think it would work for me
similarly, this post deals with one .obj file
Unity 2019.4
HoloLens 1st gen
For anyone stumbling upon this - I ended up using Unity StreamingAssets and accessing the folder with Application.streamingAssetsPath - works beautifully!
Using pcx needs to be adjusted to binocular rendering in publishing settings. Please uncheck "Enable Depth Buffer Sharing" in XR Settings, and change "Single Pass" to "Multi Pass", as shown in the figure.enter image description here

How to create a Save / Load system for Unity Tilemaps?

I am making a game that procedurally generates a level and sets tiles via Tilemap.SetTile().
I've been reading and watching tutorials about saving in unity and from what I understand I need to serialize data so it can be saved in a binary file. However, I don't even know where the data about the tiles in the tilemap is being saved.
How could I make this system - where can I find information about stored tiles in a tilemap?
Is there perhaps an already finished saving system that supports Unity tilemaps on the Asset Store?
As already mentioned in a comment, the "serialization" in Unity is absolutely garbage - completely forget about it.
All you do is save the info, probably as JSON, just a text file.
Note that the Json helpers built in to Unity are completely perfect - very easy to use.
Here's a simple and famous example ... https://stackoverflow.com/a/40097623/294884
(Note that you don't literally have to use Json, you can use any simple text format, but Json is so easy you may as well use it.)
There are actually dozens of QA on this site where someone asks "I want to save _ _ _ in Unity, how do I use serialization?" in every single casethe answer is just "Unity serialization is a joke, just save as a text file."

Use existing offline raster mbtiles to display on mapbox map

I'd like to transition the map in my app from currently Apple-Maps-SDK to Mapbox. My users already downloaded a lot of offline maps into several .mbtiles tiles containing raster data.
My question now is if it's possible to still use those while the user will be transitioning to the new maps? I just don't simply want to delete all offline maps and tell the user that he needs to download everything again right now, but rather give them a time-window to do that...
I was looking at MGLRasterTileSource/MGLSource and thought that I can create a subclass and somehow provide my own data to the map, but this does not seem to be supported. There are no datasource methods on it for that purpose...
Would be great if somebody could point me into the direction on how to archive what I want.
EDIT:
So I thought it might work that way... I migrate my existing raster tiles into a downloaded pack inside the mapbox offline database. So I had a look at the caches.db but at least the data in there is not just a plain png/jpg (tried with the mapbox satellite images, which should be raster).
Cause there is no public interface for getting existing raster-tiles in there, is there?
I've seen an other solution where somebody is hosting a webserver inside the app... but that somehow looks like quite an overkill to me?!?
https://gist.github.com/namannik/3b7c8b69c2d0768d0c2b48d2ed5ff71c

Creating walkthrough dynamically in unity3d

I want to using the Unity3d framework for a project in which I have create a walkthrough. But the client want it to be dynamic.
We would be getting the final fbx file from 3DMax which when added to a particular folder a walkthrough should be created automatically. I went through the help files on Unity3D site but did not find any documentation as to how use the Unity3D framework programmatically.
Can anyone please let me know how can it be done? Even if link is provided for the resource it would help us.
Unity 3D has a built in way to load models at runtime, but this should be done using a Resources folder (Resources.Load()) or using a Asset Bundles (AssetBundle.Load()) as described here: http://docs.unity3d.com/Documentation/Manual/LoadingResourcesatRuntime.html
These two methods are performed inside the Unity editor and your need is load any arbitrary 3D model file at runtime, for this case you will need a plugin. The only one that I know is ObjReader.

How to use Offline Cloudmade Maps in an iPhone App

I’ve looked through the posts on the Cloudmade site here and I get some of it, but not all. I've posted the question below, but haven't had the help I need, so I thought I'd ask the question here.
I can see that I need to:
download the tiles for the required area to my Mac (but can’t see how to do this)
convert these to a sqlite database using the map2sqlite utility, changing the code to output the tiles to a table called “ZCACHE”, not “tiles”
Copy the DB to the Application Bundle
insert some code to copy this DB on first run, from the Application Bundle to the Documents Directory
Somehow get App to use this DB and not an online one – I can’t see how that’s done.
Any help would be warmly welcomed,
Chris.
The best solution for me to have iPhone offline maps is:
1.- Generate your own maps with TileMill and then export to MBTiles format.
2.- Get the mbtiles-ios-example and use the MBTiles file you just generated. In order to compile it, you need to download Route-Me and add it to the project.
Now, there is another option (not for free): Mapbox.
please check this tutorial, it can help - http://www.gisnotes.com/wordpress/category/sqlite3/.