Select to view content in your preferred language

Render content from .mspk in AR world space

90
3
Tuesday
DominicBowyer2
New Contributor

Hi all,

Hoping to get some advice on something i want to undertake in next few days. I am trying to build a fully offline map application on iOS using the SDK. I have already complete the first of 2 major features by being able to render a map with relevant feature layer geometry but i now want to undertake the more complex feature.

I want to be able to view all feature layer geometry and/or scene layer meshes embedded inside my .mspk file in a world space AR. So be able to view a building mesh in its actual location in AR  for example. Is this even possible? If so does anyone know of any tutorials or samples i can see for reference? Have never worked with AR before and the documentation and samples online never seem to mention anything regarding offline rendering in AR. Any help is appreciated. Thanks. 

0 Kudos
3 Replies
Ting
by Esri Contributor
Esri Contributor

Thanks for asking this question Dominic!

The usecase you described is a World-scale AR concept. Please see this doc for the AR workflows we support.

We support AR via a product called the toolkit, which consists of a series of prebuilt components to facilitate development. In the toolkit we have the WorldScaleSceneView for the world-scale AR workflows, that allow you to insert an ArcGIS scene view into the AR experience. Please see the following docs for it:

 

One thing to point out is that, when you use the mobile scene package in a world-scale AR experience, the 3D scene package is "overlaid" on top of the AR view, rather than being a real 3D "object" immersed in the AR view. That leads to parallax visual effects when your device is moving in the real world - it seems that the scene view is shifting along the path you are walking. Depending on your usecase, this might or might not be a problem.

 

A side note: the mobile scene package also works in the Tabletop AR experience, which allows you to anchor the mobile scene package on a table top so you can examine it in AR. We have a code sample for it and you can also download the app from App Store to see it live: https://apps.apple.com/us/app/arcgis-maps-swift-samples/id1630449018 

 

Please share any comment regarding the AR toolkit components! It is only released recently and we really would like to learn people's feeling about it, and address feedback and complaints to make it more developer-friendly. 🙂

DominicBowyer2
New Contributor

Thanks so much for the reply @Ting! I'll be sure to share my progress as I go. I've being used the sample you linked as reference thus far. However, one thing i've noticed is despite having the toolkit installed, I'm not able to access many classes that belong in the runtime SDK like AGSScene (https://developers.arcgis.com/ios/api-reference/interface_a_g_s_scene.html) for example. Xcode reports the inclusion of these as "out of scope". I've found this very strange considering i believe the toolkit to come bundled with the vanilla runtime SDK of which these classes belong to and im of course importing both 'ArcGIS' & 'ArcGISToolkit' packages. Not sure if you might be able to shed some light on the matter?

0 Kudos
Ting
by Esri Contributor
Esri Contributor

Ah, are you using the 100.x Runtime SDK (UIKit)? It has its own companion toolkit here: https://github.com/Esri/arcgis-runtime-toolkit-ios 

The link I've attached are for the latest 200.x versions. The 200.x Maps SDK moved to SwiftUI with many enhancements. If possible, we encourage people to move up to the new SDK to enjoy the better performance and new features.

The old toolkit also has AR components, although they don't include the latest ARKit advancements in raycasting, plane detection, and geo-tracking. You can still try it out and follow the tutorials here: https://developers.arcgis.com/ios/scenes-3d/display-scenes-in-augmented-reality/ 

0 Kudos