SlideShare a Scribd company logo
1 of 45
Download to read offline
WebVR 
Vladimir Vukicevic 
Mozilla
Why WebVR? 
Web is a highly connected environment 
The “Metaverse” is a VR-rich concept 
.. we’re already very close! It’s just 2D!
WhyWebVR? 
In practical terms, VR will succeed or fail based on 
content and how easy it is to access that content. 
There is no easier or more ubiquitous content 
delivery mechanism than the Web. 
It had better be able to deliver VR.
VR Basics 
Quick Overview of VR
Immersion 
Sensory Immersion 
(Focus on Visual Immersion) 
Input Immersion
Visual Immersion
Per-Eye Rendering
Device-Specific Distortion
Input Immersion
WebVR Overview 
What is WebVR? 
What does WebVR enable?
WebVR 
Render Web Content in VR 
Access to devices being used for Virtual Reality 
Device-agnostic VR in browser 
Focus on Head-Mounted Displays (HMDs) 
and Sensor devices
Web Content in VR 
Focus on Visual Immersion 
Provide Input, But Up to App to Handle 
Support both WebGL and HTML/CSS Content 
Goals: 
Allow High-End Experiences with VR in the browser 
(asm.js, Emscripten, game engines, etc.) 
Allow Web Experiences with VR 
(responsive sites, CSS 3D, VR browsing, etc.)
Device-agnostic VR 
Challenge: Unify varied devices 
Provide consistent API
Device-agnostic VR 
Even worse situation in sensors!
WebVR API 
Nuts & Bolts
Basic Interface 
Call getVRDevices(), which returns a Promise: 
navigator.getVRDevices().then(vrDeviceCallback) 
The callback receives a list of all available VR devices: 
function vrDeviceCallback(vrDevices) 
{ 
… 
}
VR Devices 
For every device: 
hardwareUnitId 
Unique identifier per hardware device 
deviceId 
Unique identifier for specific sensor/device on hardware 
deviceName 
User-readable name identifying the sensor
VR Devices 
For example, with an Oculus Rift connected, getVRDevices() will return a list with... 
(1)HMDVRDevice 
a)hardwareDeviceId: oculus-1 
b)deviceId: 12345 
c)deviceName: “Oculus Rift HMD” 
(1)SensorVRDevice 
a)hardwareDeviceId: oculus-1 
b)deviceId: abcde 
c)deviceName: “Oculus Rift Sensor” 
Same hardware Device ID
VR Devices: HMDs 
HMDs have configuration and data for rendering 
setFieldOfView(left, right, zNear, zFar) 
Configure the field of view that rendering will use 
getRecommendedEyeFieldOfView(whichEye) 
getMaximumEyeFieldOfView(whichEye) 
getCurrentEyeFieldOfView(whichEye) 
Get the recommended and maximum FOV that this 
device can render
Configuring HMDs 
hmd.setFieldOfView( 
{ upDegrees: 65, 
downDegrees: 65, 
leftDegrees: 65, 
rightDegrees: 45 }, 
… 
); 
Human eye field of view (Wikipedia) 
60°upwards 
75°downwards 
95°away from nose 
60°towards nose 
Viewing parameters are needed for proper 
distortion and WebGL rendering 
Vertical FOV 
Horizontal FOV 
Left Degrees 
Right Degrees 
Up Degrees 
Down Degrees 
Asymmetrical Projection
VR Devices: HMDs 
getEyeTranslation(whichEye) 
Get the eye translation offset for the given eye 
getRecommendedEyeRenderRect(whichEye) 
Get the render rectangle where content for the given 
eye should go
Configuring HMDs 
hmd.getRecommendedEyeRenderRect(“left”) 
Mainly useful for WebGL, defines where and how big the eye’s scene should be rendered. 
WebGL Canvas 
Left Eye Render Rect
VR Devices: Sensors 
getState(timeOffset = 0.0) 
Get the state of this sensor, at the given optional time offset. 
Returns a dictionary containing position, orientation, as well as 
linear and angular velocity and acceleration. 
zeroSensor() 
Reset the sensor, making the current state the zero position
Getting State 
hmdSensor.getState() 
Obtain the current state of the sensor. 
Call per frame. 
Future: a particular per-frame state may be provided 
Helps the browser know exactly what state was used to render 
For proper WebGL + CSS sync 
For Oculus Timewarp rendering 
{ 
orientation: {w:0, x:0, y:0, z:0}, 
angularAcceleration: {x:0, y:0, z:0}, 
angularVelocity: {x:0, y:0, z:0}, 
position: {x:0, y:0, z:0}, 
linearAcceleration: {x:0, y:0, z:0}, 
linearVelocity: {x:0, y:0, z:0}, 
timeStamp: 0 
}
Entering VR Mode 
requestFullScreen call is extended to take an options dictionary 
One option specifies the VR Display to go fullscreen on; 
also activates VR Rendering 
var container = document.getElementById(“container”); 
container.mozRequestFullScreen({ vrDisplay: hmd }); 
Fullscreen is the onlyway to enter VR Mode
WebVR and WebGL
WebVR with WebGL 
Most similar to traditional 3D/VR development 
App code does all rendering 
Final presentation steps done by browser 
Quick integration with existing WebGL content and engines
Relevant WebVR API 
HMD: setFieldOfView() 
Browser needs to know exact FOV settings 
that content is rendering with 
HMD: getRecommendedEyeRenderRect() 
Browser needs to know where the left/right eye 
content is present 
Sensors: getState() 
Content rendering should take into account 
position/orientation of HMD, and any other 
sensors that are supported
Engine Integration 
Natural extension to WebGL Content 
e.g.: multiple WebVR Renderers for three.js exist 
that use the WebVR API 
Working on adding support to UE4, Unity, etc. 
Lots of interest among Mozilla Games project
WebVR and CSS
Why HTML/CSS with VR? 
Modern CSS has lots of features 
3D Transforms 
Transitions 
Animations 
Gradients 
Complex Backgrounds 
HTML/CSS is well-suited for a lot of content 
e.g. placing informative content in a VR space 
HTML/CSS + VR can move us to Responsive Design 
Web sites can adapt to “Browsing in VR”
CSS 3D Transforms 
transform-style: preserve-3d; 
transform: translateZ(-200px);
CSS 3D Transforms in VR 
No perspectiveproperty used: 
VR creates its own space 
Defined by the VR HMD FOV 
CSS Origin is Top Left 
VR Origin is Center 
… this may be controversial 
(... and may not be even needed)
Handling Position/Orientation in CSS 
Present 
Per-frame, set a transform on an 
element that acts as the “camera” 
Use position/orientation from state to 
generate a transformation matrix 
var state = hmdSensor.getState(); 
camera.style.transform = stateToCSSTransform(state);
Handling Position/Orientation in CSS 
Future 
Use a CSS property 
#camera { 
transform: vr-orientation() vr-position(); 
} 
Automatic application of position/orientation 
from fullscreen HMD device 
Allows for code-free VR
Responsive Design 
@media screen and (min-width: 400px) and (orientation: portrait) 
{ /* phone UI rules */ } 
@media screen and (min-width: 800px) 
{ /* desktop and large tablet rules */ } 
@media vr 
{ 
#camera { 
transform: vr-orientation() vr-position(); 
} 
#contentArea { 
width: 100cm; 
height: 80cm; 
transform: translateZ(50cm); 
} 
}
WebVR Current Status
WebVR Status 
Experimental Firefox and Chrome Builds 
Implement the API described here 
WebGLRendering Works Well In Both 
CSS Rendering Only In Firefox 
Everything Subject To Change! 
(Still R&D!)
WebVR Status 
Core API with no CSS support will 
likely be first to ship 
Will enable WebGL VR rendering 
Will enable Emscripten/asm.js-based porting 
of VR content and demos
WebVR Status 
Oculus Rift support only 
Desktop only 
Google Carboard coming soon 
Android coming soon 
Additional input devices coming soon
WebVR Status 
Web toolmakers adding support 
(especially in gaming space) 
Working on adding support to Emscripten 
CSS 3D designers also experimenting
Browsing in VR
Hiro 
Mozilla exploration of VR browsing 
VR-based Interaction 
Browsing existing sites in VR 
Browsing VR sites smoothly 
from a HUD/controller 
Input issues 
(e.g. URLs? Usernames/passwords?) 
First demo soon, rapid updates
For more information... 
web-vr-discuss mailing list 
https://mail.mozilla.org/listinfo/web-vr-discuss 
(search for web-vr-discuss!) 
@vvuk 
I’ll generally announce new builds, 
etc. to Twitter. 
@joshcarpenter 
For work on Hiroand VR 
design and UX
Bringing Virtual Reality to the Web: VR, WebGL and CSS – Together At Last!

