Beruflich Dokumente
Kultur Dokumente
Multimedia Project:
Make an Animated AR
Object Using Vuforia and
Unity3D
- Project Report -
Author:
Reynaldi
December 2015
Table of Contents
Augmented Reality........................................................................................2
Unity..............................................................................................................3
Vuforia...........................................................................................................3
Image Target..................................................................................................3
Object Target.................................................................................................4
Vuforia Object Scanner..................................................................................5
3D Model.......................................................................................................5
Digimon.........................................................................................................7
Digivice..........................................................................................................7
Required Program..........................................................................................7
Collecting Dataset.........................................................................................8
Showing the Model......................................................................................10
Result...........................................................................................................12
Implementing the moving character with another model...........................13
Conclusion and Lesson Learned...................................................................16
Augmented Reality
Augmented reality (AR) is the integration of digital information with live
video or the user's environment in real time. Basically, AR takes an existing
picture and blends new information into it. One of the first commercial
applications of AR technology is the yellow first down line in televised
football games.
3
Unifye Viewer or FLARToolKit. These programs allow the developer to tie
animation or contextual digital information in the computer program to an
augmented reality "marker" in the real world.
The end user must download a software application (app) or browser plugin in order to experience augmented reality. Most AR applications are built
in Flash or Shockwave and require a webcam program to deliver the
information in the marker to the computer. The marker, which is sometimes
called a target, might be a barcode or simple series of geometric shapes.
When the computer's AR app or browser plug-in receives the digital
information contained in the marker, it begins to execute the code for the
augmented reality program.
Unity
Unity is a flexible and powerful development platform for creating
multiplatform 3D and 2D games and interactive experiences. It's a
complete ecosystem for anyone who aims to build a business on creating
high-end content and connecting to their most loyal and enthusiastic
players and customers.
Vuforia
Vuforia is an Augmented Reality Software Development Kit (SDK) for mobile
devices that enables the creation of Augmented Reality applications. It uses
Computer Vision technology to recognize and track planar images (Image
Targets) and simple 3D objects, such as boxes, in real-time.
Image Target
Image Targets represent images that the Vuforia SDK can detect and track.
Unlike traditional fiducial markers, data matrix codes and QR codes, Image
Targets do not need special black and white regions or codes to be
recognized. The SDK detects and tracks the features that are naturally
4
found in the image itself by comparing these natural features against a
known target resource database. Once the Image Target is detected, the
SDK will track the image as long as it is at least partially in the cameras
field of view.
Image Target also known as image Marker.
Object Target
Object Recognition allows you to detect and track intricate 3D objects. It
has been designed to work with toys (such as action figures and vehicles)
and other consumer products.
Target
Source
based
targets
Object Targets
Recommended Uses
planarpublications,
images
feature
scan
packaging,
flat
surfaces
Toys,
products,
geometries
complex
3D Model
3D models represent a physical body using a collection of points in 3D
space, connected by various geometric entities such as triangles, lines,
curved surfaces, etc. Being a collection of data (points and other
information),
3D
models
can
be
created
by
hand,
algorithmically
Today, 3D models are used in a wide variety of fields. The medical industry
uses detailed models of organs; these may be created with multiple 2-D
image slices from an MRI or CT scan. The movie industry uses them as
characters and objects for animated and real-life motion pictures. The video
game industry uses them as assets for computer and video games. The
science
sector
uses
them
as
highly
detailed
models
of
chemical
Digimon
Digimon ( Dejimon, branded as Digimon: Digital Monsters, stylized
as DIGIMON), short for "Digital Monsters" ( Dejitaru
Monsut), is a Japanese media franchise encompassing virtual pet toys,
anime, manga, video games, films and a trading card game. The franchise
focuses on Digimon creatures, which are monsters living in a "Digital
World",
parallel
universe
that
originated
from
Earth's
various
Digivice
The Digivice ( Dejivaisu?), short for "Digital Device" is a device
from the Digimon series based on the first Digimon product, the Digimon
virtual pet, and it indicates that the possessor is a DigiDestined. It appears
in every season of the anime, as well as the V-Tamer 01, Chronicle, D-Cyber,
and Next manga, and several of the video games. Its primary use is to
empower the DigiDestined's partner Digimon through Digivolution, though
each version of the Digivice is also equipped with many other helpful
features, such as radar or data storage. Even when Digivice's are the same
type, they are usually differentiated by a color scheme unique to the
character who uses them.
Required Program
To do this project there were some program required. The minimum
requirement is:
1. Unity 5.2.2f1 (32-bit)
2. Vuforia-unity-5-6-0
The unity we are using is the 32 bit version. Because the 64 bit is not
compatible with Vuforia SDK that we are going to use.
The Unity for Windows itself can be obtained in https://unity3d.com/getunity/download . This is an online installer. So you will need a quite fast
internet connection and it better if you have visual studio installed to edit
the C# command in unity platform.
8
Downloading and Installing Vuforia that can be obtained at. The author
download for unity https://developer.vuforia.com/downloads/sdk
Collecting Dataset
Like mentioned before, to do Object Recognition as one of the Goal of this
project, we need to collect some dataset as our Object Targets. This will be
done using the Vuforia Object Scanner. We are using some of the Digimons
Digivice as our Object Target because we are trying to create some Digimon
AR based on author favorites anime franchise.
There are 4 Steps to create an Object Data file by scanning an object.
1.
2.
3.
4.
Before you begin scanning objects, youll need to print out the Object
Scanning target. Be sure to print the target at its native size (100%).
Modifying the target size will affect physical scale estimated by the Object
Scanner.
The Object Scanning Target is used to establish the position of your Object
Target relative to its local origin. This origin is represented by ( 0,0,0 ) in the
lower left hand corner of the Object Scanning Target's grid region and
corresponds to the local (0,0,0) of the Object Target prefab instance's
bounding box. The unit scale of the grid is in millimeters, this unit is also
used for the scene unit and the estimated physical object scale.
The Object we intend to scan need to be put in the white box over the grid
on the top of the left of the Paper like the picture below.
10
We need to place object at the origin 0, 0, 0 and need to cover all side of
the object. As the example, when it only scanned the surface the object like
Figure 1 it will not coverage all the point.
Figure 1
After that we can check the coverage of the object. We need to not move
the object while scanning, and after the dataset is complete we upload the
*od file to the Vuforia Website.
11
12
Then we drag the object target from vuforia assets to unity scen and put or
3d model in it under the hierarchy. For the 3d model the author is using the
3d
model
of
alphamon
taken
from
http://www.models-
resource.com/pc_computer/digimonmasters/model/7149/
13
Then dont forget to add some component to the 3D Model such as Box
Collider, Mesh Renderer, and Cube (Mesh Filer). These components are the
foundation of the 3D Model so it can stand on the object target. It will also
enable the augmentation on the other side like rear side of the object
target when we rotate it.
Then we can build and run by pressing ctrl+shift+B and choosing android
as the platform, because we want to deploy it as android mobile apps. In
the player settings configuration, dont forget to change the product name
into the one you desired. And the bundle identification need to follow the
following rule: com.companyname.productname. With the version, bundle
version and minimum API level set we are ready to go. The application will
be exported as *.apk and we can install it through the android debug
bridge.
Result
As the result, the Alphamon 3D Model will be augmented on the DIgivice
Object Target as below:
14
15
With the right angle, correct lighting and steady hand the augmentation will
easily be shown. These parameters should be fulfilled for the augmentation
to happen and it becomes some weakness of this application.
using
another
model.
With
some
guidance
from
As we can see from the screenshot above the 3D model have the Animator
Component with some Controller called ChuckFight1.
The difference from previous model is in the ChuckFight1 there are already
embedded moving behavior method such as below
16
So what we need is just scaling the abject and creating the movement as
you can see in the screenshots below.
17
And finally here is the final result. We managed to successfully show the
object on the markered paper
18