Skip to main content

View Your Web Scenes in VR

Have you ever wondered what your web scenes would look like in virtual reality? Apps built using the ArcGIS Maps SDK for Unity can allow you to view the layers and bookmarks from your web scene in the Unity game engine and have an immersive experience in VR, exploring the scene at ground level or flying above terrain. This blog post will show you an example of a VR app for viewing web scenes – and maybe inspire you to start building your own!

Last summer I visited the Esri R&D Centre in Zurich, where many of Esri’s 3D products are developed, such as ArcGIS CityEngine. I was situated with the VR team and ended up creating an application to view web scenes in VR. I had tried working on a web-based VR app that would render two synchronized web scenes, one for each eye, but encountered limitations with the stereo rendering. The layers for each viewport did not always load at the same speed and rendering two web scenes in the Oculus browser did not maintain an acceptable framerate with the headset’s graphics hardware.

Due to these limitations, I changed my focus to adapt the Complete Streets Unity app I had been working on to a more general use web scene VR viewer. The idea was to extend the Unity application to read a list of web scene IDs and reconstruct the scenes in Unity with the Maps SDK.

I repurposed the existing menu system that my colleague Jonathan Van Dusen had built for the Complete Streets app to work with web scenes and their bookmarks.

A screen capture of the main menu, showing a group of six tiles for loading different web scenes.

Main menu user interface of the Scene Viewer VR app to choose the web scene to load.

I began development using the Meta Quest 2 headset, which was a change from the HP Reverb G2 headset used to develop and test the Complete Streets VR application. This required remapping some of the controls to maintain consistency across the different controllers. A benefit of working with a common codebase was that when I resolved an issue in the Scene Viewer VR, I could return to the Complete Streets VR app and apply the fix.

I used Ben Woodward’s code for setting the sun in the scene to a specific time and day and modified it to work at locations around the world, not just in Toronto. Ben worked with the Education and Research team as a co-op student last summer. He wrote about his experiences as a co-op student and included a video of his work on lighting the Toronto scene in the Complete Streets VR app.

Web scene features that were implemented in the Scene Viewer VR app include:

  • Slides (including layer visibility, camera, and sun position)
  • Layer opacity
  • Coloured object scene layers
  • 3D object scene spatial filtering (remove areas that intersect sketched polygons)

Most layers in a web scene will work with the scene viewer, except for point scene layers, point cloud scene layers, and feature layers as these are not currently supported in the ArcGIS Maps SDK for Unity.

The following video demonstrates how the app works with a VR headset.

Although the Scene Viewer VR app will work without a VR headset, I recommend you use one so you have the full immersive experience of being inside your web scene. Using a headset is especially useful for exploring a virtual globe at a scale of your choice. For example, the following screenshot shows how a scaled down model of Vancouver looks in the app.

A screen capture of a web scene of Vancouver, with large 3D models of the VR controllers hovering over the city to show scale.

View of a scaled down Vancouver model

To try the app today, you can visit the Scene Viewer VR page in GitHub to view the documentation and download the Scene Viewer VR for Windows. Several public web scenes are included with the app and the documentation shows how to add additional web scenes you have found or created on ArcGIS Online.

About the Author

Michael Luubert is a software developer in the Education and Research department at Esri Canada. He undertakes research in 3D GIS, including developing web apps with the ArcGIS API for JavaScript and using ArcGIS CityEngine and game engines to create immersive urban and campus simulations. Michael graduated from the University of Waterloo with a Bachelor of Computer Science, a Minor in Geography and Environmental Management and a Diploma of Excellence in GIS. He enjoys playing soccer and ultimate frisbee.