Book Image

Learn ARCore - Fundamentals of Google ARCore

Book Image

Learn ARCore - Fundamentals of Google ARCore

Overview of this book

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.
Table of Contents (17 chapters)
Title Page
Packt Upsell
Contributors
Preface
Index

3D lighting


So far, we have looked at the basics of the rendering process and how a 3D model is rendered. What we omitted in the first section, however, is how lighting plays into this. In order to get a sense of the importance of lights in a 3D scene, how about we go ahead and turn out the lights. Open up Unity to where we left off in the first section and follow along:

  1. Select the Directional Light object in the Hierarchy window.
  2. Disable the Light in the Inspector window by unchecking the box beside the object's name. This will turn off or disable the light. You will note that not all the lights go off, however. This is because we have an ambient or global light that is used to account for general light scattering.
  1. You are now left with a dark object with no lights and shadows. Turn back on the Directional Light by clicking on the checkbox. Take a look at the properties of the Light in the Inspector window, as shown:

Directional Light properties in the Inspector window

  1. Play with the Type, Color...