WebVR for Augmented Reality

Using WebVR to write cross-platform AR applications

Jerome Etienne
ARjs
5 min readMay 15, 2017

--

Two weeks ago, I was at WebVR Paris, a great event at Mozilla Paris, and I did a workshop about “WebVR for Augmented Reality”. OK, it may seem a bit crazy at first: WebVR has “VR” at the end, so it is for virtual reality and not for augmented reality, right? Still, I think WebVR makes a lot of sense for AR and it is a great way to write cross-platform AR applications. Let me tell you why.

Photos taken at WebVR Paris

First, What is WebVR ?

WebVR is an open standard that makes it possible to experience VR in your browser. The goal is to make it easier for everyone to get into VR experiences, no matter what device you have. — webvr.info

So it is standard, it is for the browser, it is for any device and it is for VR.
Or is it ? We will see that WebVR is not specific to virtual reality, and applies
just as well to augmented reality.

Even Then, Why Should we Care ?

Because it would allow us to write our AR applications in a cross-platform way. A standard to write AR means more AR content being created.

More AR platforms are becoming available every day. Today you can code augmented reality on platforms such as Hololens, Tango and AR.js. When you do an AR application, you want it to run on all of those platforms and even on future ones. This is the “no matter what device you have” at the end of the WebVR definition.

WE are the web and we demand the cross-platform :) “You write your code once, it runs everywhere” is almost an axiom on the web. This has strong implications. A single application for all platforms means faster and cheaper development, so more AR applications being written! Proprietary APIs would slow down the maturation of augmented reality! It is that important!

What is WebVR and How Suitable it is for AR ?

WebVR provides two features stereo rendering and positional tracking, and only those two.

Let’s look at them in more details. Both of these features match the needs of Virtual Reality very well, but we will see that they match Augmented Reality too! Let’s note that WebVR doesn’t handle controllers. It is all done by the Gamepad API and its extensions. Btw, controllers aren’t specific to VR. Controllers for Daydream or HTC-vive can very well be used in augmented reality too.

First feature: Stereo Rendering

Stereoscopy is a technique for creating the illusion of depth in an image by stereopsis for binocular vision” — wikipedia

So basically you can see stuff in 3d. It seems to be there, at a given distance thanks to your binocular vision. You have the actual feeling you can touch it. It isn’t just a basic projection of the 3d on a 2d screen anymore. Definitive a plus for the immersion!

So stereo rendering is clearly very useful for immersion. But there is nothing specific to VR. To perceive depth is valuable for augmented reality too.

Made popular by Google Cardboard (right) But it is a old concept, left image is from 1860.

Second Feature: Positional Tracking ?

Positional tracking provides the position of the user virtual camera”

It allows us to display the 3d according to the position of your camera device. Thus, physical moves of your body are immediately reflected in the virtual world. This links between physical and virtual world, and it is key to immersion.

So WebVR is for Augmented Reality too!

WebVR contains all the stuff for Virtual Reality obviously! Stereoscopic Rendering is useful for VR. Positional Tracking is useful for VR. Sure… but they are equally useful for Augmented Reality. As I keep repeating through out this post :)

So why WebVR has “VR” at the end ? My guess is that the authors were thinking about VR when they wrote it. Nothing specific VR to it, it is equally good for AR. Some people even joked about renaming it WebXR :)

“Using WebVR to write AR applications”… It is super confusing from the start. When I talk about it, I’m never sure how to explain this in a non confusing way. From a name point of view, it is a nightmare. Currently I call it “WebVR for AR” or WebVR4AR for short.

Let’s Unite for “WebVR for AR”

WebVR for AR is about using WebVR standard to write augmented reality applications. I would love if all AR platforms move to support WebVR for AR. Unity is strength.

WebVR would create a common ground which could benefit everybody involved in AR for the Web. We don’t need to wait for a standard specific to AR to benefit from the advantage of having a standard.

Developers will be able to write applications more easily, they will have only one API to learn. So more applications will be written. As each application will be able to run on every AR platform. With each new applications, each of our AR platforms will become more relevant to the users.

If we support only proprietary APIs, we will create little islands and slow down the maturation of AR as a whole! Each platform may have specificities that they want to offer to their users thru proprietary APIs and it is totally fine. To support WebVR doesn’t imply to support only WebVR.

The community of AR for the web is still rather small. We are still at an early stage. We dunno which applications we will run in the future. We need to make it easy to experiment, thus we learn more about AR and make it more mature.

I think everybody in augmented reality would benefit from “WebVR for AR”.

PS: here are the slides

Also, please feel free to contact me anytime @JeromeEtienne

--

--

Jerome Etienne
ARjs
Editor for

Making WebAR a reality! 8th most active user on github - Write @learningthreejs - Ex @daqri