More Related Content

What's hot

NDC16 스매싱더배틀 1년간의 개발일지
NDC16 스매싱더배틀 1년간의 개발일지NDC16 스매싱더배틀 1년간의 개발일지
NDC16 스매싱더배틀 1년간의 개발일지Daehoon Han
 
Deview2014 Live Broadcasting 추천시스템 발표 자료
Deview2014 Live Broadcasting 추천시스템 발표 자료Deview2014 Live Broadcasting 추천시스템 발표 자료
Deview2014 Live Broadcasting 추천시스템 발표 자료choi kyumin
 
1인개발자가되기전알아야할것들
1인개발자가되기전알아야할것들1인개발자가되기전알아야할것들
1인개발자가되기전알아야할것들Jinsub Jung
 
김동건, 구세대 개발자의 신세대 플레이어를 위한 게임 만들기, NDC2011
김동건, 구세대 개발자의 신세대 플레이어를 위한 게임 만들기, NDC2011김동건, 구세대 개발자의 신세대 플레이어를 위한 게임 만들기, NDC2011
김동건, 구세대 개발자의 신세대 플레이어를 위한 게임 만들기, NDC2011devCAT Studio, NEXON
 
[ NDC 14 ] 가죽 장화를 먹게 해주세요 - [ 야생의 땅 : 듀랑고 ] 의 자유도 높은 아이템 시스템 디자인
[ NDC 14 ] 가죽 장화를 먹게 해주세요 - [ 야생의 땅 : 듀랑고 ] 의 자유도 높은 아이템 시스템 디자인 [ NDC 14 ] 가죽 장화를 먹게 해주세요 - [ 야생의 땅 : 듀랑고 ] 의 자유도 높은 아이템 시스템 디자인
[ NDC 14 ] 가죽 장화를 먹게 해주세요 - [ 야생의 땅 : 듀랑고 ] 의 자유도 높은 아이템 시스템 디자인 Jungsoo Lee
 
AWS 클라우드를 통해 최소기능제품(MVP) 빠르게 개발하기 - 윤석찬 테크 에반젤리스트, AWS
AWS 클라우드를 통해 최소기능제품(MVP) 빠르게 개발하기 - 윤석찬 테크 에반젤리스트, AWSAWS 클라우드를 통해 최소기능제품(MVP) 빠르게 개발하기 - 윤석찬 테크 에반젤리스트, AWS
AWS 클라우드를 통해 최소기능제품(MVP) 빠르게 개발하기 - 윤석찬 테크 에반젤리스트, AWSAmazon Web Services Korea
 
Ndc17 슈퍼판타지워 포스트모템_srpg로 맨땅에 헤딩하기
Ndc17 슈퍼판타지워 포스트모템_srpg로 맨땅에 헤딩하기Ndc17 슈퍼판타지워 포스트모템_srpg로 맨땅에 헤딩하기
Ndc17 슈퍼판타지워 포스트모템_srpg로 맨땅에 헤딩하기JungKeun Lee
 
Role of UI and UX in improving customer experience
Role of UI and UX in improving customer experienceRole of UI and UX in improving customer experience
Role of UI and UX in improving customer experienceZoho SalesIQ
 
Advanced Methods for User Evaluation in AR/VR Studies
Advanced Methods for User Evaluation in AR/VR StudiesAdvanced Methods for User Evaluation in AR/VR Studies
Advanced Methods for User Evaluation in AR/VR StudiesMark Billinghurst
 
게임 기획 튜토리얼 (2015 개정판)
게임 기획 튜토리얼 (2015 개정판)게임 기획 튜토리얼 (2015 개정판)
게임 기획 튜토리얼 (2015 개정판)Lee Sangkyoon (Kay)
 
