Augmented Reality in Sumerian
Total Page:16
File Type:pdf, Size:1020Kb
Amazon Sumerian Amazon Sumerian by Tutorials By Brian Moakley & Gur Raunaq Singh Copyright ©2019 Razeware LLC. Notice of Rights All rights reserved. No part of this book or corresponding materials (such as text, images, or source code) may be reproduced or distributed by any means without prior written permission of the copyright owner. Notice of Liability This book and all corresponding materials (such as source code) are provided on an “as is” basis, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in action of contract, tort or otherwise, arising from, out of or in connection with the software or the use of other dealing in the software. Trademarks All trademarks and registered trademarks appearing in this book are the property of their own respective owners. raywenderlich.com 2 Amazon Sumerian Table of Contents: Overview About the Cover...................................................................................... 13 What You Need........................................................................................ 17 Book License............................................................................................. 19 Project Files & Forum............................................................................ 20 Foreword.................................................................................................... 21 Introduction.............................................................................................. 23 Section I: Creating an Escape Room............................. 26 Chapter 1: Getting Started with Amazon Sumerian................. 28 Chapter 2: Building the Escape Room ............................................ 39 Chapter 3: Entities & Materials......................................................... 60 Chapter 4: Adding Interactivity with Behaviors......................... 96 Chapter 5: Attributes & Branching Logic ................................... 127 Chapter 6: Physics ............................................................................... 162 Chapter 7: Virtual Reality................................................................. 188 Chapter 8: Post Effects & Publishing Your Scene.................... 204 Section II: Building an Educational Experience 221..... Chapter 9: Custom Models & Sound............................................ 223 Chapter 10: Lights, Camera, Action.............................................. 250 Chapter 11: Introduction to JavaScript ...................................... 281 Chapter 12: The Sumerian API....................................................... 304 Chapter 13: Animation & Particle Systems ............................... 330 raywenderlich.com 3 Amazon Sumerian Chapter 14: Incorporating Web Content................................... 365 Section III: Creating an Augmented Reality Experience ......................................................................... 385 Chapter 15: Preparing Your Mobile Development Environment........................................................................................... 386 Chapter 16: Augmented Reality in Sumerian ........................... 415 Chapter 17: Fetching Data from DynamoDB ........................... 432 Chapter 18: Completing the Augmented Reality App .......... 456 Section IV: Creating a Virtual Travel Agent ............ 482 Chapter 19: Basics of a Sumerian Host....................................... 483 Chapter 20: Speech in Amazon Sumerian.................................. 500 Chapter 21: Audio Input & Lex ....................................................... 511 Chapter 22: Integrating Amazon Lambda with Lex................ 530 Conclusion .............................................................................................. 545 raywenderlich.com 4 Amazon Sumerian Table of Contents: Extended About the Cover . 13 About the Authors . 16 About the Editor . 16 About the Artists . 16 What You Need . 17 Book License . 19 Project Files & Forum . 20 Foreword . 21 Introduction . 23 Section I: Creating an Escape Room. 26 Chapter 1: Getting Started with Amazon Sumerian . 28. Creating an AWS Account . 30 Creating an IAM account . 34 Key points. 38 Where to go from here?. 38 Chapter 2: Building the Escape Room . 39 Launching Sumerian . 39 Using the Sumerian editor . 41 Configuring Firefox . 43 Navigating the Canvas . 44 Creating a secret door . 53 Challenges . 55 Key points. 59 Where to go from here?. 59 Chapter 3: Entities & Materials . 60 Diving deeper into entities. 60 raywenderlich.com 5 Amazon Sumerian Components . 62 Getting in sync . 63 Parenting entities . 70 Adjusting the Lights. 72 Using materials . 75 Adding models . 84 Challenge . 89 Key points. 95 Where to go from here?. 95 Chapter 4: Adding Interactivity with Behaviors . 96 Setting up the Player Camera. 97 Adding interactivity . 101 Sending messages . 105 Light switch puzzle . 115 Revealing the next clue . 118 Key points . 125 Where to go from here? . 126 Chapter 5: Attributes & Branching Logic. 127 Setting up the puzzle pieces . 128 Building logic with attributes. 134 Building a branching behavior. 136 Using multiple clues . 150 Challenge. 157 Key points . 161 Where to go from here? . 161 Chapter 6: Physics. 162 Setting up the third puzzle . 162 Using Rigid Bodies. 165 Adding colliders . 168 Adding velocity . 171 raywenderlich.com 6 Amazon Sumerian Listening for collisions. 179 Escaping the escape room . 182 Key points . 186 Where to go from here? . 186 Chapter 7: Virtual Reality . 188 Configuring Sumerian to use VR . 189 Setting up a tethered headset . 190 Setting up an untethered headset. ..