Mobile Day - WebVR

67
VR/AR/Mixed Reality Rabimba Karanjai @rabimba

Transcript of Mobile Day - WebVR

Page 1: Mobile Day - WebVR

VR/AR/Mixed RealityRabimba Karanjai@rabimba

Page 2: Mobile Day - WebVR

VR/AR/MR in a NutshellRabimba Karanjai, Mozilla Research Mixed Reality Mozilla Tech Speaker@rabimba

Page 3: Mobile Day - WebVR

What the Heck Doodle?

ARKit ARCore

MRVR

XRAR

OculusSonyVive

Meta

HoloLens

Page 4: Mobile Day - WebVR

What You’ll Learn Today● What is VR / AR / MR?● Why is this all happening now?● What do I really need to know?

Page 5: Mobile Day - WebVR

What is VR/AR/MR?

VR: Virtual Reality AR: Augmented Reality

MR: Mixed Reality XR: We don’t know Reality

Page 6: Mobile Day - WebVR

Virtual Reality● Completely immersive● Wide field of view● Fast refresh rate (90+fps)● Fast sensor refresh

Page 7: Mobile Day - WebVR

Augmented Reality● Overlaid on real world● Anchored to real world● Non-immersive

Page 8: Mobile Day - WebVR
Page 9: Mobile Day - WebVR

Partial AR

Page 10: Mobile Day - WebVR
Page 11: Mobile Day - WebVR
Page 12: Mobile Day - WebVR
Page 13: Mobile Day - WebVR

Why Now?

Page 14: Mobile Day - WebVR

The Long History of VR/AR/MR

Ivan Sutherland, MIT

Sword of Damocles (1968)

3D wireframe rooms

Page 16: Mobile Day - WebVR

1980s: VPL

● Data Glove● Eye Phone● Data Suit

Page 17: Mobile Day - WebVR

Mattel’s Nintendo Power Glove

Page 18: Mobile Day - WebVR

1990s: Virtuality

Page 19: Mobile Day - WebVR
Page 20: Mobile Day - WebVR

Virtual Reality Markup Language

● Scene based● In the browser● Slow to download● Slow to render

Page 21: Mobile Day - WebVR
Page 22: Mobile Day - WebVR

Smartphone Era

Page 23: Mobile Day - WebVR

Smartphone+ Era

● Dual cameras● Depth sensing cameras● Machine Learning in

hardware● Even more powerful

GPU & CPU

Page 24: Mobile Day - WebVR

What do I need to know?

Page 25: Mobile Day - WebVR

Tech Stack for VR & AR

Input: Sensors & Camera Processing: Image & Sensor Fusion

Drawing: 3D Graphics API Application: Framework

Page 26: Mobile Day - WebVR

Input: Sensors & Camera● Accelerometer: relative to gravity● Magnetometer: relative to earth’s magnetic field● Gyroscope: relative angle movement

○ 9DOF sensor breakout board for 15$ @ Adafruit!

● Optical Camera: standard phone camera● Stereo Camera: dual camera setup● Depth Sensing Camera: Kinect, Face ID

Page 27: Mobile Day - WebVR

Processing the 3D Environment

● Markers: Symbols or Beacons● SLAM: Simultaneous Localization and Mapping● MonoSLAM: SLAM in real-time with just one camera

Page 28: Mobile Day - WebVR

HTC Vive Sensor Beacontwo beacons + headset sensors = highly accurate

Page 29: Mobile Day - WebVR

Processing: VR/AR APIs● Vuforia● ARToolkit● WebVR● ARKit● ARCore● WebXR

Page 30: Mobile Day - WebVR

Vuforia

Page 31: Mobile Day - WebVR

ARToolkit

Page 32: Mobile Day - WebVR

WebVR

● Mobile: used by web apps for Google Cardboard on any phone.

● Desktop: works with major HMDs

● Shipping: Firefox for Windows

● Beta: Chrome, FF for other platforms

Page 35: Mobile Day - WebVR

WebXR: Work In Progress!● Proposed Future Web Standard● Extend WebVR with new features● Work with ARKit & ARCore● Polyfill for old browsers using WebRTC + sensors

https://github.com/mozilla/webxr-apihttps://github.com/mozilla/webxr-polyfill