[NDC 2014] 시나리오라이터의 과거와 현재, 그리고 미래
[NDC 2014] 시나리오라이터의 과거와 현재, 그리고 미래 [NDC 2014] 시나리오라이터의 과거와 현재, 그리고 미래
[NDC 2014] 시나리오라이터의 과거와 현재, 그리고 미래 Hwang Sang Hun
 
Using AR for Vehicle Navigation
Using AR for Vehicle NavigationUsing AR for Vehicle Navigation
Using AR for Vehicle NavigationMark Billinghurst
 
UX Discovery 특별호 : 미래 자동차를 위한 제언
UX Discovery 특별호 : 미래 자동차를 위한 제언UX Discovery 특별호 : 미래 자동차를 위한 제언
UX Discovery 특별호 : 미래 자동차를 위한 제언RightBrain inc.
 
(개정) 알면 알수록 어려운 서비스 기획 뽀개기!
(개정) 알면 알수록 어려운 서비스 기획 뽀개기!(개정) 알면 알수록 어려운 서비스 기획 뽀개기!
(개정) 알면 알수록 어려운 서비스 기획 뽀개기!YOO SE KYUN
 
UX Discovery_Metaverse_RightBrain_Seminar
UX Discovery_Metaverse_RightBrain_SeminarUX Discovery_Metaverse_RightBrain_Seminar
UX Discovery_Metaverse_RightBrain_SeminarRightBrain inc.
 
Developing AR and VR Experiences with Unity
Developing AR and VR Experiences with UnityDeveloping AR and VR Experiences with Unity
Developing AR and VR Experiences with UnityMark Billinghurst
 
Comp4010 Lecture12 Research Directions
Comp4010 Lecture12 Research DirectionsComp4010 Lecture12 Research Directions
Comp4010 Lecture12 Research DirectionsMark Billinghurst
 
슬라이드쉐어
슬라이드쉐어슬라이드쉐어
슬라이드쉐어sungminlee
 

What's hot (20)

NDC16 스매싱더배틀 1년간의 개발일지
NDC16 스매싱더배틀 1년간의 개발일지NDC16 스매싱더배틀 1년간의 개발일지
NDC16 스매싱더배틀 1년간의 개발일지
 
Deview2014 Live Broadcasting 추천시스템 발표 자료
Deview2014 Live Broadcasting 추천시스템 발표 자료Deview2014 Live Broadcasting 추천시스템 발표 자료
Deview2014 Live Broadcasting 추천시스템 발표 자료
 
1인개발자가되기전알아야할것들
1인개발자가되기전알아야할것들1인개발자가되기전알아야할것들
1인개발자가되기전알아야할것들
 
김동건, 구세대 개발자의 신세대 플레이어를 위한 게임 만들기, NDC2011
김동건, 구세대 개발자의 신세대 플레이어를 위한 게임 만들기, NDC2011김동건, 구세대 개발자의 신세대 플레이어를 위한 게임 만들기, NDC2011
김동건, 구세대 개발자의 신세대 플레이어를 위한 게임 만들기, NDC2011
 
[ NDC 14 ] 가죽 장화를 먹게 해주세요 - [ 야생의 땅 : 듀랑고 ] 의 자유도 높은 아이템 시스템 디자인
[ NDC 14 ] 가죽 장화를 먹게 해주세요 - [ 야생의 땅 : 듀랑고 ] 의 자유도 높은 아이템 시스템 디자인 [ NDC 14 ] 가죽 장화를 먹게 해주세요 - [ 야생의 땅 : 듀랑고 ] 의 자유도 높은 아이템 시스템 디자인
[ NDC 14 ] 가죽 장화를 먹게 해주세요 - [ 야생의 땅 : 듀랑고 ] 의 자유도 높은 아이템 시스템 디자인
 
AWS 클라우드를 통해 최소기능제품(MVP) 빠르게 개발하기 - 윤석찬 테크 에반젤리스트, AWS
AWS 클라우드를 통해 최소기능제품(MVP) 빠르게 개발하기 - 윤석찬 테크 에반젤리스트, AWSAWS 클라우드를 통해 최소기능제품(MVP) 빠르게 개발하기 - 윤석찬 테크 에반젤리스트, AWS
AWS 클라우드를 통해 최소기능제품(MVP) 빠르게 개발하기 - 윤석찬 테크 에반젤리스트, AWS
 
Lecture 9 AR Technology
Lecture 9 AR TechnologyLecture 9 AR Technology
Lecture 9 AR Technology
 
Ndc17 슈퍼판타지워 포스트모템_srpg로 맨땅에 헤딩하기
Ndc17 슈퍼판타지워 포스트모템_srpg로 맨땅에 헤딩하기Ndc17 슈퍼판타지워 포스트모템_srpg로 맨땅에 헤딩하기
Ndc17 슈퍼판타지워 포스트모템_srpg로 맨땅에 헤딩하기
 
Role of UI and UX in improving customer experience
Role of UI and UX in improving customer experienceRole of UI and UX in improving customer experience
Role of UI and UX in improving customer experience
 
Advanced Methods for User Evaluation in AR/VR Studies
Advanced Methods for User Evaluation in AR/VR StudiesAdvanced Methods for User Evaluation in AR/VR Studies
Advanced Methods for User Evaluation in AR/VR Studies
 
게임 기획 튜토리얼 (2015 개정판)
게임 기획 튜토리얼 (2015 개정판)게임 기획 튜토리얼 (2015 개정판)
게임 기획 튜토리얼 (2015 개정판)
 
[NDC 2014] 시나리오라이터의 과거와 현재, 그리고 미래
[NDC 2014] 시나리오라이터의 과거와 현재, 그리고 미래 [NDC 2014] 시나리오라이터의 과거와 현재, 그리고 미래
[NDC 2014] 시나리오라이터의 과거와 현재, 그리고 미래
 
Using AR for Vehicle Navigation
Using AR for Vehicle NavigationUsing AR for Vehicle Navigation
Using AR for Vehicle Navigation
 
UX Discovery 특별호 : 미래 자동차를 위한 제언
UX Discovery 특별호 : 미래 자동차를 위한 제언UX Discovery 특별호 : 미래 자동차를 위한 제언
UX Discovery 특별호 : 미래 자동차를 위한 제언
 
