Search Unity

Feature Request ARMesh with ARAnchor and ARWorldMap

Discussion in 'AR' started by ThomasPzr, Nov 8, 2022.

  1. ThomasPzr

    ThomasPzr

    Joined:
    Oct 11, 2022
    Posts:
    4
    Hello guys,

    I would like to know when it will be possible to use ARMesh:
    - To save mesh data into the ARWorldMap (in the .worldmap file).
    - To attach an anchor in a mesh position and save it in the .worldmap file.

    ARMesh is more precise than the ARPlane so it would be a great feature to have.

    Note: @andyb-unity , I hope it will be more clear to understand.

    Thanks for reading this,
    Thomas
     
  2. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,062
    When you save an AR World Map, ARKit saves all the trackables (including meshes and anchors) as part of the world map by default. You don't need to take any action to store information about trackables in the .worldmap file. See the ARKit documentation for more information.

    Note that when you load a saved world map, ARKit must re-localize, so you won't see your trackables re-added immediately:

    ARKit then attempts to relocalize to the new world map—that is, to reconcile the received spatial-mapping information with what it senses of the local environment. This process is more likely to succeed if the user moves to areas of the local environment that they visited during the previous session

    source: Saving and Loading World Data (Apple developer)
     
    viknesh2020 and KyryloKuzyk like this.
  3. ThomasPzr

    ThomasPzr

    Joined:
    Oct 11, 2022
    Posts:
    4
    Hello @andyb-unity and thank you for your answer,

    First, taking basis of the AR Foundation Samples code for ARWorldMap management (here: https://github.com/Unity-Technologi...b/main/Assets/Scripts/ARWorldMapController.cs), we are able to load information from the previous worldmap, this one contains only ARPlane and ARAnchor but there are no traces of the mesh of the previous session (ARMesh).
    Finally, your source link does not mention any precision on how ARMesh could be saved on the worldmap

    Thomas
     
  4. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,062
    My read of the ARKit docs is as follows:

    Saving and loading World Data:

    After you successfully run a session from a saved world map, the session contains all anchors previously saved in the map.


    I believe this should include ARMeshAnchors, as they are a type of anchor. If you aren't seeing ARMeshAnchors in your saved map data, this would be a question better suited for the Apple developer forum.