Acquisitions Editor: Mariann Barsolo
Development Editor: Gary Schwartz
Technical Editor: John Nyquist
Production Editor: Dassi Zeidel
Copy Editor: Liz Welch
Editorial Manager: Pete Gaughan
Production Manager: Tim Tate
Vice President and Executive Group Publisher: Richard Swadley
Vice President and Publisher: Neil Edde
Book Designer: Caryl Gorska
Compositor: Chris Gillespie, Happenstance Type-O-Rama
Proofreader: Candace English
Indexer: Ted Laux
Project Coordinator, Cover: Katherine Crocker
Cover Designer: Ryan Sneed
Cover Image: Tony Mullen
Copyright 2011 by John Wiley & Sons, Inc., Indianapolis, Indiana
Published simultaneously in Canada
ISBN: 978-1-118-03663-1
ISBN: 978-1-118-18005-1 (ebk.)
ISBN: 978-1-118-18007-5 (ebk.)
ISBN: 978-1-118-18006-8 (ebk.)
No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permissions .
Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation warranties of fitness for a particular purpose. No warranty may be created or extended by sales or promotional materials. The advice and strategies contained herein may not be suitable for every situation. This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services. If professional assistance is required, the services of a competent professional person should be sought. Neither the publisher nor the author shall be liable for damages arising herefrom. The fact that an organization or Web site is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Web site may provide or recommendations it may make. Further, readers should be aware that Internet Web sites listed in this work may have changed or disappeared between when this work was written and when it is read.
For general information on our other products and services or to obtain technical support, please contact our Customer Care Department within the U.S. at (877) 762-2974, outside the U.S. at (317) 572-3993 or fax (317) 572-4002.
Wiley also publishes its books in a variety of electronic formats and by print-on-demand. Not all content that is available in standard print versions of this book may appear or be packaged in all book formats. If you have purchased a version of this book that did not include media that is referenced by or accompanies a standard print version, you may request this media by visiting http://booksupport.wiley.com . For more information about Wiley products, visit us at www.wiley.com .
Library of Congress Control Number: 2011937513
TRADEMARKS: Wiley, the Wiley logo, and the Sybex logo are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States and other countries, and may not be used without written permission. All other trademarks are the property of their respective owners. John Wiley & Sons, Inc. is not associated with any product or vendor mentioned in this book.
10 9 8 7 6 5 4 3 2 1
Dear Reader,
Thank you for choosing Prototyping Augmented Reality . This book is part of a family of premium-quality Sybex books, all of which are written by outstanding authors who combine practical experience with a gift for teaching.
Sybex was founded in 1976. More than 30 years later, were still committed to producing consistently exceptional books. With each of our titles, were working hard to set a new standard for the industry. From the paper we print on, to the authors we work with, our goal is to bring you the best books available.
I hope you see all that reflected in these pages. Id be very interested to hear your comments and get your feedback on how were doing. Feel free to let me know what you think about this or any other Sybex book by sending me an email at . Customer feedback is critical to our efforts at Sybex.
Best regards,
Neil Edde
Vice President and Publisher
Sybex, an Imprint of Wiley
For my family
Acknowledgments
Id like to thank Acquisitions Editor Mariann Barsolo, Editorial Manager Pete Gaughan, Development Editor Gary Schwartz, Technical Editor John Nyquist, Editorial Assistants Jenni Housh and Connor OBrien, Production Editor Dassi Zeidel, Copyeditor Liz Welch, and everyone else at Sybex who contributed to putting this book together. Im also very grateful to the dedicated software developers who contributed their time and effort to create the open source software used in this book, including the ARToolKit, NyARToolkit, Processing, Blender, and JMonkeyEngine developers. I want to single out Adam Clarkson, creator of ARMonkeyKit, in particular for his help with the content of this book.
About the Author
Tony Mullen, PhD, has a broad background in CG and programming. He teaches at Tsuda College in Tokyo, Japan, where his courses include Python programming as well as Blender modeling and animation. He has been a cartoonist and an illustrator; his screen credits include writer, codirector, and lead animator on several short films, including the award-winning live-action/stop-motion film Gustav Braustache and the Auto-Debilitator (2007). He is the author of Introducing Character Animation with Blender; 3D for iPhone Apps with Blender and SIO2; Mastering Blender, Bounce, Tumble, and Splash!: Simulating the Physical World with Blender 3D, and Blender Studio Projects: Digital Movie-Making , all from Sybex.
About the Technical Editor
John R. Nyquist is a Blender Foundation Certified Trainer (BFCT) and has created seven Blender and two ActionScript training videos for CartoonSmart.com, as well as 60 episodes of Bits of Blender. He has worked professionally using Blender/Python, Java, ActionScript, C++, C#, and Lingo for interactive multimedia. John has coauthored two books on Director/Lingo and has served as technical editor for books on Java, Director, and Lingo.
Introduction
Augmented Reality (AR) is a term used for a wide range of related technologies aimed at integrating virtual content and data with live, real-time media. The idea of AR is to mingle what is not really there with what is there as seamlessly as possible, and to present users with an enhanced, or augmented, display of the world around them. The nature of the augmentation could be anything from a textual display of data overlaid on real scenes or objects to complete, interactive 3D graphical scenes integrated into real ones.