(개정) 알면 알수록 어려운 서비스 기획 뽀개기!
(개정) 알면 알수록 어려운 서비스 기획 뽀개기!(개정) 알면 알수록 어려운 서비스 기획 뽀개기!
(개정) 알면 알수록 어려운 서비스 기획 뽀개기!
 
UX Discovery_Metaverse_RightBrain_Seminar
UX Discovery_Metaverse_RightBrain_SeminarUX Discovery_Metaverse_RightBrain_Seminar
UX Discovery_Metaverse_RightBrain_Seminar
 
Developing AR and VR Experiences with Unity
Developing AR and VR Experiences with UnityDeveloping AR and VR Experiences with Unity
Developing AR and VR Experiences with Unity
 
Comp4010 Lecture12 Research Directions
Comp4010 Lecture12 Research DirectionsComp4010 Lecture12 Research Directions
Comp4010 Lecture12 Research Directions
 
슬라이드쉐어
슬라이드쉐어슬라이드쉐어
슬라이드쉐어
 
서비스디자인컨설팅 활용가이드북 - 한국디자인진흥원
서비스디자인컨설팅 활용가이드북 - 한국디자인진흥원서비스디자인컨설팅 활용가이드북 - 한국디자인진흥원
서비스디자인컨설팅 활용가이드북 - 한국디자인진흥원
 

Viewers also liked

Build the Virtual Reality Web with A-Frame
Build the Virtual Reality Web with A-FrameBuild the Virtual Reality Web with A-Frame
Build the Virtual Reality Web with A-FrameMozilla VR
 
A-Frame: VR for Web Developers
A-Frame: VR for Web DevelopersA-Frame: VR for Web Developers
A-Frame: VR for Web DevelopersKevin Ngo
 
The next frontier: WebGL and WebVR
The next frontier: WebGL and WebVRThe next frontier: WebGL and WebVR
The next frontier: WebGL and WebVRCodemotion
 
WebVR - MobileTechCon Berlin 2016
WebVR - MobileTechCon Berlin 2016WebVR - MobileTechCon Berlin 2016
WebVR - MobileTechCon Berlin 2016Carsten Sandtner
 
An Introduction to WebVR – or How to make your user sick in 60 seconds
An Introduction to WebVR – or How to make your user sick in 60 secondsAn Introduction to WebVR – or How to make your user sick in 60 seconds
An Introduction to WebVR – or How to make your user sick in 60 secondsGeilDanke
 
WebVR: Developing for the Immersive Web
WebVR: Developing for the Immersive WebWebVR: Developing for the Immersive Web
WebVR: Developing for the Immersive WebTony Parisi
 
WebVR Ecosystem and API Update
WebVR Ecosystem and API UpdateWebVR Ecosystem and API Update
WebVR Ecosystem and API UpdateTony Parisi
 
Introduction to WebGL and WebVR
Introduction to WebGL and WebVRIntroduction to WebGL and WebVR
Introduction to WebGL and WebVRDaosheng Mu
 
JavaScript Speech Recognition
JavaScript Speech RecognitionJavaScript Speech Recognition
JavaScript Speech RecognitionFITC
 
Developing Web Graphics with WebGL
Developing Web Graphics with WebGLDeveloping Web Graphics with WebGL
Developing Web Graphics with WebGLTony Parisi
 
WebGL: The Next Generation
WebGL:  The Next GenerationWebGL:  The Next Generation
WebGL: The Next GenerationTony Parisi
 
An Introduction to Web VR January 2015
An Introduction to Web VR January 2015An Introduction to Web VR January 2015
An Introduction to Web VR January 2015Tony Parisi
 
Hacking Reality: Browser-Based VR with HTML5
Hacking Reality: Browser-Based VR with HTML5Hacking Reality: Browser-Based VR with HTML5
Hacking Reality: Browser-Based VR with HTML5Tony Parisi
 
Introduction to WebVR Autodesk Forge 2016
Introduction to WebVR Autodesk Forge 2016Introduction to WebVR Autodesk Forge 2016
Introduction to WebVR Autodesk Forge 2016Tony Parisi
 
Barefoot Leader's Guide to 3D Web part 1
Barefoot Leader's Guide to 3D Web part 1Barefoot Leader's Guide to 3D Web part 1
Barefoot Leader's Guide to 3D Web part 1Virtual iVent
 

Viewers also liked (20)

WebVR
WebVRWebVR
WebVR
 
Build the Virtual Reality Web with A-Frame
Build the Virtual Reality Web with A-FrameBuild the Virtual Reality Web with A-Frame
Build the Virtual Reality Web with A-Frame
 
A-Frame: VR for Web Developers
A-Frame: VR for Web DevelopersA-Frame: VR for Web Developers
A-Frame: VR for Web Developers
 
The next frontier: WebGL and WebVR
The next frontier: WebGL and WebVRThe next frontier: WebGL and WebVR
The next frontier: WebGL and WebVR
 
WebVR - MobileTechCon Berlin 2016
WebVR - MobileTechCon Berlin 2016WebVR - MobileTechCon Berlin 2016
WebVR - MobileTechCon Berlin 2016
 
An Introduction to WebVR – or How to make your user sick in 60 seconds
An Introduction to WebVR – or How to make your user sick in 60 secondsAn Introduction to WebVR – or How to make your user sick in 60 seconds
An Introduction to WebVR – or How to make your user sick in 60 seconds
 
WebVR: Developing for the Immersive Web
WebVR: Developing for the Immersive WebWebVR: Developing for the Immersive Web
WebVR: Developing for the Immersive Web
 
WebVR Ecosystem and API Update
WebVR Ecosystem and API UpdateWebVR Ecosystem and API Update
WebVR Ecosystem and API Update
 
Introduction to WebGL and WebVR
Introduction to WebGL and WebVRIntroduction to WebGL and WebVR
Introduction to WebGL and WebVR
 
Web vr creative_vr
Web vr creative_vrWeb vr creative_vr
Web vr creative_vr
 
20160713 webvr
20160713 webvr20160713 webvr
20160713 webvr
 
JavaScript Speech Recognition
JavaScript Speech RecognitionJavaScript Speech Recognition
JavaScript Speech Recognition
 
Developing Web Graphics with WebGL
Developing Web Graphics with WebGLDeveloping Web Graphics with WebGL
Developing Web Graphics with WebGL
 
