Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Title Page
Copyright
Augmented Reality for Developers
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Why subscribe?
Customer Feedback
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
Augment Your World
What is augmented reality?
Augmented reality versus virtual reality
How AR works
Handheld mobile AR
Optical eyewear AR
Target-based AR
3D spatial mapping
Developing AR with spatial mapping
Input for wearable AR
Other AR display techniques
Types of AR targets
Marker
Coded Markers
Images
Multi-targets
Text recognition
Simple shapes
Object recognition
Spatial maps
Geolocation
Technical issues in relation to augmented reality
Field of view
Visual perception
Focus
Resolution and refresh rate
Ergonomics
Applications of augmented reality
Business marketing
Education
Industrial training
Retail
Gaming
Others
The focus of this book
Summary
Setting Up Your System
Installing Unity
Requirements
Download and install
Introduction to Unity
Exploring the Unity Editor
Objects and hierarchy
Scene editing
Adding a cube
Adding a plane
Adding a material
Saving the scene
Changing the Scene view
Game development
Material textures, lighting, and shaders
Animation
Physics
Additional features
Using Cameras in AR
Getting and using Vuforia
Installing Vuforia
Downloading the Vuforia Unity package
Importing the Vuforia Assets package
VuforiaConfiguration setup
License key
Webcam
Building a quick demo with Vuforia
Adding AR Camera prefab to the Scene
Adding a target image
Adding a cube
Getting and using ARToolkit
Installing ARToolkit
Importing the ARToolkit Assets package
ARToolkit Scene setup
Adding the AR Controller
Adding the AR Root origin
Adding an AR camera
Saving the Scene
Building a quick demo with ARToolkit
Identifying the AR Marker
Adding an AR Tracked Object
Adding a cube
Summary
Building Your App
Identifying your platform and toolkits
Building and running from Unity
Targeting Android
Installing Java Development Kit (JDK)
About your JDK location
Installing an Android SDK
Installing via Android Studio
Installing via command-line tools
About your Android SDK root path location
Installing USB device, debugging and connection
Configuring Unity's external tools
Configuring a Unity platform and player for Android
Building and running
Troubleshooting
Android SDK path error
Plugins colliding error
Using Google ARCore for Unity
Targeting iOS
Having an Apple ID
Installing Xcode
Configuring the Unity player settings for iOS
ARToolkit player settings
Building and running
Troubleshooting
Plugins colliding error
Recommended project settings warning
Requires development team error
Linker failed error
No video feed on the iOS device
Using Apple ARKit for Unity
Targeting Microsoft HoloLens
Having a Microsoft developer account
Enabling Windows 10 Hyper-V
Installing Visual Studio
Installing the HoloLens emulator
Setting up and pairing the HoloLens device for development
Configuring Unity's external tools
Configuring the Unity platform and player for the UWP holographic
Build settings
Quality settings
Player settings - capabilities
Player settings - other settings
Vuforia settings for HoloLens
Enabling extended tracking
Adding HoloLensCamera to the Scene
Binding the HoloLens Camera
Building and running
Holographic emulation within Unity
MixedRealityToolkit for Unity
Summary
Augmented Business Cards
Planning your AR development
Project objective
AR targets
Graphic assets
Obtaining 3D models
Simplifying high poly models
Target device and development tools
Setting up the project (Vuforia)
Adding the image target
Adding ImageTarget prefab to the scene
Creating the target database
Importing database into Unity
Activating and running
Enable extended tracking or not?
What makes a good image target?
Adding objects
Building and running
Understanding scale
Real-life scale
Virtual scale and Unity
Target scale and object scale
Animating the drone
How do the blades spin?
Adding an Idle animation
Adding a fly animation
Connecting the clips in the Animator Controller
Playing, building and running
Building for iOS devices
Setting up the project
Adding the image target
Adding objects
Build settings
Building and running
Building and running using Apple ARKit
Building for HoloLens
Setting up the project
Adding the image target
Adding objects
Build settings
Building and running
Building with ARToolkit
Setting up the project
Preparing the image target
Adding the image target
Adding objects
Building and running
Summary
AR Solar System
The project plan
User experience
AR targets
Graphic assets
Target device and development tools
Setting up the project
Creating our initial project
Setting up the scene and folders
Using a marker target
Creating a SolarSystem container
Building the earth
Creating an earth
Rotating the earth
Adding audio
Lighting the scene
Adding sunlight
Night texture
Building an earth-moon system
Creating the container object
Creating the moon
Positioning the moon
A quick introduction to Unity C# programming
Animating the moon orbit
Adding the moon orbit
Adding a global timescale
Orbiting the sun
Making the sun the center, not the earth
Creating the sun
The earth orbiting around the sun
Tilt the earth's axis
Adding the other planets
Creating the planets with textures
Adding rings to Saturn
Switching views
Using VuMark targets (Vuforia)
Associating markers with planets
Adding a master speed rate UI
Creating a UI canvas and button
Gametime event handlers
Trigger input events
Building and running
Exporting the SolarSystem package
Building for Android devices – Vuforia
Building for iOS devices – Vuforia
Building for HoloLens – Vuforia
Building and running ARTookit
ARToolkit markers
Building the project for AR Toolkit
Using 2D bar code targets (AR Toolkit)
Markerless building and running
Building and running iOS with ARKit
Setting up a generic ARKit scene
Adding SolarSystem
Placing SolarSystem in the real world
UI for animation speed
Building and running HoloLens with MixedRealityToolkit
Creating the scene
Adding user selection of scale and time
Summary
How to Change a Flat Tire
The project plan
Project objective
User experience
Basic mobile version
AR mobile version
Markerless version
AR targets
Graphic assets and data
Software design patterns
Setting up the project
Creating the UI (view)
Creating an Instruction Canvas
Creating a Nav Panel
Creating a Content panel
Adding a title text element
Adding a body text element
Creating an Instructions Controller
Wiring up the controller with the UI
Creating an instruction data model
InstructionStep class
InstructionModel class
Connecting the model with the controller and UI
Loading data from a CSV file
Abstracting UI elements
Adding InstructionEvent to the controller
Refactoring InstructionsController
Defining InstructionElement
Linking up the UI elements in Unity
Adding image content
Adding an image to the instruction Content panel
Adding image data to the InstructionStep model
Importing the image files into your project
Adding video content
Adding video to the instruction content panel
Adding video player and render texture
Adding video data to the InstructionStep model
Adding a scroll view
Summary
Augmenting the Instruction Manual
Setting up the project for AR with Vuforia
Switching between AR Mode
Using user-defined targets
Adding a user-defined target builder
Adding an image target
Adding a capture button
Wire capture button to UDT capture event
Adding visual helpers to the AR Prompt
Adding a cursor
Adding a registration target
Removing the AR prompt during tracking
Preventing poor tracking
Integrating augmented content
Reading the AR graphic instructions
Creating AR UI elements
Displaying the augmented graphic
Making the augmented graphics
Including the instructions panel in AR
Using ARKit for spatial anchoring
Setting up the project for ARKit
Preparing the scene
Modifying the InstructionsController
Adding the AR mode button
Adding the anchor mode button
Adding the AR prompt
Adding AR graphic content
A Holographic instruction manual
Setting up the project for HoloLens
World space content canvas
Enabling the next and previous buttons
Adding an AR prompt
Placement of the hologram
Adding AR graphics content
Summary
Room Decoration with AR
The project plan
User experience
Graphic assets
Photos
Frames
User interface elements
Icon buttons
Setting up the project and scene
Create a new Unity project
Developing for HoloLens
Creating default picture
About Mixed Reality Toolkit Input Manager
Gaze Manager
Input Manager
Mixed Reality Toolkit input events
Creating a toolbar framework
Create a toolbar
PictureController component
PictureAction component
Wire up the actions
Move tool, with spatial mapping
Add the Move button and script
Use Spatial Mapping for positioning
Understanding surface planes
Scale tool with Gesture Recognizer
Adding the scale button and script
Scaling the picture
Supporting Cancel
Abstract selection menu UI
Adding the frame menu
SetFrame in PictureController
The FrameMenu object and component
Frame options objects
Activating the frame menu
Support for Cancel in PictureController
Adding the Image menu
SetImage in PictureController
The ImageMenu object and component
Image options objects
Activating the Image menu
Adjusting for Image aspect ratio
Adding and deleting framed pictures
Add and Delete in the Toolbar
GameController
Add and Delete Commands in PictureController
Handling empty scenes
UI feedback
Click audio feedback
Click animation feedback
Building for iOS with ARKit
Set up project and scene for ARKit
Use touch events instead of hand gestures
PictureAction
ClickableObjects
ScaleTool
MoveTool
Building for mobile AR with Vuforia
Set up project and scene for Vuforia
Set the image target
Add DefaultPicture to the scene
GameController
Use touch events instead of hand gestures
Summary
Poke the Ball Game
The game plan
User experience
Game components
Setting up the project
Creating an initial project
Setup the scene and folders
Importing the BallGameArt package
Setting the image target
Boxball game graphics
Ball game court
Scale adjustments
Bouncy balls
Bounce sound effect
Throwing the ball
Ready ball
Holding the ball
Throwing the ball
Detecting goals
Goal collider
CollisionBehavior component
Goal! feedback
Cheers for goals
BallGame component
Keeping score
Current core UI
Game controller
Tracking high score
Augmenting real-world objects
About Vuforia Smart Terrain
User experience and app states
Screen space canvas
Using Smart Terrain
Handling tracking events
App state
App state manager
Wiring up the state manager
Playing alternative games
Setting up the scene with ball games
Activating and deactivating games
Controlling which game to play
Other toolkits
Summary
← Prev
Back
Next →
← Prev
Back
Next →