【Niantic Lightship VPS #3】 Preparing to use Lightship VPS - Lightship VPSを使うための準備
1: Article summary - 記事概要
Hello, this is Matt from the Designium.
In this third article, I will explain about scanning using the Niantic Wayfarer app and setting up the Unity project to use the VPS function of Lightship ARDK.
* The second article is here.
2: Procedure outline - 手順概要
The process of preparing to use the Lightship VPS system can be split into roughly two stages: deciding on the location we will base our VPS experience, and adding the VPS functionality to our Unity scene.
A VPS system works by recognising an area or object in the real world and so requires prior knowledge of that area. The Lightship VPS has many areas and objects that it can already recognise which can be found on the VPS Coverage Map. If we would like to use one of these predetermined locations for our VPS experience then we don't need to do anything else to prepare the location for the VPS.
If we want to use the VPS in areas outside of these predetermined locations we need to scan the area using the Niantic Wayfarer app (described below).
After we have our location ready for using the VPS we need to prepare the Unity project.
3: Detailed procedure - 手順詳細
3-1: Photography for VPS - VPS用の写真撮影
To create a Lightship VPS target we must scan an object or area using the Niantic Wayfarer app.
When considering a location for a VPS location we must establish if it will make a good VPS map. Niantic suggest “VPS Locations should be no larger than a 10-meter diameter around the location. For example, a typical statue would work as a VPS-activated Wayspot”. Statues make good Niantic VPS maps as they are usually distinctive/unique shapes and are often set apart from other objects or buildings in the environment.
The Wayfarer app uses environmental meshing to create a 3D model of the area of object the user scans, and the better the scan is, the better the VPS will perform in terms of reliability and speed of relocation. Niantic state in their documentation “if the mesh that is generated on the device looks good, the 3D map constructed for VPS should be good too.”
But how do we know if a mesh “looks good”? From my experience meshes a “good” mesh has the following features:
Well defined edges and corners.
Clearly shows distinctive details of an area/object*.
Has few holes/gaps in the mesh (no holes would be best but it often impossible)
* In other words, if we saw this mesh out of context we could recognise the area from the distinctive shapes.
To achieve a good mesh the user should scan an area carefully and thoroughly, capturing details and surfaces from multiple angles. Niantic has also provided a handy “Best Practices” instructional video for scanning.
Here is a video of one of our team creating a Niantic VPS map using the Wayfarer app.
3-2: Wayfarer
Niantic have created a thorough guide to scanning for public or private maps using the Wayfarer App.
One large weakness with using the Wayfarer app is that it only provides the user with a 3D mesh of the scanned area in the Draco (.DRC) format. This format has some Unity support but is not natively supported by Unity. This may change in the future.
3-3:Unity project settings - Unityプロジェクトの設定
Niantic recommends Unity 2020.3 LTS for ARDK. To try out the VPS functionality first download the ARDK and ARDK Example Scenes Unity packages from the Niantic Lightship downloads page: https://lightship.dev/account/downloads
Check that the /Assets/ARDKExamples/Resources/ARDK/ArdkAuthConfig asset has your Niantic Lightship license key set as the “API Key” variable.
The API key can be found in the Projects>Project>APIKey section of the Niantic Developer dashboard.
In version 2.0 of the Niantic Lightship ARDK, the VPS based examples can be found in the /Assets/ARDKExamples/VPSCoverage and /Assets/ARDKExamples/WayspotAnchors folders. The VPS coverage examples demonstrate how to search for the closest VPS locations provided by Niantic, while the WayspotAnchors example is a demo of how to localize at a VPS location and place persistent objects.
Niantic covers the setup and build settings of Lightship ARDK in their documentation. However, using the standard settings on Android sometimes leads to an error which causes the build to fail to run on some devices, stating “The application requires the latest version of Google Play Services for AR”. To avoid this error I would recommend changing the “Target API Level” in the Unity Player Settings to Android 10 (API level 29).
3-4:Actual machine operation - 実機動作
The /Assets/ARDKExamples/WayspotAnchors/WayspotAnchors.scene will allow the user to try out placing simple AR objects in an environment and saving their positions to be able to restore them in the following session.
4: Conclusion - おわりに
In the next article, we will continue to discuss developing with and using the Niantic Lightship VPS.
5: Editorial Note - 編集後記
こんにちは!デザイニウム広報のマリコです。6/24に 「Lightship Summit Tokyo 2022」が開催されるというアナウンスがあり、弊社からは秦が登壇します🎉✨また、記事の編集に協力してくれている佐久間が講師をつとめる「Lightship ARDK オンラインハンズオン」も今週末開催予定です❗人気のため増席を重ねており、Lightshipへの注目度が伺えます💻✨どちらのイベントも、参加されるみなさまとお会いできるのを楽しみにしています😊
ARDKやVPSに関する情報やR&DをTwitterで発信しているので、よかったらフォローしてくださいね😉
The Designium
Official website
Twitter (フォローお待ちしてます✨)
Facebook
Youtube
この記事が気に入ったらサポートをしてみませんか?