WebGL: The Next Generation
WebGL:  The Next GenerationWebGL:  The Next Generation
WebGL: The Next Generation
 
An Introduction to Web VR January 2015
An Introduction to Web VR January 2015An Introduction to Web VR January 2015
An Introduction to Web VR January 2015
 
Hacking Reality: Browser-Based VR with HTML5
Hacking Reality: Browser-Based VR with HTML5Hacking Reality: Browser-Based VR with HTML5
Hacking Reality: Browser-Based VR with HTML5
 
Introduction to WebVR Autodesk Forge 2016
Introduction to WebVR Autodesk Forge 2016Introduction to WebVR Autodesk Forge 2016
Introduction to WebVR Autodesk Forge 2016
 
점, 선, 면
점, 선, 면점, 선, 면
점, 선, 면
 
3D Web in 3D
3D Web in 3D3D Web in 3D
3D Web in 3D
 
Barefoot Leader's Guide to 3D Web part 1
Barefoot Leader's Guide to 3D Web part 1Barefoot Leader's Guide to 3D Web part 1
Barefoot Leader's Guide to 3D Web part 1
 

Similar to Bringing Virtual Reality to the Web: VR, WebGL and CSS – Together At Last!

Getting Started with Web VR
Getting Started with Web VR Getting Started with Web VR
Getting Started with Web VR Saurabh Badhwar
 
Scotland JS 2016 Keynote: The VR Web and the Future of the Browser
Scotland JS 2016 Keynote: The VR Web and the Future of the BrowserScotland JS 2016 Keynote: The VR Web and the Future of the Browser
Scotland JS 2016 Keynote: The VR Web and the Future of the BrowserLiv Erickson
 
Casper Fabricius (Cimmerse): WebVR with A-Frame, React and Redux
Casper Fabricius (Cimmerse): WebVR with A-Frame, React and ReduxCasper Fabricius (Cimmerse): WebVR with A-Frame, React and Redux
Casper Fabricius (Cimmerse): WebVR with A-Frame, React and ReduxAugmentedWorldExpo
 
Building Browser VR Experience in React VR
Building Browser VR Experience in React VRBuilding Browser VR Experience in React VR
Building Browser VR Experience in React VRMarcin Mincer
 
Foundations of the Immersive Web
Foundations of the Immersive WebFoundations of the Immersive Web
Foundations of the Immersive WebTony Parisi
 
Introduction to The VR Web
Introduction to The VR WebIntroduction to The VR Web
Introduction to The VR WebLiv Erickson
 
Getting Started in VR with JS
Getting Started in VR with JSGetting Started in VR with JS
Getting Started in VR with JSRudy Jahchan
 
Migrating your Web app to Virtual Reality
Migrating your Web app to Virtual RealityMigrating your Web app to Virtual Reality
Migrating your Web app to Virtual RealityDenis Radin
 
Intro to @viewport & other new Responsive Web Design CSS features
Intro to @viewport & other new Responsive Web Design CSS featuresIntro to @viewport & other new Responsive Web Design CSS features
Intro to @viewport & other new Responsive Web Design CSS featuresAndreas Bovens
 
How to build a html5 websites.v1
How to build a html5 websites.v1How to build a html5 websites.v1
How to build a html5 websites.v1Bitla Software
 
Портируем существующее Web-приложение в виртуальную реальность / Денис Радин ...
Портируем существующее Web-приложение в виртуальную реальность / Денис Радин ...Портируем существующее Web-приложение в виртуальную реальность / Денис Радин ...
Портируем существующее Web-приложение в виртуальную реальность / Денис Радин ...Ontico
 
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...Esri Nederland
 
WEB-VR by Ankitkumar Singh
WEB-VR by Ankitkumar SinghWEB-VR by Ankitkumar Singh
WEB-VR by Ankitkumar SinghAnkitkumar Singh
 
Get Ahead with HTML5 on Moible
Get Ahead with HTML5 on MoibleGet Ahead with HTML5 on Moible
Get Ahead with HTML5 on Moiblemarkuskobler
 
Writing Virtual And Augmented Reality Apps With Web Technology
Writing Virtual And Augmented Reality Apps With Web TechnologyWriting Virtual And Augmented Reality Apps With Web Technology
Writing Virtual And Augmented Reality Apps With Web TechnologyMichaela Lehr
 
Writing Virtual And Augmented Reality Apps With Web Technology
Writing Virtual And Augmented Reality Apps With Web TechnologyWriting Virtual And Augmented Reality Apps With Web Technology
Writing Virtual And Augmented Reality Apps With Web TechnologyGeilDanke
 

Similar to Bringing Virtual Reality to the Web: VR, WebGL and CSS – Together At Last! (20)

Getting Started with Web VR
Getting Started with Web VR Getting Started with Web VR
Getting Started with Web VR
 
Ferguson VR Hackathon - May 6, 2017
Ferguson VR Hackathon - May 6, 2017Ferguson VR Hackathon - May 6, 2017
Ferguson VR Hackathon - May 6, 2017
 
Scotland JS 2016 Keynote: The VR Web and the Future of the Browser
Scotland JS 2016 Keynote: The VR Web and the Future of the BrowserScotland JS 2016 Keynote: The VR Web and the Future of the Browser
Scotland JS 2016 Keynote: The VR Web and the Future of the Browser
 
Casper Fabricius (Cimmerse): WebVR with A-Frame, React and Redux
Casper Fabricius (Cimmerse): WebVR with A-Frame, React and ReduxCasper Fabricius (Cimmerse): WebVR with A-Frame, React and Redux
Casper Fabricius (Cimmerse): WebVR with A-Frame, React and Redux
 
The Powerful VR WEB Is Here
The Powerful VR WEB Is HereThe Powerful VR WEB Is Here
The Powerful VR WEB Is Here
 
Building Browser VR Experience in React VR
Building Browser VR Experience in React VRBuilding Browser VR Experience in React VR
Building Browser VR Experience in React VR
 
Foundations of the Immersive Web
Foundations of the Immersive WebFoundations of the Immersive Web
Foundations of the Immersive Web
 
Introduction to The VR Web
Introduction to The VR WebIntroduction to The VR Web
Introduction to The VR Web
 