Page 36: Mobile Day - WebVR

Drawing: Graphics APIs

● Medium Level○ OpenGL (ES)○ DirectX○ WebGL

● Low Level○ Metal○ Vulkan○ Direct X 12

● High Level○ Unity○ Unreal○ Three.js○ Babylon.js

Page 37: Mobile Day - WebVR

Application: Frameworks● Scene Kit● Cardboard & Daydream● Hololens Academy● React VR● ArgonJS● A-Frame

Page 38: Mobile Day - WebVR

What do you *really* need to know?

● Start with web stack● Follow Mozilla and Google and Microsoft● Play with A-Frame● Get a Cardboard viewer.

Page 39: Mobile Day - WebVR

What can I do?● Experiment! We are still in the Model T days!● No one knows what the killer app will be.● First new medium in decades● Go play!

Page 40: Mobile Day - WebVR

State of WebVR and AframeThe web framework for building VR experiences

@rabimba | Mozilla VR | aframe.io

Page 41: Mobile Day - WebVR

Friction of VR Ecosystems

Gatekeepers Installs Closed

Page 42: Mobile Day - WebVR

WebVRAn open virtual reality platform with the advantages of

the Web

Open Connected Instant

Page 43: Mobile Day - WebVR

Browser APIs that enable WebGL rendering to headsetsand access to VR sensors

Page 44: Mobile Day - WebVR

https://w3c.github.io/webvr/

Page 45: Mobile Day - WebVR

FirefoxNightly

Chromium(Experimental)

SamsungInternet

MobilePolyfill

Page 46: Mobile Day - WebVR

A-FrameA declarative framework for building virtual reality

experiences on the Web

Page 47: Mobile Day - WebVR

Hello World<a-scene>

<a-box color="#4CC3D9" position="-1 0.5 -3" rotation="0 45 0"></a-box>

<a-cylinder color="#FFC65D" position="1 0.75 -3" radius="0.5" height="1.5

<a-sphere color="#EF2D5E" position="0 1.25 -5" radius="1.25"></a-sphere>

<a-plane color="#7BC8A4" position="0 0 -4" rotation="-90 0 0" width="4" h

<a-sky color="#ECECEC"></a-sky>

</a-scene>

Page 48: Mobile Day - WebVR

Hello World

Page 49: Mobile Day - WebVR

<a-animation> <a-box> <a-camera> <a-circle> <a-collada-model>

<a-cone> <a-cursor> <a-curvedimage> <a-cylinder>

<a-dodecahedron> <a-isocahedron> <a-image> <a-light>

<a-obj-model> <a-plane> <a-ring> <a-tetrahedron> <a-torus>

<a-torus-knot> <a-sky> <a-sound> <a-sphere> <a-videosphere>

Page 50: Mobile Day - WebVR

RegistryCurated collection of A-Frame components

Page 52: Mobile Day - WebVR

RegistryCurated collection of A-Frame components

Page 53: Mobile Day - WebVR

Motion CaptureRecord then develop room scale VR on the go

Remix Glitch

Page 54: Mobile Day - WebVR

Communityhttps://aframe.io/blog/

Page 55: Mobile Day - WebVR

Powerful and Extensible

Page 56: Mobile Day - WebVR
Page 57: Mobile Day - WebVR

Art - A-Painter@mozillavr

Page 58: Mobile Day - WebVR

Journalism - Fear of the SkyAmnesty International UK

Page 59: Mobile Day - WebVR

Journalism - Journey toMars

The Washington Post

Page 60: Mobile Day - WebVR

Guri VRBuild your own world in VR

Page 61: Mobile Day - WebVR

Sandbox - Aincraft@andgokevin

Page 62: Mobile Day - WebVR

AincraftLets play

Page 63: Mobile Day - WebVR

Data Visualization - Adit@datatitian

Page 64: Mobile Day - WebVR

Gaming - A-Blast@mozillavr

Page 65: Mobile Day - WebVR

AR - AR.js + A-Frame@jerome_etienne

Page 66: Mobile Day - WebVR

Come build WebVR with us!

aframe.io/community

Page 67: Mobile Day - WebVR

Thank you

@rabimba | [email protected]| aframe.io