Before following this guide, please refer to the Augmented Images overview for important considerations, practical tips and recommendations.
- This guide assumes you have already installed and configured Unreal Engine 4.19 with the GoogleARCore plugin 1.2+. If not, see the Quickstart for Unreal for installation and setup steps.
Build and run the sample
Download the arcore-unreal-sdk to get the Augmented Image sample project.
For instructions on building and running the sample project, see the Quickstart for Unreal.
Using Augmented Images
To use the Augmented Images feature, create a
GoogleARCoreConfigData Asset in the Unreal Content Browser.
GoogleARCoreAugmentedImageDatabaseasset you created in the previous step and add any images you want ARCore to detect and track to the
You will be asked to provide a texture and optionally, a name and an estimated width in meters of the image in the real world. Note that if you don't know the width or it can't be determined, you can put 0.0 in the width field. ARCore will try to estimate the size when it detects the image, but this may require the user to do some parallel motion before it can detect the image.
After you finish configing the augmented images database, open your
GoogleARCoreConfigasset, and select the database asset you just created in the AugmentedImageDatabase. Note that if you select none in that session, the augmented image feature will be disabled in your ARCore session.
GoogleARCoreConfigin BluePrint or C++. Your AR app should be all set to detect Augmented Images.
In your project, you can use the Blueprints or C++ function in Unreal's
Augmented Reality module to get all tracked geometry and try cast to
GoogleARCoreAugmentedImage type. When an image is detected by ARCore, you will
be able to get an instance for this
GoogleARCoreAugmentedImage type. Then you
can query the name, index, transform, and extent of it using the Blueprints or
C++ function. Checkout the level blueprint in the Augmented Images Map in the
sample project for details.