Getting Started in VR with JS
Getting Started in VR with JSGetting Started in VR with JS
Getting Started in VR with JS
 
Migrating your Web app to Virtual Reality
Migrating your Web app to Virtual RealityMigrating your Web app to Virtual Reality
Migrating your Web app to Virtual Reality
 
Intro to @viewport & other new Responsive Web Design CSS features
Intro to @viewport & other new Responsive Web Design CSS featuresIntro to @viewport & other new Responsive Web Design CSS features
Intro to @viewport & other new Responsive Web Design CSS features
 
How to build a html5 websites.v1
How to build a html5 websites.v1How to build a html5 websites.v1
How to build a html5 websites.v1
 
Портируем существующее Web-приложение в виртуальную реальность / Денис Радин ...
Портируем существующее Web-приложение в виртуальную реальность / Денис Радин ...Портируем существующее Web-приложение в виртуальную реальность / Денис Радин ...
Портируем существующее Web-приложение в виртуальную реальность / Денис Радин ...
 
HTML5 - A Whirlwind tour
HTML5 - A Whirlwind tourHTML5 - A Whirlwind tour
HTML5 - A Whirlwind tour
 
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...
 
WEB-VR by Ankitkumar Singh
WEB-VR by Ankitkumar SinghWEB-VR by Ankitkumar Singh
WEB-VR by Ankitkumar Singh
 
Get Ahead with HTML5 on Moible
Get Ahead with HTML5 on MoibleGet Ahead with HTML5 on Moible
Get Ahead with HTML5 on Moible
 
Html5
Html5Html5
Html5
 
Writing Virtual And Augmented Reality Apps With Web Technology
Writing Virtual And Augmented Reality Apps With Web TechnologyWriting Virtual And Augmented Reality Apps With Web Technology
Writing Virtual And Augmented Reality Apps With Web Technology
 
Writing Virtual And Augmented Reality Apps With Web Technology
Writing Virtual And Augmented Reality Apps With Web TechnologyWriting Virtual And Augmented Reality Apps With Web Technology
Writing Virtual And Augmented Reality Apps With Web Technology
 

More from FITC

Cut it up
Cut it upCut it up
Cut it upFITC
 
Designing for Digital Health
Designing for Digital HealthDesigning for Digital Health
Designing for Digital HealthFITC
 
Profiling JavaScript Performance
Profiling JavaScript PerformanceProfiling JavaScript Performance
Profiling JavaScript PerformanceFITC
 
Surviving Your Tech Stack
Surviving Your Tech StackSurviving Your Tech Stack
Surviving Your Tech StackFITC
 
How to Pitch Your First AR Project
How to Pitch Your First AR ProjectHow to Pitch Your First AR Project
How to Pitch Your First AR ProjectFITC
 
Start by Understanding the Problem, Not by Delivering the Answer
Start by Understanding the Problem, Not by Delivering the AnswerStart by Understanding the Problem, Not by Delivering the Answer
Start by Understanding the Problem, Not by Delivering the AnswerFITC
 
Cocaine to Carrots: The Art of Telling Someone Else’s Story
Cocaine to Carrots: The Art of Telling Someone Else’s StoryCocaine to Carrots: The Art of Telling Someone Else’s Story
Cocaine to Carrots: The Art of Telling Someone Else’s StoryFITC
 
Everyday Innovation
Everyday InnovationEveryday Innovation
Everyday InnovationFITC
 
HyperLight Websites
HyperLight WebsitesHyperLight Websites
HyperLight WebsitesFITC
 
Everything is Terrifying
Everything is TerrifyingEverything is Terrifying
Everything is TerrifyingFITC
 
Post-Earth Visions: Designing for Space and the Future Human
Post-Earth Visions: Designing for Space and the Future HumanPost-Earth Visions: Designing for Space and the Future Human
Post-Earth Visions: Designing for Space and the Future HumanFITC
 
The Rise of the Creative Social Influencer (and How to Become One)
The Rise of the Creative Social Influencer (and How to Become One)The Rise of the Creative Social Influencer (and How to Become One)
The Rise of the Creative Social Influencer (and How to Become One)FITC
 
East of the Rockies: Developing an AR Game
East of the Rockies: Developing an AR GameEast of the Rockies: Developing an AR Game
East of the Rockies: Developing an AR GameFITC
 
Creating a Proactive Healthcare System
Creating a Proactive Healthcare SystemCreating a Proactive Healthcare System
Creating a Proactive Healthcare SystemFITC
 
World Transformation: The Secret Agenda of Product Design
World Transformation: The Secret Agenda of Product DesignWorld Transformation: The Secret Agenda of Product Design
World Transformation: The Secret Agenda of Product DesignFITC
 
The Power of Now
The Power of NowThe Power of Now
The Power of NowFITC
 
High Performance PWAs
High Performance PWAsHigh Performance PWAs
High Performance PWAsFITC
 
Rise of the JAMstack
Rise of the JAMstackRise of the JAMstack
Rise of the JAMstackFITC
 
From Closed to Open: A Journey of Self Discovery
From Closed to Open: A Journey of Self DiscoveryFrom Closed to Open: A Journey of Self Discovery
From Closed to Open: A Journey of Self DiscoveryFITC
 
Projects Ain’t Nobody Got Time For
Projects Ain’t Nobody Got Time ForProjects Ain’t Nobody Got Time For
Projects Ain’t Nobody Got Time ForFITC
 

More from FITC (20)

Cut it up
Cut it upCut it up
Cut it up
 
Designing for Digital Health
Designing for Digital HealthDesigning for Digital Health
Designing for Digital Health
 
Profiling JavaScript Performance
Profiling JavaScript PerformanceProfiling JavaScript Performance
Profiling JavaScript Performance
 
Surviving Your Tech Stack
Surviving Your Tech StackSurviving Your Tech Stack
Surviving Your Tech Stack
 
How to Pitch Your First AR Project
How to Pitch Your First AR ProjectHow to Pitch Your First AR Project
How to Pitch Your First AR Project
 
Start by Understanding the Problem, Not by Delivering the Answer
Start by Understanding the Problem, Not by Delivering the AnswerStart by Understanding the Problem, Not by Delivering the Answer
Start by Understanding the Problem, Not by Delivering the Answer
 
