Vuforia Engine 10 API simplifies and improves the development of AR experiences with Vuforia Engine. Learn more about its core concepts and usage and enjoy your journey of developing Vuforia Engine-powered apps.
The Vuforia Engine 10 API brings simpler management of the AR lifecycle and better tools to create, handle, and control your AR experience and application. The Vuforia Engine is supported in multiple development environments and it is supported on a large number of devices. The API is exposed in C for development on Android, iOS and UWP and C# for use within the Unity Engine. Get started today and build your AR experiences around images, objects, and environments.
The Vuforia 10 API consists of three key concepts:
- Observer and Observations
The Engine is a high-level object that manages the Vuforia Engine lifecycle. With the Engine, you can create, destroy, start, and stop the AR experience. In most cases, Vuforia will set up Engine with a default configuration and you will only need to configure a few settings yourself, such as adding the license key. For additional control, you can configure the Vuforia Engine instance and its processes that are used for handling the lifecycle and behavior of your app. In Unity, this instance is represented as the VuforiaApplication singleton (across scenes) and the VuforiaBehaviour in a Unity scene.
Some examples of the configuration elements are listed here:
- License key (always required)
- Camera parameters
- Rendering parameters
Configurations need to be set before starting the Engine. You can adjust certain settings after Vuforia Engine has started via Controllers.
Observers are components that can be created and set to observe a property of the real world. In most cases, these are physical objects that we refer to as targets. In this sense, you create an Observer for each part of the real world you wish to detect, track, and get information about. The target could for example be images, objects, a 3D space, spatial anchors, or even illumination settings in your real environment. In Unity, Observers are created and managed as target behaviour components that are attached to Game Objects.
Observers are owned by the Vuforia Engine. By default, Observers are activated when created.
Some examples of Observer types include:
- Image Target Observer: Use it to observe a planar 2D picture or other graphic representation.
- Model Target Observer: Use it to observe a 3D object based on a CAD model or a scan of a physical object.
- Area Target Observer: Use it to detect and track predefined 3D areas in the user’s physical environment.
- Cloud Image Target Observer: Use it to recognize images in the real-world using cloud-based image recognition technology,
- Anchor Observer: Use it to dynamically create fixed locations in the space of a scene for placing digital content.
- Illumination Observer: Use it to get an estimation of lighting conditions of the user’s physical environment.
When an Observer is activated, you can start receiving Observations via the State (or sometimes via callback).
The State collects information about the observed scene at a snapshot in time. This includes information on the Observations produced by the Observers, but it is also used for the camera frame data and the render state.
In Unity, the State is handled automatically and the Unity scene is updated every frame. You therefore do not need to make explicit calls to retrieve information from the state.
Retrieve the Observations with push and pull mechanisms. What you can retrieve from the state depends on the platform and the type of Observer(s) you will be using.
Observations contain information created by the Observers at a given moment in time. As users move about and interact with their AR scene, the Observer reports changes on what it was set to observe a target’s status. Such reports are known as Observations that are collected in the State. Observations can contain a composition of different data (named Info in the native API), such as pose info, status info, mesh info, etc. It is possible to retrieve Observations either via the State or via a registered callback function.
Options for retrieving information from the State:
- Use a pull mechanism to update all the activated Observers and retrieve all their Observations from the State object. We recommend this approach.
- Use a push mechanism to register a global callback, which delivers the collected Observations from the State object. It should only be used for critical processing such as computer vision analysis.
Most Observations are reported to the State in native, but a few Observations behave differently and require to be accessed directly with an Observer callback. One example is the Cloud Image Target Observer. Specific use cases may also require you to use the alternative push mechanism. For example, when Observations are collected at a very low frequency or when they are manually triggered from i.e., user interactions.
Many of the controls and settings of the Vuforia Engine are set with default configurations before the Engine is started. But if you need to, you can use the Controller to adjust the Engine and other settings at runtime.
Some examples of these settings are:
- CameraDevice/CameraController: Controls the access to camera properties such as video mode, autofocus, and flash.
- PlatformController: Controls the access to platform-specific features such as the device orientation and the Fusion Provider. Some features are platform-specific and only available on their respective platforms and devices (i.e., Android, iOS, and UWP).
- VideoBackground/RenderController: Controls the access to the configuration of the rendering.
See Vuforia Features on getting started with Vuforia features or go to our Migration Guide for Native and Migration Guide for Unity for advice on migrating your existing Vuforia AR projects to Vuforia Engine 10. See Vuforia Engine Native Lifecycle and Vuforia Engine in Unity for an introduction to app structure and the core concepts in use.