【技術解説】 Niantic Lightship VPS新機能 『Remote Authoring』を試してみた
1. Article summary - 記事概要
Hello, this is Matt from the Designium.
Through this article, I will explain the Remote Authoring, one of the new features of Niantic's Lightship VPS, which was announced in 2022.
Previously, when creating AR content, you had to actually go to the location to do so, but with 'Remote Authoring' you can search the Geospatial Browser map for the location and place content without having to go to a real location.
Niantic has posted a guide to using their remote authoring on their private beta forums:
https://community.lightship.dev/t/getting-started-with-vps-remote-authoring/2671
Here we will summarise the important points of that thread and add our own notes on the process.
Remote Authoring is an important tool for improving the efficiency of Augmented Reality development. Remote authoring allows us to place content accurately at a location without having to physically visit the site.
Niantic has developed a convenient workflow that combines the ability to find locations where we can build AR experiences and download a 3D mesh of the area that we can use to remotely author content.
2. Getting the Map Data - マップデータの取得
The Geospatial Browser is much like the VPS Coverage Map that can be accessed via the Lightship developer dashboard. It shows the available VPS Wayspot locations but also allows users to see the 3D meshes associated with that location.
By clicking on a Wayspot marker we can see the various 3D meshes. For example below is a Wayspot I created outside of our office building in Gotanda.
Once we have found the 3D mesh we think will be most helpful placing our content we can hit the Download Mesh button to download the data in a zip file.
3. Authoring the Content - コンテンツのオーサリング
To start remote authoring first install the remote authoring SDK unity package to Unity.
I suggest creating a new scene to do the remote authoring to keep things tidy.
Once you have a new scene open the remote authoring scene by selecting the menu Lightship > ARDK > Remote Authoring Assistant > Open.
You will be presented with a mostly empty Unity scene with a hierarchy that looks like this:
Once the scene is open simply drag the map data zip file mentioned previously into the Unity project and it should automatically import the map into the scene.
The scene contains 1 anchor that can be placed wherever you want to anchor a piece of content.
After changing the position or rotation of an anchor be sure to hit the Save button found in the inspector when the anchor is selected.
One convenient feature of the Lightship remote authoring tool is that anchors can have prefabs assigned to them. Adding a prefab to the Associated Prefabs list in the anchor object inspector will automatically load the prefab into the scene and will automatically load the prefab in the built application when the Wayspot is successfully relocalized.
More anchors can be created using the script attached to the RemoteAuthoringAssistant gameObject.
It is important to give each anchor a unique name or it can result in errors/conflicts when trying to reload content.
After placing all the anchors you require, select the RemoteAuthoringAssistant gameObject and hit the Save All Anchors button. The last step is to export the anchors as a JSON. To do this tap the Inspect Location Manifest button or select the imported map data directly.
Once selected the manifest inspector will show an Export as JSON button. Press this and save the file in the Unity project assets folder. This map data JSON will be needed for recalling the anchors.
4. Creating the App -
Lightship provides an example scene to get started with reloading the remotely authored content.
This scene is found in the Remote Authoring Examples Unity package and once this is installed it can be found in /Assets/ARDKExamples/RemoteAuthoring/
The important script in this scene is the LocationManifestManager script found on the ManifestLoader GameObject. The inspector should look like this:
If there are any manifests or anchored content shown here you can remove them by hitting the Clear Manifests and Anchor Content button.
Once clear, drag the map data JSON mentioned previously onto the LocationManifestManager script in the inspector. This should add a manifest to the manifest list.
Once you have added the manifest click the Populate Anchors button to make sure the anchor prefabs appear when the Wayspot is localised. The prefabs will not show up in the editor scene.
Once the anchors have been populated the content should be loaded when the device successfully localises at the Way spot.
5. Important Notes - 注意することメモ
When choosing the Wayspot to download choose the highest quality, most recognisable mesh of the area.
When creating anchors in the remote authoring scene DO NOT USE Unity’s built-in “Duplicate” function or “CTRL C, CTRL V” on anchor game objects. Use RemoteAuthoringAssistant inspector buttons to add/remove anchors.
Anchors for each location must have unique names.
For Android, the apps must target Android 12 (API level 31) or higher.
For Android, the app requires grade 6.7.1 or better to build. The default version of gradle that comes with Unity 2021 is 6.1.1, so you need to install gradle 6.7.1 or better and set that as the gradle Unity will use. Set the gradle in the Unity editor in the Edit>Preferences>External Tools menu.
4. Editorial Note - 編集後記
こんにちは!デザイニウム広報のマリコです。Niantic社のLightshipがローンチされてから1年が経ち、様々な新機能が追加されてきましたね❗8thwall の参画からはじまり、今回紹介した「Remote Authoring」機能をはじめとした開発者向けの機能強化は開発者に優しい機能も増えていて嬉しいですよね✨今後もARエンジニア向けの記事をたくさん公開していく予定です🎶 またMattをはじめとする弊社ARエンジニアのR&D動画をMattのTwitterや弊社Twitter でもシェアしていますので、よければフォローしてくださいね😊
The Designium
Official website
Twitter (フォローお待ちしてます✨)
Facebook
Youtube
この記事が気に入ったらサポートをしてみませんか?