Cocaine to Carrots: The Art of Telling Someone Else’s Story
Cocaine to Carrots: The Art of Telling Someone Else’s StoryCocaine to Carrots: The Art of Telling Someone Else’s Story
Cocaine to Carrots: The Art of Telling Someone Else’s Story
 
Everyday Innovation
Everyday InnovationEveryday Innovation
Everyday Innovation
 
HyperLight Websites
HyperLight WebsitesHyperLight Websites
HyperLight Websites
 
Everything is Terrifying
Everything is TerrifyingEverything is Terrifying
Everything is Terrifying
 
Post-Earth Visions: Designing for Space and the Future Human
Post-Earth Visions: Designing for Space and the Future HumanPost-Earth Visions: Designing for Space and the Future Human
Post-Earth Visions: Designing for Space and the Future Human
 
The Rise of the Creative Social Influencer (and How to Become One)
The Rise of the Creative Social Influencer (and How to Become One)The Rise of the Creative Social Influencer (and How to Become One)
The Rise of the Creative Social Influencer (and How to Become One)
 
East of the Rockies: Developing an AR Game
East of the Rockies: Developing an AR GameEast of the Rockies: Developing an AR Game
East of the Rockies: Developing an AR Game
 
Creating a Proactive Healthcare System
Creating a Proactive Healthcare SystemCreating a Proactive Healthcare System
Creating a Proactive Healthcare System
 
World Transformation: The Secret Agenda of Product Design
World Transformation: The Secret Agenda of Product DesignWorld Transformation: The Secret Agenda of Product Design
World Transformation: The Secret Agenda of Product Design
 
The Power of Now
The Power of NowThe Power of Now
The Power of Now
 
High Performance PWAs
High Performance PWAsHigh Performance PWAs
High Performance PWAs
 
Rise of the JAMstack
Rise of the JAMstackRise of the JAMstack
Rise of the JAMstack
 
From Closed to Open: A Journey of Self Discovery
From Closed to Open: A Journey of Self DiscoveryFrom Closed to Open: A Journey of Self Discovery
From Closed to Open: A Journey of Self Discovery
 
Projects Ain’t Nobody Got Time For
Projects Ain’t Nobody Got Time ForProjects Ain’t Nobody Got Time For
Projects Ain’t Nobody Got Time For
 

Recently uploaded

TRENDS Enabling and inhibiting dimensions.pptx
TRENDS Enabling and inhibiting dimensions.pptxTRENDS Enabling and inhibiting dimensions.pptx
TRENDS Enabling and inhibiting dimensions.pptxAndrieCagasanAkio
 
Company Snapshot Theme for Business by Slidesgo.pptx
Company Snapshot Theme for Business by Slidesgo.pptxCompany Snapshot Theme for Business by Slidesgo.pptx
Company Snapshot Theme for Business by Slidesgo.pptxMario
 
IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119APNIC
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书rnrncn29
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书zdzoqco
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa494f574xmv
 
ETHICAL HACKING dddddddddddddddfnandni.pptx
ETHICAL HACKING dddddddddddddddfnandni.pptxETHICAL HACKING dddddddddddddddfnandni.pptx
ETHICAL HACKING dddddddddddddddfnandni.pptxNIMMANAGANTI RAMAKRISHNA
 
Unidad 4 – Redes de ordenadores (en inglés).pptx
Unidad 4 – Redes de ordenadores (en inglés).pptxUnidad 4 – Redes de ordenadores (en inglés).pptx
Unidad 4 – Redes de ordenadores (en inglés).pptxmibuzondetrabajo
 
SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predieusebiomeyer
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxDyna Gilbert
 
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书rnrncn29
 

Recently uploaded (11)

TRENDS Enabling and inhibiting dimensions.pptx
TRENDS Enabling and inhibiting dimensions.pptxTRENDS Enabling and inhibiting dimensions.pptx
TRENDS Enabling and inhibiting dimensions.pptx
 
Company Snapshot Theme for Business by Slidesgo.pptx
Company Snapshot Theme for Business by Slidesgo.pptxCompany Snapshot Theme for Business by Slidesgo.pptx
Company Snapshot Theme for Business by Slidesgo.pptx
 
IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa
 
ETHICAL HACKING dddddddddddddddfnandni.pptx
ETHICAL HACKING dddddddddddddddfnandni.pptxETHICAL HACKING dddddddddddddddfnandni.pptx
ETHICAL HACKING dddddddddddddddfnandni.pptx
 
Unidad 4 – Redes de ordenadores (en inglés).pptx
Unidad 4 – Redes de ordenadores (en inglés).pptxUnidad 4 – Redes de ordenadores (en inglés).pptx
Unidad 4 – Redes de ordenadores (en inglés).pptx
 
SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predi
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptx
 
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
 

