image
What is Augmented Reality?
What is Augmented Reality?
Difficulty
Intermediate
Duration
43m
Students
33
Description

This course explores augmented reality and how to use it to bring some visuals into our lives, into our living rooms. For example, at the end of this section, we're going to build an app that we can show the Earth, the Mars, and the Venus inside of our living room just like it's real. So, we're going to learn how to do that in this section. If you're ready, let's get started.

Learning Objectives

  • Understand what augmented reality is
  • Learn how to create moving views
  • Learn how to create cubs and spheres
  • Learn how to create an augmented app

Intended Audience

This course is intended for anyone who wants to learn how to develop apps on iOS.

Prerequisites

To get the most out of this course, some basic knowledge of iOS development would be beneficial. We recommend that you take this course as part of the Developing Mobile Apps for iOS learning path.

Transcript

Hi. Within this section, we're going to focus on Augmented Reality, and we're going to use ARKit for that. So, maybe you wonder what is augmented reality? So, this is a way to bring in the virtual life into our rooms by using the camera of our phone. So, as you can see, this kit actually gives us the opportunity to create user experiences that add 2D or 3D visuals, 3D elements to the live view from a device's camera. So, for example, we can create a spaceship or we can create a Star Wars, Death Star or we can create some image to show it in our live camera, okay? So, that we would think that this image, this object is actually sitting inside of our living room. So, this is like a Pokemon Go game, okay? So, we bring virtual things into our real life by using this augmented reality. And I really suggest you come around and take a look at this ARKit documentation after you complete this section because there are a lot of features which you may want to learn later on. But now, I'm just going to close this down, and I'm going to create our project so that we can start learning about augmented reality. And as you can see, I'm not going to go for a single view at this time, but rather I'm just going to choose the augmented reality app and this will create a framework for us. So, after you choose it, hit 'Next'. And as you can see, we have some different options over here. I'm going to call this ARKitFirstProject, okay? We're going to learn about the basics in this lecture, and in here we have some options. In fact, we have seen these options before when we work with SpriteKit. And as you might already remember, metal is for hardcore training, hardcore creating game of engines when you really work with graphic core units, graphical processor. And the SpriteKit, we have worked before, it's for creating 2D games or 2D scenes and SceneKit is for 3D scenes, and RealityKit is created to work with augmented reality in which you can create some 3D apps. Like if you want to play a bowling game inside of your living room, you can do that with the RealityKit. But in this section, we're going to focus on SceneKit because it provides us very good tools to learn about essentials, the basics, the most fundamental things about augmented reality. So, I'm going to go with SceneKit  and we're going to work with 3D objects, okay? So, that's what we're going to do. In fact, after we complete some of the introductory lectures, we're going to create 3D planets, a solar system inside of our living room. So, this is going to be fun. So, let me create this, okay? And let me make this into a big full screen. And maybe you realize there are some differences in our project, and I'm going to explain what are those; don't worry. But I just want to take a note over here to show you something, okay? So, let me come over to our View Controller. I'm going to tell you what are those later on; don't worry. Just right now, I just want to tell you about an A9 chip. So, you need an A9 chip in your phone in order to efficiently work with augmented reality apps, and this is included in iPhones and above, okay? So, if you don't have any phone that is iPhone 6s and above, then you may not be able to work these projects with your phone because obviously, we're going to use our phones, we're going to plug our phones with USB to connect them to the XCode because we will be using our cameras in the section. But if you don't have one of these phones, then it may not work for you because you need A9 chip. And I'm going to explain why do you need this A9 chip later on. But just know that you have to have an iPhone and you have to connect it to your XCode and you have to have an iPhone 6s or above. So, let me come over here. We have this art contents. And in here, we have our 3D objects and other objects that we're going to use in our projects. For example, this spaceship is given to us by Apple in order to test this augmented reality app. As you can see this is completely 3D and I can see every dimension of this. When I go around, when I go up, when I go down, I can see every aspect of it. So, it's kind of cool, right? And we have the texture over here. So, this is the image wrapped around in my ship. So, this is the same image as you can see, so this texture is wrapping around my ship. So, in the View Controller, let's see what we have. First, we have the scene like we did in the SpriteKit. So, we're working with scenes again. And in this scene, we have the delegate as self as usual, and we are showing the statistics like frame per second and timing. Later on I'm going to get rid of that. Remember we don't need that. And over here, we are creating a scene, and this is an SCNScene. So, we're going to work with SCN objects over here, and it gets it's texture, it gets its image from our ship.scn, and we are setting this scene to be seen. I believe we can call this shipScene. So, it might be much better because calling this scene is actually a little bit confusing. If we call this shipScene, it won't matter. So, sceneView.scene will be shipScene. Later on we're going to see how we can create our own objects or how we can find some textures to work on 3D objects, okay? So, that's what we're doing in the viewDidLoad. And over here in the viewWillAppear, it creates a configuration. So, this is where it gets important, so ARWorldTrackinConfiguration. So, this is kind of a configuration that lets you track your object in your augmented reality app. For example, we are creating this ship, and when we open our camera, we will see the ship inside of our living room. And the way to do that, we will just stabilize the ship in one point, and even if we move, it will not move with us; it will be standing on that point. So, it will really give us the feeling of reality, okay? So, this ARWorldTrackingConfiguration is what makes it to. And in order to run this, we need A9 chip, okay? So, A8 and below doesn't support this ARWorldTrackingConfiguration. So, that's why we need an iPhone 6s or above. And under here we were not doing so much and I believe now we are ready to test this because we have seen what's going on in here. And, of course, we're going to change this ship. We're going to bring in some new views and we're going to see how we can create our own views, but right now I want you to feel how augmented reality feels like. So, take your iPhone and plug it on your XCode, plug it on your Mac, and you will see your simulator, you will see your phone popping up in the simulator list over here like this, So, choose it and run this in your own phone. So, let me do it with you. And you're going to see, it will ask you to give some permission, and here we go. So, this is my living room and I have my dog. And dog is real, but this ship is not. And as you can see, when I come over here and there, I can see all the aspects of this ship. So, this really feels like I have a spaceship in my living room and this is cool. So, as you can see, we can see the right, we can see the bottom, we can see the top and left, and everything. So, this is cool, right? We're going to work on that later on. So, let me come back. And as you can see, now we're going to do a lot more cool things like this in this section. I believe we are ready to stop and continue within the next lecture to see how we can move our views inside of our app.

 

About the Author
Students
2089
Courses
55
Learning Paths
3

Atil is an instructor at Bogazici University, where he graduated back in 2010. He is also co-founder of Academy Club, which provides training, and Pera Games, which operates in the mobile gaming industry.

Covered Topics