Book Image

Augmented Reality for Android Application Development

Book Image

Augmented Reality for Android Application Development

Overview of this book

Augmented Reality offers the magical effect of blending the physical world with the virtual world, which brings applications from your screen into your hands. AR redefines advertising and gaming, as well as education. It will soon become a technology that will have to be mastered as a necessity by mobile application developers. Augmented Reality for Android Application Development enables you to implement sensor-based and computer vision-based AR applications on Android devices. You will learn about the theoretical foundations and practical details of implemented AR applications, and you will be provided with hands-on examples that will enable you to quickly develop and deploy novel AR applications on your own. Augmented Reality for Android Application Development will help you learn the basics of developing mobile AR browsers, how to integrate and animate 3D objects easily with the JMonkeyEngine, how to unleash the power of computer vision-based AR using the Vuforia AR SDK, and will teach you about popular interaction metaphors. You will get comprehensive knowledge of how to implement a wide variety of AR apps using hands-on examples. This book will make you aware of how to use the AR engine, Android layout, and overlays, and how to use ARToolkit. Finally, you will be able to apply this knowledge to make a stunning AR application.
Table of Contents (14 chapters)
Augmented Reality for Android Application Development
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
1
Augmented Reality Concepts and Tools
Index

Using the scenegraph to overlay a 3D model onto the camera view


In the previous chapter you learned how to set up a single viewport and camera to render the video background. While the virtual camera determines how your 3D graphics are projected on a 2D image plane, the viewport defines the mapping of this image plane to a part of the actual window in which your application runs (or the whole screen of the smartphone if the app runs in fullscreen mode). It determines the portion of the application window in which graphics are rendered. Multiple viewports can be stacked and can cover the same or different screen areas as shown in the following figure. For a basic AR application, you typically have two viewports. One is associated with the camera rendering the background video and one is used with a camera rendering the 3D objects. Typically, these viewports cover the whole screen.

The viewport size is not defined in pixels but is unitless and is defined from 0 to 1 for the width and height...