見出し画像

【Niantic Lightship VPS #4】 Let's use Niantic's VPS - NianticのVPSをつかってみよう!

1: Article summary - 記事概要

Hello, this is Matt at the Designium.
This final article will explain setting up the VPS functions in Unity.
* The first article is here.

こんにちは、デザイニウムMattです。
連載最後となる本記事では、VPS機能のIDについて説明します。
過去の記事は、下記からご覧ください。

2: Let's use Niantic's VPS - NianticのVPSをつかってみよう!

2-1: Preparing the base Unity project - ベースとなるUnityプロジェクトの準備

In this article we will work on the Unity project described previously in Article 3. The ARDK and ARDK official sample Unity packages have been imported, and the ARDK license key should have been set in the Unity project.

本記事では、前回の記事(#3)の後半で書かれているUnityプロジェクトで作業します。
ARDKおよびARDK公式サンプルのUnityパッケージがインポートされていて、ARDKのライセンスキーが設定済みのUnityプロジェクトとなります。

2-2: VPS function added - VPS機能追加

To enable the LightShip VPS function in a Unity scene we add the ARDK script  WayspotAnchorExampleManager.cs to a gameObject. This script can be found in the  /Assets/ARDKExamples/WayspotAnchors/ folder. 

LightShip VPSをシーンで有効にするには、ARDKスクリプトWayspotAnchorExampleManager.csをgameObjectに追加します。このスクリプトは、/ Assets / ARDKExamples /WayspotAnchors/フォルダーにあります。

The WayspotAnchorExampleManager.cs script is used to start the VPS function “WayspotAnchorService” which automatically starts attempting to relocate on startup.

WayspotAnchorExampleManager.csスクリプトは、起動時に自動的に再配置の試行を開始するVPS関数「WayspotAnchorService」を開始するために使用されます。

The script provides a function to place an anchor by tapping on a surface plane created by the ARDK ARPlaneManager (PlaceAnchor()). However, we can use other methods to place anchors, for example if we want to place an anchor at the camera position we can use 

_wayspotAnchorService.Cre_ateWayspotAnchors(CreateAnchorGameObjects, Camera.main.transform.localToWorldMatrix);

Currently we cannot access the VPS Waypoint IDs, however each anchor placed at a Waypoint using the WayspotAnchorService has a unique anchor ID. This ID can be used like a map ID to identify the anchor and to give more fine grain control over the AR experience. For example, we may want to load special content on one particular anchor in an area. The anchor ID can be accessed in the WayspotAnchorExampleManager.cs script in the CreateAnchorGameObjects function at the line

var id = wayspotAnchor.ID”


このスクリプトは、ARDK ARPlaneManager(PlaceAnchor())によって作成された平面オブジェクトをタップしてアンカーを配置する関数を提供します。ただし、他の方法を使用してアンカーを配置することもできます。たとえば、アンカーをカメラの位置に配置する場合は、次のように使用できます。
_wayspotAnchorService.CreateWayspotAnchors(CreateAnchorGameObjects,Camera.main.transform.localToWorldMatrix);
現在、VPSの領域またはオブジェクトごとのIDにアクセスすることはできませんが、WayspotAnchorServiceを使用して領域またはオブジェクトに配置された各アンカーには一意のアンカーIDがあり、アクセスすることができます。このアンカーIDをマップIDのように使用して、アンカーを識別し、ARエクスペリエンスをより細かく制御できます。たとえば、エリア内の1つの特定のアンカーに特別なコンテンツをロードしたい場合があります。
アンカーIDには、WayspotAnchorExampleManager.csのCreateAnchorGameObjects関数内の
“var id = wayspotAnchor.ID”でアクセスできます。

2-3: Remodeling and author's impression - 改造や筆者感想

The Waypoint system that is the Lightship VPS seems very well suited to user authored content, content that is placed at VPS locations by users. Content can be placed without the developer needing to worry about map IDs or pre-scanning an area and any Niantic ARDK application could rely on the accurate meshing and depth based occlusion to integrate AR into the real world fairly accurately.

The Waypoint system does not seem well suited to pre-authored content, content created by the developer to carefully align with the real-world environment. While we can get the 3D models of privately scanned areas, we cannot get 3D data for the public Waypoints. This means that we cannot accurately pre-author AR content for public Waypoints. 
The only way to do this at the moment would be to manually place a waypoint anchor and author content around that anchor, however positioning AR content to perfectly align with an environment using this method would likely involve a lot of trial and error.

Lightship VPSのWaypointシステムは、ユーザーが作成したコンテンツ、つまりユーザーがVPSの場所に配置するコンテンツに非常に適しているようです。開発者がマップIDや領域の事前スキャンを気にすることなくコンテンツを配置でき、Niantic ARDKアプリケーションは、ARを実世界にかなり正確に統合するために、正確なメッシュと深度ベースのオクルージョンに依存できます。
Waypointシステムは、事前に作成されたコンテンツ、つまり開発者が実際の環境に注意深く合わせるために作成したコンテンツにはあまり適していません。プライベートスキャンされたエリアの3Dモデルを取得することはできますが、パブリックウェイポイントの3Dデータを取得することはできません。これは、パブリックウェイポイントのARコンテンツを正確に事前作成できないことを意味します。
現時点でこれを行う唯一の方法は、Waypointアンカーを手動で配置し、そのアンカーの周囲にコンテンツを作成することですが、この方法を使用してARコンテンツを環境に完全に合わせるには、多くの試行錯誤が必要になる可能性があります。

3: A little promotion - ちょっとした宣伝

3-1:Introducing "AR VPS BUILDER for Lightship ARDK" - 『AR VPS BUILDER for Lightship ARDK』の紹介

Designium has developed "AR VPS BUILDER for Lightship ARDK," an AR content template that allows users to create AR applications linked to real-world locations in a short time.

"AR VPS BUILDER for Lightship ARDK" is a content template that accelerates AR app development using Niantic's Lightship VPS and ARDK. By utilizing the AR content template with rich functions, we can now develop AR apps in less time than usual!


デザイニウムでは、現実世界の位置と連動したARアプリを短期間で制作できるARコンテンツテンプレートAR VPS BUILDER for Lightship ARDK」を開発しました。
「AR VPS BUILDER for Lightship ARDK」は、Niantic社のLightship VPS およびARDKを使ってARアプリ開発をするための豊富なARコンテンツを含むテンプレートで、通常よりも短い期間で高品質なARアプリの開発をすることが可能になりました!

AR VPS BUILDER for Lightship ARDK by The Designium


3-2:どんな人向けのサービス?

ARコンテンツやアプリの企画担当者様をはじめ、観光地や商業施設、イベント等でのアプリ制作を考えている方にもオススメのサービスです。コンテンツテンプレートからお好きなコンテンツを選んで頂き、カスタマイズした高品質なアプリを短時間で作成できます。コチラからお気軽にご相談ください。

3-3: Contents Introduction -コンテンツ紹介

Contents of "AR VPS BUILDER for Lightship ARDK"

【Game】
Magic Flashlight

This is a game to find hidden riddles and clues by illuminating spots with a flashlight. It can be used for riddle solving contents (apps) and quiz rally.

Voxel Collection
This is a tool that allows you to bring back voxel data consisting of blocks of the real world. You can enjoy creating your own block world with the parts you brought back.

 AR Mini Game
This tool set contains various AR mini-games, which can be used in AR-based tour services, etc., and can be enjoyed at each spot.

【Art】
Drawing Tool

This is a tool that allows you to draw pictures, letters, signs, etc. in the real world using AR. It can be used for a wide range of purposes, such as leaving messages for friends, in addition to art.

【Sightseeing】
Share notes
 
Share notes and photos of various places and share them with your friends so that they can relive their own experiences and enjoy them too.

https://youtu.be/nLiijfuRj0M


Audio Tours
Audio Tours can provide location-based sightseeing information by using audio information.

【Communication】
Hologram

Holograms can be recorded using ARDK and distributed to various locations at the same time, enabling hologram live performances using VPS spots.

AR Comics
Holograms can be placed in each spot with effects like a scene from a comic book, allowing visitors to take pictures and enjoy the experience.

『AR VPS BUILDER for Lightship ARDK』のコンテンツ
【ゲーム】
・Magic Flashlight

フラッシュライトでスポットを照らすことで隠れた謎やヒントを探すゲームです。謎解きコンテンツ(アプリ?)やクイズラリーに活用できます。

Voxel Collection
現実世界をブロックで構成されたボクセルデータとして持ち帰ることができるツールです。持ち帰ったパーツで自分だけのブロック世界を作って楽しめます。

 ・AR Mini Game
各種ARミニゲームを詰め込んだツールセットです。ARを活用した周遊サービスなどで活用でき、各スポットごとに楽しめます。

【アート】
Drawing Tool
現実世界にARで絵や文字、サインなどを描けるツールです。アート以外にも、友達にメッセージを残したりするなど、幅広く活用できます。

【観光】
Share notes
 様々な場所に写真やメモを残し、それらを友人等にシェアをすることで、自分の体験を別の人にも追体験して楽しんでもらうことができます。

Audio Tours
オーディオ情報を活用して、位置情報に応じた観光案内ができます。

【コミュニケーション】
Hologram
ARDKを活用してホログラムを収録し、同時に色々な場所への配信が可能です。VPSスポットを活用したホログラムライブなどが可能になります。

AR Comics
各スポットにマンガの1シーンのようなエフェクトを配置して、写真撮影をして楽しむことができます。


このARコンテンツテンプレートを使うことで、ARアプリを簡単に作成することができるようになりました。下記は、このテンプレートを活用してデザイニウムが作成したデモアプリ『7 Gods App(七福神アプリ)』です😊

3-4:Contact information - 問い合わせ先

「AR VPS BUILDER for Lightship ARDK』をつかったVPSとARを組み合わせたアプリやコンテンツ開発の依頼やお問い合わせは、下記問い合わせフォームからお気軽にお声がけください❗TwitterなどSNSのDMからでも大歓迎です😊

4: Conclusion おわりに

Adding VPS functionality to an Niantic Lightship project is a very simple process and as the code is all exposed to the developer (rather than being concealed in a DLL) the functions can be modified easily. For example in our 7 Gods demo we modified the VPS function to query specific map IDs based on the selected statue and GPS position.

VPSの機能をNiantic Lightshipプロジェクトに追加するのは非常に簡単で、コードはすべて開発者に公開されているので(DLLに隠されているのではなく)、簡単に機能を変更することができます。例えば、七福神アプリのデモでは、VPSのターゲットとする銅像とGPS 位置に基づいて特定のマップ ID を照会するように VPS 機能を変更しました。

5: Editorial Note - 編集後記

こんにちは、デザイニウム広報のマリコです!全4回に渡る「Lightship VPS」の連載記事いかがでしたでしょうか?📝✨今週開催される「Niantic Lightship Summit  Tokyo 2022」では、Nianticの方をはじめとする豪華な登壇者の中でデザイニウムからも取締役の秦が登壇させて頂き、今回のARコンテンツテンプレートのお話もする予定です✨当日は私も現地参加するので今からとてもワクワクしています😊記事を読んでくださっている方にもお会いできるかもしれないので楽しみです❗よければ声をかけてくださいね😉

The Designium
Official website
Twitter (フォローお待ちしてます✨)
Facebook
Youtube


この記事が気に入ったらサポートをしてみませんか?