The Magical Doorway To Droneland

The birth of the project

Giusi Di Paola
Apple Developer Academy | Federico II
7 min readApr 7, 2020

--

As COVID-19 rages on, researchers, businesses, and innovators around the world are putting technology to work to alleviate the effects of the global health crisis. The situation continues to unfold daily with rapid changes to day-to-day life.

From reality to smartphone apps and computing power, the on-line communication involves more human physical distance, but also allows even more interpersonal connections in this case, simply because we communicate more often with people who live far away. Today, Italy, as other countries, is under a “stay at home” order and this means that it is only possible to go out for your essential needs such as groceries and medication. This is now the era of “Social Distancing”, people should stay six feet from others, but, fortunately, this expression is not related to Augmented Reality Experience.

During these days, I was lying in my bed and I was daydreaming about a possible way to visit some places or just to escape from reality. Suddenly, I found inspiration by looking at a picture of “Alice in Wonderland”.

“How long is forever? Sometimes, just one second” — Alice in Wonderland

This is very strange! I have never watched Alice! But, I was sure about one thing: this image was at the right website at the right time!

“How is it possible to pass through a doorway?” — was the first question on my mind.

“It’s impossible. Where do you begin?” — asked my brain.

“How can you create a new dimension? How can you make it real?” — asked my fear.

“If you can dream it, you can do it” — said my heart.

So, with the help of our extraordinary mentors, I started exploring and investigating in order to develop my real project. The first step was to collect all the AR data. From my personal standpoint, it’s like to make a cake, I have to do the shopping in order to get all the ingredients to bake it. The second step, was to design my workflow in order to define all the sequences from the beginning to the end of this development process.

Droneland, what is it?

Let’s dive in now!

Ever imagined walking in a new atmosphere, space without leaving your own home and see, for instance, a photographic exhibition just for a few minutes? This is possible now. During this quarantine time, it was very natural to miss something I was deeply involved, that is, my passion for drones and aerial photography. Drones do more than just fly. From capturing the next vacation and real estate content to inspecting crops and roofs, they are used also for business, education, recreation and creativity. China, for example, used drones to monitor its citizens during this Coronavirus outbreak. They were used to chastise people who walked outside. Others were used to check up on people’s health by flying from apartment to apartment. Drone can seize every single moment of your life and let you see the view from the top.

Have you ever seen the world with different eyes?

It is well known that more and more women are expanding their presence in the Drone Industry by learning and creating communities. Hence, my purpose was to show some aerial shots and immerse the user in an incredibly AR Experience. You can see the world from a new angle. That’s why this project is called Droneland!

Droneland

How is it possible to get there?

This dimension is accessible through a supernatural elevator. “Nothing is as it seems” in Augmented Reality! You will have the illusion of entering into another world and walking through it. The amazing concept is that there are no walls, you just see a magical entrance. Isn’t this wonderful?

How does it work?

The user scans the floor and tilts the iPhone to allow the camera to fully detect the floor area. Then, it is necessary to place the doorway (by tapping on the screen) in a safe and clear space without obstacles. To get the best AR experience, it is required to put on the headphones in order to disconnect from reality and listen to the surrounding sounds thanks to the positional audio.

Demo — The Magical Doorway To Droneland

Behind the scenes

Technical aspects

In order to develop this project, I have designed, first of all, a scene by using Xcode SceneKit Editor. Later on, I have created an empty node and placed some planes with the intention of implementing the floor and the roof. Then, I added some boxes to represent the walls and I aligned them to create a cube.

Xcode Scenekit Editor

After this, I masked them by adding other black walls to make the scene model invisible from the outside except for the floor and the roof.

Xcode Scenekit Editor — This image shows how I made the scene model invisible from the outside.

This was also possible by writing some lines of code in my ViewController to make the walls transparent.

In my opinion, Coding and Design go hand in hand especially if you are going to develop apps for AR. In this way, creativity takes you everywhere.

During this process, I focused my attention on:

  1. Positional Audio: if the scene position is outside the current field of view, this project will use the SceneKit’s positional audio feature to indicate which direction to turn the device to see the scene model. To make it work, mono audio was imported and created by using GarageBand. It is mandatory to put on some headphones to get the best experience.
This image shows how I implemented Positional Audio

2. SceneKit Editor in Xcode: I was very impressed on how amazing it is to create a scene containing a hierarchy of the nodes and attributes that together represent visual elements. By using SceneKit Editor, you can set up the positions and attributes of the assets, the colors, the lights, the animations, and set global scene properties.

[Video] Xcode SceneKit Editor

3. People Occlusion / Person Segmentation With Depth: the project can render a virtual object or scene behind people who pass in front of the camera.

This image shows how I enabled People Occlusion. It is supported on Apple A12 and later devices.
This is a clear example

4. Haptics : it’s really important to use haptics to get a tactile response. For instance, when the doorway is placed.

5. AR Coaching Overlay View: it shows an overlay view indicating that the users should continue moving the phone or change the speed with which they move it in order to detect a plane.

AR Coaching Overlay View

6. Snapshot: it is possible to take and save photos as a keepsake by using the shot button.

This image shows how I implemented the snapshot

7. “Command failed with a nonzero exit code”: at the end of my development, this error occurred many times. I wasn’t able to build and run my project anymore. It took me some nights to fix this problem and it seems a very common Xcode issue / bug after you create a scene and you import/remove some images or textures from the Xcode folder (.scnassets). And so, after much research, I discovered an easy trick to solve it! Open your terminal and write “xattr -rc” + the path where your project folder is located and then click return. For instance:

My terminal

Click on “Clean build folder” in Xcode and run your project again.

This will fix all the issues.

Conclusion

In short, AR doorways are open entrances to new and exciting virtual worlds. “Droneland” is just a simple and basic AR project. It can be used by a range of businesses as diverse as advertising, entertainment and social media by changing the content, obviously. It is possible to build a well furnished house interior with beautiful wallpapers and wooden flooring for the Real Estate industry, for example. AR is a great new mode of interaction! I am really fascinated by it. It’s the future!

It can be stated that, nowadays, we are appreciating Technology more than ever because a new concept is spreading of living at home. This concept can affect the way we think, design, develop, imagine, create and we can make this into something positive by thinking about the big picture. I firmly believe in this slogan: “Everyone can code” promoted by Apple. It doesn’t matter what is your background, what you have studied before or if you have just started coding.

Every day you wake up and have a second chance to create, amaze, develop, fail, learn from your mistakes, help people and bring your vision to life.

“The only thing stopping you is you”.

--

--