HOW TO USE ARKIT WITH THE WRLD UNITY SDK

WRLD recently announced that they are working in ARKit. Weve had a lot of interest since this should here our steps for anyone wanting to get started ARKit and WRLD SDK

Please check the requirements mentioned in the Unity-ARKit-Plugin for the software and hardware required for ARKit.

To get started simply set the platform to iOS on your project and follow the steps below.

Step 1: Import ARKit Unity Plugin

The team at Unity has created a great plugin that allows us to utilize ARKit easily in any Unity projects. Currently it requires that you are using Unity version v5.6.1p1 or later. For detailed documentation please see the download page for the ARKit Plugin.

Step 2: Import WRLD Unity SDK from Asset Store

Download and import the WRLD Unity SDK. If you need a key and then click “Get Key” when prompted or simply click later if you already have one.

Step 3: Modify a couple of files

WRLD SDK is built to be used with real world scale such that 1 unit in Unity is considered 1 meters. You can read more about our coordinate system on our Unity documentation. ARKit however require objects to be quite small, so we will need to scale down our map. In order to do that we need to add a couple of lines of code in our SDK. We will add an API to enable this more seamlessly in future release.

In /Assets/Wrld/Scripts/Streaming/GameObjectFactory.cs go to Method CreateGameObject and Add

Below

In /Assets/Wrld/Scripts/Streaming/GameObjectRepository.cs go to Constructor and Add

Below

Step 4: Making a scene for ARKit

Create a new scene so we can set up ARKit and follow the steps below.

    • Create a new GameObject called CameraParent and make Main Camera its child.
    • On Main Camera make the following changes
    • Building Control system status
      • Set Clear Flags to Depth Only
      • Set Field of View to 60
      • Set Clipping PLanes to 0.1 Near and 30 Far
      • Set Depth to 0
      • Add Component UnityARVideo (In Clear Material set YUVMaterial)
      • Add Component UnityARCameraNearFar
      • See the image below for reference
       Untitled 1
    • Create a new GameObject and name it ARCameraManager
      • Add Component UnityARCameraManager
      • In Camera field drag drop our Main Camera
       Untitled 2
    • Save your scene.

And that’s it!, ARKit is ready to be used.

Step 5: Setting up WRLD SDK

Now that we have ARKit ready, we can start setting up our map. Follow the instructions below.

  • Setup iOS Assets through the Assets Menu.
  • Untitled 3
  • Create a new Camera and name it Streaming Camera. We will use this camera to stream our map. Disable the Camera component as we will not be using this to draw anything.
    • Set Y position to 1000. This means we will be streaming from an altitude of 1000 Meters.
    • Set X rotation to 90 so our StreamingCamera looks towards ground.
    • Remove all the extra components such as AudioListener etc
    • Set Near to 10 and Far to 5000
    • Untitled 4
  • Create a new GameObject and name it WRLD Map.
    • Add component WRLD Map
    • Set your API Key
    • Set Camera to StreamingCamera
    • Set scale to 0.001
    • Set y position to -0.3
    • Set the Latitude to 40.748376 and Longitude to -73.985632
    • Untitled 5
  • Save your scene.

We are now ready to view WRLD Map in ARKit.

Step 6: Build Unity Project

We have completed all the necessary steps, we can finally build our xcode project and see it running on an iOS Device.

If you are having trouble with compiling libStreamAlpha.a then just set “Enable Bitcode” to No in Xcode Build Settings. Also make sure that you add Camera Usage Description for iOS in Player Settings->Other Settings.

If you are having trouble getting shadows then you might need to go to quality settings and set the Shadow distance to 2 and Shadow Near Planes to 0.01.

Step 7: Further improvements

Now that you have a working project with WRLD in ARKit you can start to build new exciting things. Read more WRLD blogs here

Like Hassan Sadiq on Facebook here, Follow Hassan Sadiq on Twitter here and Read more Hassan Sadiq blogs here

Advertisements

The Importance of 3D Mapping & Visualisation

WRLD visited Realcomm/IBcon to keep in the loop in regards to Commercial Real Estate and who is actually implementing Smart Buildings. This was WRLD second year attending the conference. This time around we came with a fresh look, brand, and vision. It was a major success, but mostly made us very excited to be a technology player in this evolving sector at a crucial time.

Data Visualisation

 

The commercial real estate industry need a clear data visualisation solution – WRLD holds a key position in helping understand what’s really going on in our buildings and facilities with our 3D maps. As an industry, both real estate and building automation is still in the infancy stages, but the proliferation of property, location and IoT data is growing exponentially.

It was markedly clear to us that the next stage to organizing and visualizing data is giving it spatial context for actionable insights.

The many of the building operations and technology companies we spoke to strive to provide a holistic view of buildings and management systems, but most lack a true visualisation layer that accurately depicts the physical world. The value our 3D maps provide was immediately understood by these companies at Realcomm. Many of these building systems work in silos and require an open and intelligent integration platform such as a 3D map to plug in sensor and performance data, such as from HVAC systems, so facility managers are empowered to make better decisions and detect and diagnose issues faster.  Unified spatial analytics has the potential to transform the occupancy experience, operational costs, and overall efficiencies in smart building management. Intuitive spatial visualisations deliver faster insights, and with this knowledge comes the power of intelligent prediction.

There is a lot of talk about Smart Buildings, but what that means varies greatly. We discussed helping deliver interfaces that power a wide range of “Smart Building” features, including:

  • Conference room search & booking
  • Lighting configuration and efficiency
  • Building Control system status
  • Parking
  • Utility and energy management
  • Security and cleaning staff route optimization
  • Leak detection, safety checks and detector servicing
  • Air quality checks

User Management

Same map, different customisation experiences. Our 3D maps also allow for select visibility of relevant content served to facility managers, occupants, executives, or even just visitors to a building or venue. Many companies saw the value in being able to easily create different user experiences using the  same base application.

To be able to strip away base level needs for executives who need to only see where open meeting rooms are available and where employees sit, was something previously unheard of to everyone we met.

Flexibility, customisation, and control are key differentiating factors to using the WRLD platform. We are also a cloud-based streaming map available on web, mobile, desktop, VR and AR, so that map owners can make updates to their application and see it on any platform or device immediately.

Navigation and Tracking

Do you know that we spend 90% of our time indoors? And soon every phone will know exactly where it is at all times indoors, down to the millimeter. This newfound capability will unleash billions of dollars in value; we’re already seeing innovative indoor solutions for enterprises, hotels, airports, shopping malls, and other large connected spaces.

For example, we met large hotel property operators and developers who were very excited by the opportunity to track and visualize when guests check out through our heat-mapping feature, so that they efficiently route their housekeeping staff to the ready rooms and optimize usage of their resources and services.

Some companies we met really valued the seamless outdoor to indoor navigation and asset tracking capabilities we can provide. As these companies are tracking such things as mail, supply & inventory, and printer fleets, they require a complete picture of their assets in motion, which includes both indoor and outdoor environments.

Building Simulation

Many commercial real estate developers and property owners require building renderings for simulation modelling. Many don’t have these readily available or accurate. Our solution almost seemed too easy, especially as they can own their own building data for private control. Our proprietary engine quickly renders 2D floor plan data to 3D, and our true to life visualisation creates an intuitive understanding of any space. We can build to any level of detail – so basic, procedural renderings could serve the owners’ need to run various simulations. Our map is a digital twin of the physical world – we want to not only be an accurate representation of your space but also a beautiful and engaging one!

Find out more about WRLD here, Like Hassan Sadiq on Facebook here, Follow Hassan Sadiq on Twitter here and Read more Hassan Sadiq blogs here