<img alt="" src="https://secure.hiss3lark.com/167682.png" style="display:none;">
  • share

A blog about software development best practices, how-tos, and tips from practitioners.

Redefine User Experience With Augmented Reality

Redefine User Experience With Augmented Reality

What is unique about your business? Is it superficial or an inseparable need for the customer? All successful entrepreneurial ventures have succeeded only after connecting to their audience on a personal basis and embedding themselves in the routines of their customers. Be it a simple advertisement or business idea, if you can’t form a cohesive part of your target audience, you will be out of the market soon.

Connecting with your audience is inevitable and there are many ways to make it successful. Augmented reality is one of the proven methods to provide this immersive experience.

What is Augmented Reality?

A Harvard professor, Ivan Sutherland coined the term ‘Augmented Reality’ in the year 1968 with the very first device. Since then, the technology has been evolving and now it’s a full-fledged hybrid technology that gives you a new version of the reality. Itredefines the real-world environment with superimposition of computer-generated images. It alters audience’s perception of reality in terms of visuals, sounds, texts, and effects.

The below infograph describes how AR technology works:How AR Technology Works

Augmented reality is featured with different implementation models; however, its sole aim is to provide affluent audio-visual experience to the audience. We can experience the enhanced visual world with AR empowered hand-held or head mounted devices. 

Use cases of Augmented Reality

  • Gaming Industry: AR adds beauty to the games with more immersive experiences. The Pokémon Go is quite popular AR game with 10 million downloads.Augmented Reality - Gaming Industry
  • Healthcare: It allows physicians to demonstrate surgery plans before the implementation. Surely, AR is giving more power to the health IT with intricate and powerful solutions.Augmented Reality - Healthcare

           Image Credit: tmrwedition.com

  • Photo Filters: The Snapchat’s filter build with augmented reality are the hottest things in social media now.Augmented Reality - Photo Filters

  Image Credit: techcrunch.com

  • Entertainment: Entertainment is another big industry that is leveraging on AR mostly to delight people in new ways. One of the prominent use cases of augmented reality can be seen in the museums. With AR, we can give an immersive experience to the audience by transforming the boring 3D things into live into 3D space.

 Let’s see how we can use Apple’s ARkit.

What is Apple’s ARKit?

  • ARKit (Apple ARKit) is Apple’s augmented reality (AR) development platform for iOS mobile devices. ARKit was introduced along with iOS 11.
  • ARKit allows developers to build high-detail AR experiences for iPad and iPhone. The captured environments are featured with animated 3D virtual text, objects and added characters.
  • With ARKit 2 on iOS 12, your AR apps can now be experienced by multiple users simultaneously, and resumed at a later time in the same state.

Requirements for ARKit

There are a few requirements for using ARKit. Before getting into the tutorial, ensure that you have the following things:

  • An A9 or later processor :
    • Only iPhone6s and up
    • The 2017 iPads and the iPad Pros can run ARKit.
  • Space
    • You’ll need plenty of space
  • Contrast
    • With augmented reality, contrast is the key.
    • The camera needs contrast in order to distinguish surfaces and distances of objects.

Follow the below-mentioned procedures to verify device support & user permission:

ARKit requires iOS 11.0 or the latest version and an iOS device with an A9 or the latest processor.

ARKit also uses a device camera which you need to configure the iOS privacy controls to permit the user to access your app.

How to handle device compatibility support depends on how your app uses ARKit:

  1. If you add the arkit key in the UIRequiredDeviceCapabilities section of your app's Info.plist file, then your app available to only ARKit compatible devices.
  2. If you app is not primarily focusing on ARKit, then you should check whether the current device supports AR configuration or not.

The Info.plist of your app must contain the NSCameraUsageDescription key. All you need to provide the text in the respective field explaining why your app needs a camera access. 

If you create a new ARKit app using the Xcode template, a default camera usage description is provided for you.

How to Build an AR App?

Now we will learn how to create an AR app and add the object in scene view. You will learn the basic setup / project structure with the primary code.

Getting Started

Create a new project with Xcode template.

  1. Create a new project and choose template “Augmented Reality App”Augmented Reality App

2. Add project name, set the content technology to “Scene kit” and Language “Swift”Augmented Reality Process

Click on the Next button and save the project at your preferred location.

The demo project is created now. If you run the project you will see a 3D Plane object is added in scene view.

The Plane is added in scenview is the .scn file which is added in art.scnassets folder. If you click on that image you will be able to see the complete 3D view of that image on your mouse movement.Augmented Reality 3D view

override funcviewWillAppear(_ animated: Bool) {

super.viewWillAppear(animated)

        // Create a session configuration

        let configuration = ARWorldTrackingConfiguration()

        // Run the view's session

sceneView.session.run(configuration)

    }

This will configure the AR session and it will start tracking configuration as per your settings.

  • ARWorld Tracking Configuration:Provides high-quality AR experiences that help to track a device's position and orientation. It also allows plane detection, hit testing, environment-based lighting, and image & object detection.
  • AROrientation Tracking Configuration: Provides basic AR experiences to track only a device's orientation.
  • ARImageTracking Configuration: Provides basic AR experiences to track visible images regardless of the user's environment.
  • ARFace Tracking Configuration: Provides AR experiences to track the movement and expressions of the user's face.
  • ARObjectScanningConfiguration: Offers for using the back-facing camera to collect high-fidelity spatial data, creating reference objects for detection in other AR experiences.

override funcviewDidLoad() {

super.viewDidLoad()

        // Set the view's delegate

sceneView.delegate = self

        // Show statistics such as fps and timing information

sceneView.showsStatistics = true

        // Create a new scene

        let scene = SCNScene(named: "art.scnassets/ship.scn")!

        // Set the scene to the view

sceneView.scene = scene

    }

This code is used in “ship.scn” file and added to the scene. If you run the demo app, then you can see the ship with camera interface.

What is .USDZ?

It stands for Universal Scene Description Zip. If you’ve worked with 3D models before, you’re probably familiar with 3D models like .OBJ, .DAE, or .sketchup. USDZ is a file created from collaboration with Pixar and Apple.

With usdz file, with the minimum line of code, you can show the 3D model with the quick look to see the preview with camera’s eye.

Moving On

AR as a technology is not only changing the way we perceive the reality, it is giving us a new perspective to the audiences by intensifying the way we feel with digital simulation. With a strong future potential, AR gives a lot of advantages to the UX designers and undoubtedly enhance your storytelling ways.

Generic-CTA-01

Like what you just read? Get Latest content delivered straight to your inbox.