O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Learn ARCore - Fundamentals of Google ARCore

Book Description

Create next-generation Augmented Reality and Mixed Reality apps with the latest version of Google ARCore

About This Book

  • Harness the power of the Google's new augmented reality (AR) platform ARCore to build cutting-edge Augmented reality apps
  • Learn core concepts of Environmental Understanding, Immersive Computing, and Motion Tracking with ARCore
  • Extend your application by combining ARCore with OpenGL, Machine Learning and more.

Who This Book Is For

This book is for web and mobile developers who have broad programming knowledge on Java or JavaScript or C# and want to develop Augmented Reality applications with Google ArCore. To follow this book no prior experience with AR development, 3D, or 3D math experience is needed.

What You Will Learn

  • Build and deploy your Augmented Reality app to the Android, Web, and Unity platforms
  • Implement ARCore to identify and visualize objects as point clouds, planes, surfaces, and/or meshes
  • Explore advanced concepts of environmental understanding using Google ARCore and OpenGL ES with Java
  • Create light levels from ARCore and create a C# script to watch and propagate lighting changes in a scene
  • Develop graphics shaders that react to changes in lighting and map the environment to place objects in Unity/C#
  • Integrate motion tracking with the Web ARCore API and Google Street View to create a combined AR/VR experience

In Detail

Are you a mobile developer or web developer who wants to create immersive and cool Augmented Reality apps with the latest Google ARCore platform? If so, this book will help you jump right into developing with ARCore and will help you create a step by step AR app easily.

This book will teach you how to implement the core features of ARCore starting from the fundamentals of 3D rendering to more advanced concepts such as lighting, shaders, Machine Learning, and others.

We'll begin with the basics of building a project on three platforms: web, Android, and Unity. Next, we'll go through the ARCore concepts of motion tracking, environmental understanding, and light estimation. For each core concept, you'll work on a practical project to use and extend the ARCore feature, from learning the basics of 3D rendering and lighting to exploring more advanced concepts.

You'll write custom shaders to light virtual objects in AR, then build a neural network to recognize the environment and explore even grander applications by using ARCore in mixed reality. At the end of the book, you'll see how to implement motion tracking and environment learning, create animations and sounds, generate virtual characters, and simulate them on your screen.

Style and approach

Practical examples that will take you through the basics of ARcore and teach you how to build an app using it.

Downloading the example code for this book You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

Table of Contents

  1. Title Page
  2. Copyright and Credits
    1. Learn ARCore - Fundamentals of Google ARCore
  3. Packt Upsell
    1. Why subscribe?
    2. PacktPub.com
  4. Contributors
    1. About the author
    2. About the reviewer
    3. Packt is searching for authors like you
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
      1. Download the example code files
      2. Download the color images
      3. Conventions used
    4. Get in touch
      1. Reviews
  6. Getting Started
    1. Immersive computing
    2. AR and ARCore
      1. Motion tracking
      2. Environmental understanding
      3. Light estimation
    3. The road ahead
    4. Summary
  7. ARCore on Android
    1. Installing Android Studio
    2. Installing ARCore
      1. Installing the ARCore service on a device
    3. Build and deploy
    4. Exploring the code
    5. Summary
  8. ARCore on Unity
    1. Installing Unity and ARCore
    2. Building and deploying to Android
    3. Remote debugging
      1. Testing the connection
      2. Remotely debugging a running app
    4. Exploring the code
      1. Unity Update method
    5. Summary
  9. ARCore on the Web
    1. Installing WebARonARCore
    2. Installing Node.js
      1. The Node Package Manager
    3. Exploring the samples
    4. Debugging web apps on Android
      1. Connecting Chrome Developer tools
      2. Debugging with Chrome
    5. 3D and three.js
      1. Understanding left- or right-handed coordinate systems
      2. 3D scale, rotation, and transformation
    6. Summary
  10. Real-World Motion Tracking
    1. Motion tracking in depth
    2. 3D sound
    3. Resonance Audio
    4. A tracking service with Firebase
      1. Setting up the database
      2. Time to test the connection
    5. Visualizing tracked motion
    6. Exercises
    7. Summary
  11. Understanding the Environment
    1. Tracking the point cloud
    2. Meshing and the environment
    3. Interacting with the environment
      1. Touch for gesture detection
    4. Drawing with OpenGL ES
    5. Shader programming
      1. Editing the shader
    6. Exercises
    7. Summary
  12. Light Estimation
    1. 3D rendering
      1. Building a test scene
      2. Materials, shaders, and textures
    2. 3D lighting
    3. Light estimation
    4. Cg/HLSL shaders
    5. Estimating light direction
      1. Updating the environmental lighting
    6. Exercises
    7. Summary
  13. Recognizing the Environment
    1. Introduction to ML
      1. Linear regression explained
    2. Deep learning
      1. Neural networks – the foundation of deep learning
    3. Programming a neural network
      1. Scripting the neural network
    4. Training a neural network
      1. Activating the warning
      2. Adding the environmental scanner
      3. Backward propagation explained
      4. Gradient descent explained
      5. Defining the network architecture
      6. The network view of the world
      7. Exercises
    5. TensorFlow
    6. Summary
  14. Blending Light for Architectural Design
    1. Setting up the project
      1. Building the scene
      2. Modifying the base scene
    2. The environment and placing content
    3. Building the UI
      1. Scripting the buttons
    4. Interacting with the virtual
      1. Building the object outliner
      2. Positioning the chair
    5. Lighting and shadows
      1. Turning the shadows on
    6. Exercises
    7. Summary
  15. Mixing in Mixed Reality
    1. Mixed reality and HoloKit
      1. Setting up HoloKit
      2. How does it work?
    2. Introducing WRLD
    3. Setting up WRLD for MR
    4. Navigating the map
      1. Switching from AR to MR
      2. Building the SceneSwitcher
      3. Creating the SceneSwitcher prefab
      4. Modifying the Wrld map script
    5. Mapping, GIS, and GPS
      1. Making the Splash scene
      2. Fixing the altitude issue
    6. What's next?
    7. Exercises
    8. Summary
  16. Performance Tips and Troubleshooting
    1. Diagnosing performance
      1. Chrome DevTools
      2. Android Profiler
      3. Unity Profiler
    2. Tips for managing better performance
    3. General troubleshooting
      1. Troubleshooting code
    4. Exercises
    5. Troubleshooting tips
    6. Summary
  17. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think