Bringing Virtual Reality to the Web: VR, WebGL and CSS – Together At Last!

  • 2. Why WebVR? Web is a highly connected environment The “Metaverse” is a VR-rich concept .. we’re already very close! It’s just 2D!
  • 3. WhyWebVR? In practical terms, VR will succeed or fail based on content and how easy it is to access that content. There is no easier or more ubiquitous content delivery mechanism than the Web. It had better be able to deliver VR.
  • 4. VR Basics Quick Overview of VR
  • 5. Immersion Sensory Immersion (Focus on Visual Immersion) Input Immersion
  • 10. WebVR Overview What is WebVR? What does WebVR enable?
  • 11. WebVR Render Web Content in VR Access to devices being used for Virtual Reality Device-agnostic VR in browser Focus on Head-Mounted Displays (HMDs) and Sensor devices
  • 12. Web Content in VR Focus on Visual Immersion Provide Input, But Up to App to Handle Support both WebGL and HTML/CSS Content Goals: Allow High-End Experiences with VR in the browser (asm.js, Emscripten, game engines, etc.) Allow Web Experiences with VR (responsive sites, CSS 3D, VR browsing, etc.)
  • 13. Device-agnostic VR Challenge: Unify varied devices Provide consistent API
  • 14. Device-agnostic VR Even worse situation in sensors!
  • 15. WebVR API Nuts & Bolts
  • 16. Basic Interface Call getVRDevices(), which returns a Promise: navigator.getVRDevices().then(vrDeviceCallback) The callback receives a list of all available VR devices: function vrDeviceCallback(vrDevices) { … }
  • 17. VR Devices For every device: hardwareUnitId Unique identifier per hardware device deviceId Unique identifier for specific sensor/device on hardware deviceName User-readable name identifying the sensor
  • 18. VR Devices For example, with an Oculus Rift connected, getVRDevices() will return a list with... (1)HMDVRDevice a)hardwareDeviceId: oculus-1 b)deviceId: 12345 c)deviceName: “Oculus Rift HMD” (1)SensorVRDevice a)hardwareDeviceId: oculus-1 b)deviceId: abcde c)deviceName: “Oculus Rift Sensor” Same hardware Device ID
  • 19. VR Devices: HMDs HMDs have configuration and data for rendering setFieldOfView(left, right, zNear, zFar) Configure the field of view that rendering will use getRecommendedEyeFieldOfView(whichEye) getMaximumEyeFieldOfView(whichEye) getCurrentEyeFieldOfView(whichEye) Get the recommended and maximum FOV that this device can render
  • 20. Configuring HMDs hmd.setFieldOfView( { upDegrees: 65, downDegrees: 65, leftDegrees: 65, rightDegrees: 45 }, … ); Human eye field of view (Wikipedia) 60°upwards 75°downwards 95°away from nose 60°towards nose Viewing parameters are needed for proper distortion and WebGL rendering Vertical FOV Horizontal FOV Left Degrees Right Degrees Up Degrees Down Degrees Asymmetrical Projection
  • 21. VR Devices: HMDs getEyeTranslation(whichEye) Get the eye translation offset for the given eye getRecommendedEyeRenderRect(whichEye) Get the render rectangle where content for the given eye should go
  • 22. Configuring HMDs hmd.getRecommendedEyeRenderRect(“left”) Mainly useful for WebGL, defines where and how big the eye’s scene should be rendered. WebGL Canvas Left Eye Render Rect
  • 23. VR Devices: Sensors getState(timeOffset = 0.0) Get the state of this sensor, at the given optional time offset. Returns a dictionary containing position, orientation, as well as linear and angular velocity and acceleration. zeroSensor() Reset the sensor, making the current state the zero position
  • 24. Getting State hmdSensor.getState() Obtain the current state of the sensor. Call per frame. Future: a particular per-frame state may be provided Helps the browser know exactly what state was used to render For proper WebGL + CSS sync For Oculus Timewarp rendering { orientation: {w:0, x:0, y:0, z:0}, angularAcceleration: {x:0, y:0, z:0}, angularVelocity: {x:0, y:0, z:0}, position: {x:0, y:0, z:0}, linearAcceleration: {x:0, y:0, z:0}, linearVelocity: {x:0, y:0, z:0}, timeStamp: 0 }
  • 25. Entering VR Mode requestFullScreen call is extended to take an options dictionary One option specifies the VR Display to go fullscreen on; also activates VR Rendering var container = document.getElementById(“container”); container.mozRequestFullScreen({ vrDisplay: hmd }); Fullscreen is the onlyway to enter VR Mode
  • 27. WebVR with WebGL Most similar to traditional 3D/VR development App code does all rendering Final presentation steps done by browser Quick integration with existing WebGL content and engines
  • 28. Relevant WebVR API HMD: setFieldOfView() Browser needs to know exact FOV settings that content is rendering with HMD: getRecommendedEyeRenderRect() Browser needs to know where the left/right eye content is present Sensors: getState() Content rendering should take into account position/orientation of HMD, and any other sensors that are supported
  • 29. Engine Integration Natural extension to WebGL Content e.g.: multiple WebVR Renderers for three.js exist that use the WebVR API Working on adding support to UE4, Unity, etc. Lots of interest among Mozilla Games project
  • 31. Why HTML/CSS with VR? Modern CSS has lots of features 3D Transforms Transitions Animations Gradients Complex Backgrounds HTML/CSS is well-suited for a lot of content e.g. placing informative content in a VR space HTML/CSS + VR can move us to Responsive Design Web sites can adapt to “Browsing in VR”
  • 32. CSS 3D Transforms transform-style: preserve-3d; transform: translateZ(-200px);
  • 33. CSS 3D Transforms in VR No perspectiveproperty used: VR creates its own space Defined by the VR HMD FOV CSS Origin is Top Left VR Origin is Center … this may be controversial (... and may not be even needed)
  • 34. Handling Position/Orientation in CSS Present Per-frame, set a transform on an element that acts as the “camera” Use position/orientation from state to generate a transformation matrix var state = hmdSensor.getState(); camera.style.transform = stateToCSSTransform(state);
  • 35. Handling Position/Orientation in CSS Future Use a CSS property #camera { transform: vr-orientation() vr-position(); } Automatic application of position/orientation from fullscreen HMD device Allows for code-free VR
  • 36. Responsive Design @media screen and (min-width: 400px) and (orientation: portrait) { /* phone UI rules */ } @media screen and (min-width: 800px) { /* desktop and large tablet rules */ } @media vr { #camera { transform: vr-orientation() vr-position(); } #contentArea { width: 100cm; height: 80cm; transform: translateZ(50cm); } }
  • 38. WebVR Status Experimental Firefox and Chrome Builds Implement the API described here WebGLRendering Works Well In Both CSS Rendering Only In Firefox Everything Subject To Change! (Still R&D!)
  • 39. WebVR Status Core API with no CSS support will likely be first to ship Will enable WebGL VR rendering Will enable Emscripten/asm.js-based porting of VR content and demos
  • 40. WebVR Status Oculus Rift support only Desktop only Google Carboard coming soon Android coming soon Additional input devices coming soon
  • 41. WebVR Status Web toolmakers adding support (especially in gaming space) Working on adding support to Emscripten CSS 3D designers also experimenting
  • 43. Hiro Mozilla exploration of VR browsing VR-based Interaction Browsing existing sites in VR Browsing VR sites smoothly from a HUD/controller Input issues (e.g. URLs? Usernames/passwords?) First demo soon, rapid updates
  • 44. For more information... web-vr-discuss mailing list https://mail.mozilla.org/listinfo/web-vr-discuss (search for web-vr-discuss!) @vvuk I’ll generally announce new builds, etc. to Twitter. @joshcarpenter For work on Hiroand VR design and UX