♪ [MUSIC] ♪
[BRAD] Hello, everyone, and welcome to our Unite Now session
on building spatial AR applications with Vuforia Engine in Unity.
My name is Brad Pitser. I'm the Director of Augmented Reality
for Vuforia Engine at PTC.
In this session, I'll be covering the value
of spatial augmented reality
and later I'll be joined by one of my colleagues,
who'll show you how to build an application
with one of our most innovative features to date
called Area Targets. Let's get started.
Vuforia Engine launched Area Targets in March of 2020.
This unique spatial augmented reality technology
allows you to use a digital twin of the world around you
to view digital content in the context of the environment.
That means attaching any kind of augmented information
to anything and everything in the space you're in.
The possibilities are endless, from spatial navigation
to IoT data, to spatially aware instructions,
to games, and more.
Areas like museums, retail stores, offices, factory floors,
are all ideal environments for Area Targets.
In our session today, we're going to walk through
what Area Targets are,
and why they can be invaluable to your application.
We will discuss the what, where, when, and why
of how you would use Area Targets in your large spaces,
including how to make them.
I will also give you a demonstration of a new app that we just released
called the Area Target Creator
that uses your LiDAR scanner-enabled phone or tablet
to display, scan, and create
an Area Target from the space around you.
Then I'll be passing it over to one of our senior AR engineers,
Jake Steinerman, to show you how to build
an Area Target application in Unity.
Vuforia Engine Area Targets enable customers to recognize
and track to an entire space,
be it a factory or a museum
for a unique augmented reality experience.
Using a supported commercial scanner
or our Area Target Creator app on your device,
developers can create detailed 3D models of a desired location.
From this digital twin of your space,
we can build an Area Target with Vuforia Area Target Generator
which can later be brought into Unity where you can create
a fully interactive AR application.
Why is spatial AR so valuable?
What makes it so different than any other AR feature available today?
The spaces where we live, work and shop
have an abundance of valuable information,
but it can be difficult to access relevant data in its true context.
Many augmented reality applications today
rely on object or image-based tracking,
which is limited to having the subject in view
and is not designed for large, immersive experiences.
Most AR platform providers also offer ground plane tracking,
which offers the ability to place 3D objects on flat surfaces,
but their placement is arbitrary and without context
to a specific location.
Area Targets offer the ability to create immersive,
persistent, spatial AR experiences
that are completely coupled to an environment.
Using the space itself as the target
with 3D augmentations connected directly to the environment,
people can view relevant information contextually.
This can be incredibly valuable for a variety of different locations
for creating dynamic navigation,
viewing real-time data about the space,
or even placing promotional experiences
in the setting of your location.
As I mentioned earlier, there are a variety of different spaces
where Area Targets can bring value.
Some of the more ideal locations and applications
where we are seeing developers build amazing experiences
are in museums, offices, factories, retail stores, hotels and airports.
Just like in the case of locations,
there are hundreds of different ways you can create
Area Target-powered applications.
Two of the most powerful use cases are in-context information
and guided navigation.
In an industrial use case, you can attach digital content,
like real-time IoT data, images and videos
to your factory floor to give better context
to the frontline workers.
Or in the case of an office building, you can create navigation experiences
to help guide employees or visitors through your building,
showing them room numbers, people's offices,
booking conference rooms, and even
control the rooms' environmental settings,
such as lighting and air temperature.
We've recently released the Vuforia Area Target Creator application,
which allows developers to easily generate an Area Target
of a small space using depth-enabled mobile devices,
such as the new iPads and iPhones with LiDAR scanners.
The Vuforia Area Target Creator also enables users to test tracking
and the stability of the same Area Targets
in their corresponding environments before developing content.
This app is a great way to introduce you to Area Targets
and allow you to see the incredible value
that it can bring to your applications.
Let's walk through a quick demonstration.
When you create an Area Target, you'll be prompted to log in
with your Vuforia developer credentials.
You must have internet connection to do this.
You can open an existing Area Target by pressing container button.
But to create an Area Target from scratch, press the plus button
and a new window will prompt you to name your Area Target.
Once you've named your Area Target, then hit Start Scan.
The app will prompt you to slowly move around the room
and capture the room with your mobile device,
scanning up and down to capture the space.
Like painting a wall, you will see a colorful mesh
on the surfaces captured while you scan.
Note that the timer is also started on the right side of the screen,
which will inform you of the available scanning time in minutes.
If you hit the three-minute marker,
the scanning process automatically finishes
and you'll be prompted to either save or discard your scan.
When you are finished scanning, press the stop button.
If you're happy with your scan, press Generate
and the Vuforia Area Target Creator
will generate an Area Target database.
I can test this Area Target by selecting the container button
and loading the Area Target that I just created.
I will load the Area Target I just made
and begin moving through the space I just scanned.
You will see a successful Area Target when you see white lines
delineating the geometry and objects in the space.
This means the space has been recognized
and is tracking good.
This Area Target database can be transferred to your computer as well
and loaded to Unity so you can start authoring
your spatial AR application.
Now that we've talked about the value and uses for Area Targets
and how to create a new Area Target
with our Area Target Creator application,
I'm going to hand things off to my colleague, Jake,
who will walk you through the process of creating
an Area Target AR experience in Unity
from a scan taken from a commercial 3D scanner.
Thanks, Brad. Hi, Unity developers.
My name is Jake Steinerman, and I'm a Senior
Augmented Reality Engineer with PTC.
In the second half of this session, I'm going to walk you through
how to go and create an Area Targets experience in Unity.
Then at the end of the session, you're going to see
how an Area Targets application built in Unity all comes together.
Now, let's go over what you're going to need.
♪ [MUSIC] ♪
First, the Vuforia Engine SDK versions 9.0 or higher;
the Vuforia Engine Area Target Generator;
a commercially supported 3D scanner or depth-enabled mobile device;
the latest version of the Unity 3D Editor;
and of course, a space you're going to want to augment.
In its initial 9.0 release, Area Target supports environments
of up to a thousand square meters, around 10,000 square feet.
We're continuing to update the size of spaces that we support
so keep an eye on the Vuforia Developer Portal
for future updates.
Vuforia Engine Area Targets require the use of a supported 3D scanner.
Our current list of supported devices and best practices
can be found on the Vuforia Developer Portal.
The team is actively working on expanding our 3D scanner support
for future releases,
but if there are any other 3D scanners you'd want to see
supported in the future, let our team know
in the developer forums.
There's four steps to creating an Area Target experience.
♪ [MUSIC] ♪
First, is creating a scan of your space.
Second, generating an Area Target database
using the Area Target Generator.
Third, importing the Area Target into Unity.
And last but not least, is building and testing your experience.
Let's get started.
♪ [MUSIC] ♪
In order to create a Vuforia Engine Area Target,
you're going to need a 3D scan of your desired environment.
We won't be going into the steps and best practices for creating a 3D scan
since each scanner has different requirements.
Be sure to check out our Developer Portal for more information.
♪ [MUSIC] ♪
Once you've completed your scan
and acquired the 3D model of your room,
open the Area Target Generator, which you can download
from the Downloads > Tools section of the Vuforia Developer Portal.
Then log in with your Vuforia developer credentials.
In this example, we're using a Matterport Pro2 camera,
and in order to bring your scanned space
into the Area Target Generator, you're going to need to enter
your Matterport API keys and enter the space ID.
As we continue to add more supported 3D scanners,
the process for creating an Area Target
is going to change a little bit.
♪ [MUSIC] ♪
Once all the information has been entered,
click Create Area Target.
Then you'll see how many Area Targets
you have remaining in your account
and where your targets are going to be saved.
The free Vuforia developer license
starts with a quota of ten Area Targets.
But a VIP or Pro license will allow you
to generate unlimited Area Targets.
Next, click Continue.
Then you'll see a log output about the downloading, processing,
and generation of the Area Target during the creation process.
If you wish, you can stop the process by pressing Cancel.
Once the process is done, an OK button will become available.
By pressing it, you'll get returned to the home screen.
Your Area Target dataset is available in the folder
you selected at the beginning of the process,
and it's ready to be imported into the Unity Editor.
♪ [MUSIC] ♪
Open a new or existing Unity Project and be sure to set it up
with Vuforia Engine.
Then remove the Main Camera from the Scene
and replace it with a Vuforia Engine AR Camera object.
Obtain a license key from the Vuforia Developer Portal
and place it in the License Key field
under Vuforia Configuration in the AR Camera drop-down.
Be sure to enable Device Tracker at the same time.
Just to note, you can get a free developer license key
under the Develop tab when you're logged in
to the Vuforia Engine Developer Portal.
If you want to publish your app to an app store for commercial
or internal use, you can find the link to our pricing options
on the Vuforia Developer Portal.
After the license key has been added,
create an Area Target GameObject from the GameObject drop-down menu
under Vuforia Engine, and then select Area Target.
You can import the Area Target database Unity package
that was generated in the Area Target Generator
by selecting Assets > Import Package > Custom Package.
In the Inspector window of the Area Target GameObject,
choose the imported database and Area Target
via the drop-down menu.
Now it's time to configure your Area Target.
The Area Target database contains additional assets
of the scanned area, including textures, materials,
and a Prefab model.
After importing the package, locate these files in the folder
Editor > Vuforia, and then the name of your dataset.
The preview model of the scanned area
is added automatically to the Area Target,
but a Prefab can also be placed in the Scene if you want to modify
certain captured elements of the area.
This preview model is for the purpose of visualization,
of authoring, occlusion rendering, and Simulation Mode.
Another note, changing the size of the Area Target GameObject
isn't supported.
This guarantees that your scanned real environment
contains its original scale
throughout the entire development workflow.
If you need to use a different Scene scale in your Project,
please review the Virtual Scene Scale Factor
over in the Developer Portal.
You can find the link to that in the description as well.
While placing your 3D objects, you can enable occlusion
on your real environment by using the 3D model.
By ticking the box for Simulate Occlusion,
your preview mesh hides the content that is obstructed
by the environment's walls and doors when used in Play Mode.
If you wish to test your Area Target
while being able to see all of your content, untick this box.
With an occlusion shader on the preview model,
selectively hide content behind walls or doors.
Use raycasting with a Mesh Collider
to let users place augmented content at runtime,
or add a Navigation Mesh to your Scene
to guide users around.
Now that you've added your Area Target,
let's put some 3D content in it, like this drone, to test it out.
Place your own content into the Scene
and position it in relation to the preview model,
matching the scale of the environment.
Add your augmentation content as a child
of the Area Target GameObject.
Once you've placed all your digital content down
within your Area Target, you can preview the experience
in Simulator Mode.
Simulator Mode is located in Vuforia Configuration under Play Mode.
Set up your preferences for walking speed
in Key bindings and press the Play button.
This allows you to navigate through your environment
while at your computer, providing you with a full preview
of your experience to test your effects
and interact with components.
♪ [MUSIC] ♪
When you're ready, you can build your Unity Project to your AR Core
or AR Kit-supported device, or to a HoloLens for testing.
A Vuforia Engine project is built in the same way
as other Unity apps for Android, iOS, and UWP platforms.
And here's the result of the Area Target we've been working on.
As you can see, Area Targets track the entire scanned space
keeping your augmentation stable
and allowing for a completely immersive experience.
Thanks, everyone, for attending our Unite Now session.
If you want to learn more about Area Targets
or other Vuforia Engine features and functionality,
please visit our Developer Portal. If you have any questions
or want to share your finished experiences with us,
head on over to the community forums.
♪ [MUSIC] ♪