Unity AR 教學 - Model Target

執行 [ GameObject > Vuforia Engine > Model Target ] 新增模型目標。

 

使用 Unity 搭配使用 Model Targets 的應用程式,可以識別物件的形狀與跟蹤現實世界中的特定物件。

您可將各式各樣的物件製作 Model Target ,包括電器、玩具、載具、工業設備、建築地標。先決條件:

為物件建立 Model Target 需要有該物件的 3D 模型資料,例如 3D CAD 檔案或使用第三方 App 進行 3D 掃描。

 

物件需要有幾何剛性(不能改變外形或可塑)。

呈現穩定的表面特徵(不支援有光澤的表面)。

 

支援平台

Model Target Generator 支援 Windows 與 Mac OS 系統(Windows 系統需要支援 Direct X 11 Level 10 )。

Model Targets are supported at runtime on the majority of Vuforia Engine platforms. See the Recommended Devices List for a list of devices that surely works with Model Targets.

模型目標在大多數 Vuforia 引擎平臺上的運行時都受支援。請參閱推薦設備清單,瞭解肯定適用於模型目標的設備清單。

 

Creating Model Targets

首先,使用 Model Target Generator (MTG) 應用程式產生一個 Model Target 。

The Model Target Generator takes as input a 3D model representing the object you want to track, checks it for suitability and lets you configure it for optimal tracking with Guide Views and Advanced Views. The MTG generates a Vuforia Database which you can use with Vuforia Engine's Unity integration, or in your own native application, in order to track the object. See Creating Model Targets for a step-by-step guide to configuring Model Targets.

Model Target Generator 將表示要追蹤的物件的 3D 模型作為輸入,檢查其適用性,並允許您使用「參考檢視」 和「高級檢視」對其進行配置以實現最佳跟蹤。MTG 會生成一個 Vuforia 資料庫,您可以將其與 Vuforia 引擎的 Unity 集成一起使用,也可以在您自己的本機應用程式中使用,以便跟蹤物件。有關配置模型目標的分步指南,請參閱創建模型目標。

An Offline version of the MTG is available for special use cases. A Premium plan is required to utilize this tool. See Offline Model Target Generator for details.

To improve the Model Target tracking experience, Vuforia provides tracking optimization modes that are ideal for customizing the Model Target tracking performance for unique use cases. For more information, refer to the Optimizing Model Target Tracking article.

The MTG allows users to simplify their models through a cloud-based process. Simplifying will result in optimized complex models for high performance and robust AR object tracking experiences. See How to Create Model Targets and Model Target Generator Data Processing for details.

 

進階的 Model Targets

Additionally, the MTG allows you to train your databases via a cloud-based deep learning training process, producing an Advanced Model Target Database. Such a database contains one or more Model Targets where each contains one or more Guide Views with a recognition range up to 360 degrees.

Advanced Model Targets support recognition and tracking of an object from anywhere in the defined recognition range without requiring the user to manually align the view with the physical object.

For more information, see the Advanced Model Target databases article.

A Model Target Web API is available automating the generation process or integrating it into your own workflow. With the web API, you can use the HTTP requests to generate a Model Target or Advanced Model Targets with the same configuration options as the MTG desktop tool.

See Model Target Web API for more information.

 

Guide Views

A Model Target requires that the user hold their device at a particular angle relative to the object, and at a particular distance to initialize tracking of a Model Target. To aid with this process, your app will typically draw an image showing an approximation of the object from this distance and viewing angle, so that the user just needs to move their device until the object matches the image. When they do this, tracking can begin.

In Vuforia Engine, both the image and the particular angle/distance relative to the object that image represents is called a Guide View.

For an indication of how Guide Views work within a typical Model Target application, see Guide Views, Introduction to Model Targets in Unity and the Model Target Test App User Guide.

 

 

Guide Views in Advanced Model Target Databases

By using Advanced Model Targets in your application, you are able to detect and track one out of several different objects (one active at a time), or you may want to have multiple Advanced Guide Views for a single object with a certain recognition range (for example, if you have a very large object and you want to provide a different user experience depending on which side the user approaches the object from).

Therefore, the Model Target Generator allows you to define multiple Guide Views per Model Target, and/or merge multiple Model Target databases together through a cloud-based training process that outputs a single Advanced Model Target Database.

NOTE: For applications using the Advanced Model Target feature, we recommend displaying a search-frame or similar UX to indicate visually that the application is actively searching for one or more objects as Advanced Guide Views are by default not shown on the screen during runtime.

For more information, see Advanced Views and Advanced Model Target Databases.

 

 

測試 Model Target

The Model Targets feature has certain requirements for the object being tracked in order to ensure good recognition and high-quality tracking. Even after following our Best Practices guide, you may find that a 3D model has to be adjusted to ensure good tracking of the object, or even that the object itself is simply not suitable for tracking in the first place.

To assist with this process, the Vuforia Engine SDK ships with a Model Target Test App. Use it to try out tracking for a given object without any additional development.

For more information, see the Model Target Test App User Guide.

 

 

使用 Model Target

In a Unity app, Model Target databases are tracked using the ModelTarget GameObject. The GameObjects are provided through the Vuforia Engine Unity extension and can be found under the GameObject -> Vuforia Engine menu in Unity.

See the Introduction to Model Targets in Unity for more information.

 

 

 

回前頁