SlideShare a Scribd company logo
1 of 20
TONY PARISI
APRIL, 2015
WEBVR:
VR WITHOUT
BORDERS
ABOUT ME
http://www.tonyparisi.com 4/7/2015
CONTACT
tparisi@gmail.com
skype: auradeluxe
http://twitter.com/auradeluxe http://www.tonypa
risi.com/
http://www.learningwebgl.com/
GET THE BOOKS!
WebGL: Up and Running
http://www.amazon.com/dp/144932357X
Programming 3D Applications with HTML and WebGL
http://www.amazon.com/Programming-Applications-HTML5-WebGL-
Visualization/dp/1449362966
MEETUPS
http://www.meetup.com/WebGL-Developers-Meetup/
http://www.meetup.com/Web-VR/
BOOK CODE
https://github.com/tparisi/WebGLBook
https://github.com/tparisi/Programming3DApplications
GET GLAM
http://www.glamjs.org/
https://github.com/tparisi/glam/
WORK
http://www.thirdeye.gl/
CREDS
Co-creator, VRML and X3D
4/7/2015http://www.tonyparisi.com
 Giant downloads
 App store installs
 Proprietary stacks
 Closed culture
 Experts only!
VR APPS TODAY
WEB APPS TODAY
 Instant access
 No gatekeepers
 Instant publishing
 Your choice of tools
 Culture of collaboration
 Source code
 No barriers to entry
4/7/2015http://www.tonyparisi.com
image: Mark Surman
http://commonspace.wordpress.com/2014/03/12/happybirthday/
THE WEB + VR
TWO GREAT TASTES… ?
4/7/2015http://www.tonyparisi.com
YOUR BROWSER
ALREADY DOES 3D
4/7/2015http://www.tonyparisi.com
3B seats.
Q.E.D.
WebGL is on all
desktop mobile
browsers
 WEBVR API
 HEAD-TRACKING AND
FULLSCREEN VR
SUPPORT NOW IN
BROWSER BUILDS!!!
(SOON IN NIGHTLY
CHANNEL!!!)
 NO BIG APP DOWNLOADS
AND INSTALLS!!!
http://mozvr.github.io/webvr-spec/webvr.html
4/7/2015http://www.tonyparisi.com
SOON – IT WILL DO VR,
TOO
Quake 3 WebVR demo, developed by Brandon
Jones of Google
http://media.tojicode.com/q3bsp/
THE WEBVR API
1. QUERY FOR VR DEVICE(S) TO RENDER
4/7/2015http://www.tonyparisi.com
// polyfill
var getVRDevices = navigator.mozGetVRDevices /* FF */ ||
navigator.getVRDevices; /* webkit */
var self = this;
getVRDevices().then( gotVRDevices );
function gotVRDevices( devices ) {
var vrHMD;
var error;
for ( var i = 0; i < devices.length; ++i ) {
if ( devices[i] instanceof HMDVRDevice ) {
vrHMD = devices[i];
self._vrHMD = vrHMD;
self.leftEyeTranslation = vrHMD.getEyeTranslation( "left" );
self.rightEyeTranslation = vrHMD.getEyeTranslation( "right" );
self.leftEyeFOV = vrHMD.getRecommendedEyeFieldOfView( "left" );
self.rightEyeFOV = vrHMD.getRecommendedEyeFieldOfView( "right" );
break; // We keep the first we encounter
}
}
}
get left/right eye
(camera) positions
get per-eye camera field of view; use
WebGL to render scene from two
cameras
• NOTE: this API is changing as we speak; will update
the example details shortly
THE WEBVR API
2. GO FULLSCREEN (VR MODE)
4/7/2015http://www.tonyparisi.com
var self = this;
var renderer = this._renderer;
var vrHMD = this._vrHMD;
var canvas = renderer.domElement;
var fullScreenChange =
canvas.mozRequestFullScreen? 'mozfullscreenchange' : 'webkitfullscreenchange';
document.addEventListener( fullScreenChange, onFullScreenChanged, false );
function onFullScreenChanged() {
if ( !document.mozFullScreenElement
&& !document.webkitFullScreenElement ) {
self.setFullScreen( false );
}
}
if ( canvas.mozRequestFullScreen ) {
canvas.mozRequestFullScreen( { vrDisplay: vrHMD } );
} else {
canvas.webkitRequestFullscreen( { vrDisplay: vrHMD } );
}
handle exiting fullscreen
mode
request fullscreen mode
for this VR device
fullscreen mode requires a DOM
element
THE WEBVR API
3. HEAD TRACKING
4/7/2015http://www.tonyparisi.com
// polyfill
var getVRDevices = navigator.mozGetVRDevices /* FF */ ||
navigator.getVRDevices; /* webkit */
var self = this;
getVRDevices().then( gotVRDevices );
function gotVRDevices( devices ) {
var vrInput;
var error;
for ( var i = 0; i < devices.length; ++i ) {
if ( devices[i] instanceof PositionSensorVRDevice ) {
vrInput = devices[i]
self._vrInput = vrInput;
break; // We keep the first we encounter
}
}
}
…
// called once per tick from requestAnimationFrame()
var update = function() {
var vrState = this.getVRState();
if ( !vrState ) {
return;
}
// vrState.hmd.rotation contains four floats, quaternion x,y,z,w
setCameraRotation(vrState.hmd.rotation);
};
get head-tracking VR
device
update camera to match HMD
device orientation
query HMD device state
WEBVR AND
CARDBOARD
 GOOGLE CARDBOARD SHOWCASE
 Mobile Chrome http://g.co/chromevr
 Desktop Chrome http://vr.chromeexperiments.com/
 EVEN EASIER THAN OCULUS!
 RENDER WEBGL SIDE-BY-SIDE STEREO (NO NEED TO QUERY
DEVICES)
 USE EXISTING BROWSER FULLSCREEN MODE
 USE BROWSER DEVICE ORIENTATION API FOR HEAD TRACKING
4/7/2015http://www.tonyparisi.com
WEBVR AND THREE.JS
 THE MOST POPULAR WEBGL LIBRARY
 http://threejs.org/
 LATEST STABLE VERSION (r68) INCLUDES STEREO
RENDERING AND HEAD TRACKING
 RENDERING
examples/js/effects/StereoEffect.js (Cardboard)
examples/js/effects/VREffect.js (Rift)
 HEAD TRACKING
examples/js/controls/DeviceOrientationControls.js (Cardboard)
examples/js/controls/VRControls.js (Rift)
New Dev branch of Three.js has recent API updates…
4/7/2015http://www.tonyparisi.com
LET’S BUILD SOMETHING
4/7/2015http://www.tonyparisi.com
Code
https://github.com/tparisi/WebVR
Demo
http://tparisi.github.io/WebVR/examples/cube-oculus.html
OPEN TOOLS
FOR CROSS-PLATFORM VR
4/7/2015http://www.tonyparisi.com
game engines/IDEs
Goo Engine
*http://www.gootechnologies.com/
Verold http://verold.com/ *
Turbulenz https://turbulenz.com/
PlayCanvas http://www.playcanvas.com/
Sketchfab https://sketchfab.com/
Unreal *https://www.unrealengine.com/
Unity * http://unity3d.com/#unity-5
scene graph libraries/page frameworks
Three.js
http://threejs.org/
SceneJS
http://scenejs.org/
BabylonJS
http://www.babylonjs.com/
GLAM
https://github.com/tparisi/glam
video players
eleVR
https://github.com/hawksley/eleVR-Web-Player
Littlstar
https://github.com/littlstar/slant-player
* not open source
PRO TOOLS FOR WEB VR
4/7/2015http://www.tonyparisi.com
EMSCRIPTEN
- THE COOLEST HACK
EVER!
https://github.com/kripken/e
mscripten
 CROSS-
COMPILE C++
NATIVE CODE
TO JAVASCRIPT
 asm.js- LOW-
LEVEL
OPTIMIZED
JAVASCRIPT
 UNITY, UNREAL
ENGINES USE
THIS TO
DEPLOY ON THE
WEB
Unreal native C++ engine -> JavaScript
Emscripten + asm.js
60FPS
Unreal 4 in WebGL
https://developer.mozilla.org/en-US/demos/detail/unreal-engine-4-strategy-game
VR + ML
A MARKUP LANGUAGE FOR THE
METAVERSE?
4/7/2015http://www.tonyparisi.com
 GLAM (GL AND MARKUP) - A
DECLARATIVE LANGUAGE FOR 3D
WEB CONTENT
https://github.com/tparisi/glam/
 DEFINE 3D SCENE CONTENT IN
MARKUP; STYLE IT IN CSS
<glam>
<renderer type="rift"></renderer>
<scene>
<controller type="rift"></controller>
<background id="sb1" class="skybox">
</background>
<group y ='1' z='-3'>
<sphere class="bubble skybox”>
</sphere>
<sphere class="bubble skybox”>
</sphere>
</group>
…
THE MARKUP
<style>
.skybox {
envmap-right:url(../images/Park2/posx.jpg);
…
}
.bubble {
radius:.5;
shader-vertex:url(../shaders/fresnel.vs);
shader-fragment:url(../shaders/fresnel.fs);
shader-uniforms:mRefractionRatio f 1.02
mFresnelBias f 0.1 mFresnelPower f 2.0
mFresnelScale f 1.0 tCube t null;
}
#sb1 {
background-type:box;
}
</style>
THE CSS
Or check out SceneVR from Ben Nolan
http://twitter.com/scenevr/
CHALLENGES
 WEBVR ON OCULUS IS NOT READY FOR PRIME TIME
 (THAT’S OK NEITHER IS OCULUS!)
 LATENCY IS THE BIGGEST ISSUE – BROWSER NEEDS TO UN-
THROTTLE AT 60FPS (IT’S IN THE WORKS…)
 DEVICE DRIVERS AND DISPLAY MODES SUUUUUUCK
#tellmesomethingidontkow
 BUT WE’RE GOOD TO GO ON CARDBOARD!
 60FPS WORKS GREAT (ISH)
 NEARLY 2 BILLION VR DEVICES ALREADY DEPLOYED!
 FRAMEWORKS AND TOOLS ARE TYPICALLY WEB-ISH: UNDER
DEVELOPMENT, ALWAYS IN FLUX, PRETTY MUCH OUT OF CONTROL
 BUT OPEN SOURCE SO WE CAN LIVE WITH IT
4/7/2015http://www.tonyparisi.com
LINKS
 BROWSER DEV BUILDS
Firefox http://blog.bitops.com/blog/2014/08/20/updated-firefox-vr-builds/
Chrome https://drive.google.com/folderview?id=0BzudLt22BqGRbW9WTHMtOWMzNjQ
 MOZILLA VR SHOWCASE
http://mozvr.com/
 WEBVR MAILING LIST
web-vr-discuss@mozilla.org
 CARDBOARD VR SHOWCASE
http://vr.chromeexperiments.com/
 WEB VR EXAMPLE CODE
https://github.com/tparisi/WebVR
4/7/2015http://www.tonyparisi.com
COMING SUMMER 2015
4/7/2015http://www.tonyparisi.com
TONY PARISI
APRIL, 2015
WEBVR:
VR WITHOUT
BORDERS

More Related Content

Viewers also liked

WebGL Primetime!
WebGL Primetime!WebGL Primetime!
WebGL Primetime!Tony Parisi
 
The Web Eats Everything In Its Path Fall 2014
The Web Eats Everything In Its Path Fall 2014The Web Eats Everything In Its Path Fall 2014
The Web Eats Everything In Its Path Fall 2014Tony Parisi
 
WebGL Crash Course
WebGL Crash CourseWebGL Crash Course
WebGL Crash CourseTony Parisi
 
WebGL, WebVR and the Metaverse
WebGL, WebVR and the MetaverseWebGL, WebVR and the Metaverse
WebGL, WebVR and the MetaverseTony Parisi
 
And Who Shall Control the Metaverse?
And Who Shall Control the Metaverse?And Who Shall Control the Metaverse?
And Who Shall Control the Metaverse?Tony 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
 
WebVR Ecosystem and API Update
WebVR Ecosystem and API UpdateWebVR Ecosystem and API Update
WebVR Ecosystem and API UpdateTony Parisi
 
WebVR: Developing for the Immersive Web
WebVR: Developing for the Immersive WebWebVR: Developing for the Immersive Web
WebVR: Developing for the Immersive WebTony 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
 
WebGL - An Overview
WebGL - An OverviewWebGL - An Overview
WebGL - An OverviewJens Arps
 
Introduction to webGL
Introduction to webGLIntroduction to webGL
Introduction to webGL志鴻 詹
 
WebVR with Three.js!
WebVR with Three.js!WebVR with Three.js!
WebVR with Three.js!誠人 堀口
 
Quick dive into WebVR
Quick dive into WebVRQuick dive into WebVR
Quick dive into WebVRJanne Aukia
 
Firefox Extension Development
Firefox Extension DevelopmentFirefox Extension Development
Firefox Extension Developmentphamvanvung
 
WebRTC - On Standards, Identity and Telco Strategy
WebRTC - On Standards, Identity and Telco StrategyWebRTC - On Standards, Identity and Telco Strategy
WebRTC - On Standards, Identity and Telco StrategyJose de Castro
 
3D Image visualization
3D Image visualization3D Image visualization
3D Image visualizationalok ray
 

Viewers also liked (20)

WebGL Primetime!
WebGL Primetime!WebGL Primetime!
WebGL Primetime!
 
The Web Eats Everything In Its Path Fall 2014
The Web Eats Everything In Its Path Fall 2014The Web Eats Everything In Its Path Fall 2014
The Web Eats Everything In Its Path Fall 2014
 
WebGL Crash Course
WebGL Crash CourseWebGL Crash Course
WebGL Crash Course
 
WebGL, WebVR and the Metaverse
WebGL, WebVR and the MetaverseWebGL, WebVR and the Metaverse
WebGL, WebVR and the Metaverse
 
And Who Shall Control the Metaverse?
And Who Shall Control the Metaverse?And Who Shall Control the Metaverse?
And Who Shall Control the Metaverse?
 
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
 
WebVR Ecosystem and API Update
WebVR Ecosystem and API UpdateWebVR Ecosystem and API Update
WebVR Ecosystem and API Update
 
WebVR: Developing for the Immersive Web
WebVR: Developing for the Immersive WebWebVR: Developing for the Immersive Web
WebVR: Developing for the Immersive Web
 
Introduction to WebVR Autodesk Forge 2016
Introduction to WebVR Autodesk Forge 2016Introduction to WebVR Autodesk Forge 2016
Introduction to WebVR Autodesk Forge 2016
 
WebGL - An Overview
WebGL - An OverviewWebGL - An Overview
WebGL - An Overview
 
Introduction to webGL
Introduction to webGLIntroduction to webGL
Introduction to webGL
 
Estudo 01
Estudo 01Estudo 01
Estudo 01
 
JavaScript Web Workers
JavaScript Web WorkersJavaScript Web Workers
JavaScript Web Workers
 
Web vr creative_vr
Web vr creative_vrWeb vr creative_vr
Web vr creative_vr
 
WebVR with Three.js!
WebVR with Three.js!WebVR with Three.js!
WebVR with Three.js!
 
Quick dive into WebVR
Quick dive into WebVRQuick dive into WebVR
Quick dive into WebVR
 
Firefox Extension Development
Firefox Extension DevelopmentFirefox Extension Development
Firefox Extension Development
 
WebVR - JAX 2016
WebVR -  JAX 2016WebVR -  JAX 2016
WebVR - JAX 2016
 
WebRTC - On Standards, Identity and Telco Strategy
WebRTC - On Standards, Identity and Telco StrategyWebRTC - On Standards, Identity and Telco Strategy
WebRTC - On Standards, Identity and Telco Strategy
 
3D Image visualization
3D Image visualization3D Image visualization
3D Image visualization
 

Similar to VR Without Borders RIVER WebVR April 2015

WebGL: The Next Generation
WebGL:  The Next GenerationWebGL:  The Next Generation
WebGL: The Next GenerationTony 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
 
Up And Running With Web VR Fall 2014
Up And Running With Web VR Fall 2014Up And Running With Web VR Fall 2014
Up And Running With Web VR Fall 2014Tony Parisi
 
SaaS Boilerplate.pptx
SaaS Boilerplate.pptxSaaS Boilerplate.pptx
SaaS Boilerplate.pptxDuyKhi8
 
Tools that help and speed up RWD dev
Tools that help  and speed up RWD devTools that help  and speed up RWD dev
Tools that help and speed up RWD devMatjaž Korošec
 
Developing Web Graphics with WebGL
Developing Web Graphics with WebGLDeveloping Web Graphics with WebGL
Developing Web Graphics with WebGLTony Parisi
 
WebGL, HTML5 and How the Mobile Web Was Won
WebGL, HTML5 and How the Mobile Web Was WonWebGL, HTML5 and How the Mobile Web Was Won
WebGL, HTML5 and How the Mobile Web Was WonTony Parisi
 
What Web Developers Need to Know to Develop Windows 8 Apps
What Web Developers Need to Know to Develop Windows 8 AppsWhat Web Developers Need to Know to Develop Windows 8 Apps
What Web Developers Need to Know to Develop Windows 8 AppsDoris Chen
 
WebGL demos showcase
WebGL demos showcaseWebGL demos showcase
WebGL demos showcaseYukio Andoh
 
[MeetUp][2nd] 컭on턺
[MeetUp][2nd] 컭on턺[MeetUp][2nd] 컭on턺
[MeetUp][2nd] 컭on턺InfraEngineer
 
Web Teaching Tools
Web Teaching ToolsWeb Teaching Tools
Web Teaching Toolschiarellic
 
Building AR and VR Experiences for Web Apps with JavaScript
Building AR and VR Experiences for Web Apps with JavaScriptBuilding AR and VR Experiences for Web Apps with JavaScript
Building AR and VR Experiences for Web Apps with JavaScriptFITC
 
Best online tools for freelancers
Best online tools for freelancersBest online tools for freelancers
Best online tools for freelancerselancehungary
 
Praized API @ Demo Camp
Praized API @ Demo CampPraized API @ Demo Camp
Praized API @ Demo CampSylvain Carle
 
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3Doris Chen
 
Foundations of the Immersive Web
Foundations of the Immersive WebFoundations of the Immersive Web
Foundations of the Immersive WebTony Parisi
 
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...Matt Raible
 
5 Skills Needed to be a Successful WebVR Developer
5 Skills Needed to be a Successful WebVR Developer5 Skills Needed to be a Successful WebVR Developer
5 Skills Needed to be a Successful WebVR DeveloperYoni Binstock
 

Similar to VR Without Borders RIVER WebVR April 2015 (20)

WebGL: The Next Generation
WebGL:  The Next GenerationWebGL:  The Next Generation
WebGL: The Next Generation
 
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
 
Up And Running With Web VR Fall 2014
Up And Running With Web VR Fall 2014Up And Running With Web VR Fall 2014
Up And Running With Web VR Fall 2014
 
SaaS Boilerplate.pptx
SaaS Boilerplate.pptxSaaS Boilerplate.pptx
SaaS Boilerplate.pptx
 
Tools that help and speed up RWD dev
Tools that help  and speed up RWD devTools that help  and speed up RWD dev
Tools that help and speed up RWD dev
 
Developing Web Graphics with WebGL
Developing Web Graphics with WebGLDeveloping Web Graphics with WebGL
Developing Web Graphics with WebGL
 
WebGL, HTML5 and How the Mobile Web Was Won
WebGL, HTML5 and How the Mobile Web Was WonWebGL, HTML5 and How the Mobile Web Was Won
WebGL, HTML5 and How the Mobile Web Was Won
 
What Web Developers Need to Know to Develop Windows 8 Apps
What Web Developers Need to Know to Develop Windows 8 AppsWhat Web Developers Need to Know to Develop Windows 8 Apps
What Web Developers Need to Know to Develop Windows 8 Apps
 
WebGL demos showcase
WebGL demos showcaseWebGL demos showcase
WebGL demos showcase
 
[MeetUp][2nd] 컭on턺
[MeetUp][2nd] 컭on턺[MeetUp][2nd] 컭on턺
[MeetUp][2nd] 컭on턺
 
Web Teaching Tools
Web Teaching ToolsWeb Teaching Tools
Web Teaching Tools
 
Building AR and VR Experiences for Web Apps with JavaScript
Building AR and VR Experiences for Web Apps with JavaScriptBuilding AR and VR Experiences for Web Apps with JavaScript
Building AR and VR Experiences for Web Apps with JavaScript
 
Best online tools for freelancers
Best online tools for freelancersBest online tools for freelancers
Best online tools for freelancers
 
Praized API @ Demo Camp
Praized API @ Demo CampPraized API @ Demo Camp
Praized API @ Demo Camp
 
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
 
Foundations of the Immersive Web
Foundations of the Immersive WebFoundations of the Immersive Web
Foundations of the Immersive Web
 
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
 
5 Skills Needed to be a Successful WebVR Developer
5 Skills Needed to be a Successful WebVR Developer5 Skills Needed to be a Successful WebVR Developer
5 Skills Needed to be a Successful WebVR Developer
 
Dev tools
Dev toolsDev tools
Dev tools
 
3d web
3d web3d web
3d web
 

More from Tony Parisi

The New Fine Arts
The New Fine ArtsThe New Fine Arts
The New Fine ArtsTony Parisi
 
Face the Future: Computing in an Augmented World
Face the Future: Computing in an Augmented WorldFace the Future: Computing in an Augmented World
Face the Future: Computing in an Augmented WorldTony Parisi
 
Powering the VR/AR Ecosystem 2017-01-17
Powering the VR/AR Ecosystem 2017-01-17Powering the VR/AR Ecosystem 2017-01-17
Powering the VR/AR Ecosystem 2017-01-17Tony Parisi
 
The Immersive Web
The Immersive WebThe Immersive Web
The Immersive WebTony Parisi
 
React-VR: An Early Experiment with React and WebGL for VR Development
React-VR: An Early Experiment with React and WebGL for VR DevelopmentReact-VR: An Early Experiment with React and WebGL for VR Development
React-VR: An Early Experiment with React and WebGL for VR DevelopmentTony Parisi
 
Vrml, or There and Back Again
Vrml, or There and Back AgainVrml, or There and Back Again
Vrml, or There and Back AgainTony Parisi
 
The Coming Distribution War
The Coming Distribution WarThe Coming Distribution War
The Coming Distribution WarTony Parisi
 
glTF and the WebGL Art Pipeline March 2015
glTF and the WebGL Art Pipeline March 2015glTF and the WebGL Art Pipeline March 2015
glTF and the WebGL Art Pipeline March 2015Tony Parisi
 
Virtually Anywhere
Virtually AnywhereVirtually Anywhere
Virtually AnywhereTony Parisi
 
The Browser As Console - HTML5 and WebGL for Game Development
The Browser As Console - HTML5 and WebGL for Game DevelopmentThe Browser As Console - HTML5 and WebGL for Game Development
The Browser As Console - HTML5 and WebGL for Game DevelopmentTony Parisi
 
WebGL - It's GO Time
WebGL - It's GO TimeWebGL - It's GO Time
WebGL - It's GO TimeTony Parisi
 
glTF Update with Tony Parisi WebGL Meetup August 2013
glTF Update with Tony Parisi WebGL Meetup August 2013glTF Update with Tony Parisi WebGL Meetup August 2013
glTF Update with Tony Parisi WebGL Meetup August 2013Tony Parisi
 
Building Rich Internet Applications with HTML5 and WebGL
Building Rich Internet Applications with HTML5 and WebGLBuilding Rich Internet Applications with HTML5 and WebGL
Building Rich Internet Applications with HTML5 and WebGLTony Parisi
 

More from Tony Parisi (14)

The New Fine Arts
The New Fine ArtsThe New Fine Arts
The New Fine Arts
 
Face the Future: Computing in an Augmented World
Face the Future: Computing in an Augmented WorldFace the Future: Computing in an Augmented World
Face the Future: Computing in an Augmented World
 
Powering the VR/AR Ecosystem 2017-01-17
Powering the VR/AR Ecosystem 2017-01-17Powering the VR/AR Ecosystem 2017-01-17
Powering the VR/AR Ecosystem 2017-01-17
 
The Immersive Web
The Immersive WebThe Immersive Web
The Immersive Web
 
React-VR: An Early Experiment with React and WebGL for VR Development
React-VR: An Early Experiment with React and WebGL for VR DevelopmentReact-VR: An Early Experiment with React and WebGL for VR Development
React-VR: An Early Experiment with React and WebGL for VR Development
 
Vrml, or There and Back Again
Vrml, or There and Back AgainVrml, or There and Back Again
Vrml, or There and Back Again
 
The Coming Distribution War
The Coming Distribution WarThe Coming Distribution War
The Coming Distribution War
 
glTF and the WebGL Art Pipeline March 2015
glTF and the WebGL Art Pipeline March 2015glTF and the WebGL Art Pipeline March 2015
glTF and the WebGL Art Pipeline March 2015
 
Virtually Anywhere
Virtually AnywhereVirtually Anywhere
Virtually Anywhere
 
The Browser As Console - HTML5 and WebGL for Game Development
The Browser As Console - HTML5 and WebGL for Game DevelopmentThe Browser As Console - HTML5 and WebGL for Game Development
The Browser As Console - HTML5 and WebGL for Game Development
 
WebGL - It's GO Time
WebGL - It's GO TimeWebGL - It's GO Time
WebGL - It's GO Time
 
glTF Update with Tony Parisi WebGL Meetup August 2013
glTF Update with Tony Parisi WebGL Meetup August 2013glTF Update with Tony Parisi WebGL Meetup August 2013
glTF Update with Tony Parisi WebGL Meetup August 2013
 
Building Rich Internet Applications with HTML5 and WebGL
Building Rich Internet Applications with HTML5 and WebGLBuilding Rich Internet Applications with HTML5 and WebGL
Building Rich Internet Applications with HTML5 and WebGL
 
Artists Only
Artists OnlyArtists Only
Artists Only
 

VR Without Borders RIVER WebVR April 2015

  • 2. ABOUT ME http://www.tonyparisi.com 4/7/2015 CONTACT tparisi@gmail.com skype: auradeluxe http://twitter.com/auradeluxe http://www.tonypa risi.com/ http://www.learningwebgl.com/ GET THE BOOKS! WebGL: Up and Running http://www.amazon.com/dp/144932357X Programming 3D Applications with HTML and WebGL http://www.amazon.com/Programming-Applications-HTML5-WebGL- Visualization/dp/1449362966 MEETUPS http://www.meetup.com/WebGL-Developers-Meetup/ http://www.meetup.com/Web-VR/ BOOK CODE https://github.com/tparisi/WebGLBook https://github.com/tparisi/Programming3DApplications GET GLAM http://www.glamjs.org/ https://github.com/tparisi/glam/ WORK http://www.thirdeye.gl/ CREDS Co-creator, VRML and X3D
  • 3. 4/7/2015http://www.tonyparisi.com  Giant downloads  App store installs  Proprietary stacks  Closed culture  Experts only! VR APPS TODAY
  • 4. WEB APPS TODAY  Instant access  No gatekeepers  Instant publishing  Your choice of tools  Culture of collaboration  Source code  No barriers to entry 4/7/2015http://www.tonyparisi.com image: Mark Surman http://commonspace.wordpress.com/2014/03/12/happybirthday/
  • 5. THE WEB + VR TWO GREAT TASTES… ? 4/7/2015http://www.tonyparisi.com
  • 6. YOUR BROWSER ALREADY DOES 3D 4/7/2015http://www.tonyparisi.com 3B seats. Q.E.D. WebGL is on all desktop mobile browsers
  • 7.  WEBVR API  HEAD-TRACKING AND FULLSCREEN VR SUPPORT NOW IN BROWSER BUILDS!!! (SOON IN NIGHTLY CHANNEL!!!)  NO BIG APP DOWNLOADS AND INSTALLS!!! http://mozvr.github.io/webvr-spec/webvr.html 4/7/2015http://www.tonyparisi.com SOON – IT WILL DO VR, TOO Quake 3 WebVR demo, developed by Brandon Jones of Google http://media.tojicode.com/q3bsp/
  • 8. THE WEBVR API 1. QUERY FOR VR DEVICE(S) TO RENDER 4/7/2015http://www.tonyparisi.com // polyfill var getVRDevices = navigator.mozGetVRDevices /* FF */ || navigator.getVRDevices; /* webkit */ var self = this; getVRDevices().then( gotVRDevices ); function gotVRDevices( devices ) { var vrHMD; var error; for ( var i = 0; i < devices.length; ++i ) { if ( devices[i] instanceof HMDVRDevice ) { vrHMD = devices[i]; self._vrHMD = vrHMD; self.leftEyeTranslation = vrHMD.getEyeTranslation( "left" ); self.rightEyeTranslation = vrHMD.getEyeTranslation( "right" ); self.leftEyeFOV = vrHMD.getRecommendedEyeFieldOfView( "left" ); self.rightEyeFOV = vrHMD.getRecommendedEyeFieldOfView( "right" ); break; // We keep the first we encounter } } } get left/right eye (camera) positions get per-eye camera field of view; use WebGL to render scene from two cameras • NOTE: this API is changing as we speak; will update the example details shortly
  • 9. THE WEBVR API 2. GO FULLSCREEN (VR MODE) 4/7/2015http://www.tonyparisi.com var self = this; var renderer = this._renderer; var vrHMD = this._vrHMD; var canvas = renderer.domElement; var fullScreenChange = canvas.mozRequestFullScreen? 'mozfullscreenchange' : 'webkitfullscreenchange'; document.addEventListener( fullScreenChange, onFullScreenChanged, false ); function onFullScreenChanged() { if ( !document.mozFullScreenElement && !document.webkitFullScreenElement ) { self.setFullScreen( false ); } } if ( canvas.mozRequestFullScreen ) { canvas.mozRequestFullScreen( { vrDisplay: vrHMD } ); } else { canvas.webkitRequestFullscreen( { vrDisplay: vrHMD } ); } handle exiting fullscreen mode request fullscreen mode for this VR device fullscreen mode requires a DOM element
  • 10. THE WEBVR API 3. HEAD TRACKING 4/7/2015http://www.tonyparisi.com // polyfill var getVRDevices = navigator.mozGetVRDevices /* FF */ || navigator.getVRDevices; /* webkit */ var self = this; getVRDevices().then( gotVRDevices ); function gotVRDevices( devices ) { var vrInput; var error; for ( var i = 0; i < devices.length; ++i ) { if ( devices[i] instanceof PositionSensorVRDevice ) { vrInput = devices[i] self._vrInput = vrInput; break; // We keep the first we encounter } } } … // called once per tick from requestAnimationFrame() var update = function() { var vrState = this.getVRState(); if ( !vrState ) { return; } // vrState.hmd.rotation contains four floats, quaternion x,y,z,w setCameraRotation(vrState.hmd.rotation); }; get head-tracking VR device update camera to match HMD device orientation query HMD device state
  • 11. WEBVR AND CARDBOARD  GOOGLE CARDBOARD SHOWCASE  Mobile Chrome http://g.co/chromevr  Desktop Chrome http://vr.chromeexperiments.com/  EVEN EASIER THAN OCULUS!  RENDER WEBGL SIDE-BY-SIDE STEREO (NO NEED TO QUERY DEVICES)  USE EXISTING BROWSER FULLSCREEN MODE  USE BROWSER DEVICE ORIENTATION API FOR HEAD TRACKING 4/7/2015http://www.tonyparisi.com
  • 12. WEBVR AND THREE.JS  THE MOST POPULAR WEBGL LIBRARY  http://threejs.org/  LATEST STABLE VERSION (r68) INCLUDES STEREO RENDERING AND HEAD TRACKING  RENDERING examples/js/effects/StereoEffect.js (Cardboard) examples/js/effects/VREffect.js (Rift)  HEAD TRACKING examples/js/controls/DeviceOrientationControls.js (Cardboard) examples/js/controls/VRControls.js (Rift) New Dev branch of Three.js has recent API updates… 4/7/2015http://www.tonyparisi.com
  • 14. OPEN TOOLS FOR CROSS-PLATFORM VR 4/7/2015http://www.tonyparisi.com game engines/IDEs Goo Engine *http://www.gootechnologies.com/ Verold http://verold.com/ * Turbulenz https://turbulenz.com/ PlayCanvas http://www.playcanvas.com/ Sketchfab https://sketchfab.com/ Unreal *https://www.unrealengine.com/ Unity * http://unity3d.com/#unity-5 scene graph libraries/page frameworks Three.js http://threejs.org/ SceneJS http://scenejs.org/ BabylonJS http://www.babylonjs.com/ GLAM https://github.com/tparisi/glam video players eleVR https://github.com/hawksley/eleVR-Web-Player Littlstar https://github.com/littlstar/slant-player * not open source
  • 15. PRO TOOLS FOR WEB VR 4/7/2015http://www.tonyparisi.com EMSCRIPTEN - THE COOLEST HACK EVER! https://github.com/kripken/e mscripten  CROSS- COMPILE C++ NATIVE CODE TO JAVASCRIPT  asm.js- LOW- LEVEL OPTIMIZED JAVASCRIPT  UNITY, UNREAL ENGINES USE THIS TO DEPLOY ON THE WEB Unreal native C++ engine -> JavaScript Emscripten + asm.js 60FPS Unreal 4 in WebGL https://developer.mozilla.org/en-US/demos/detail/unreal-engine-4-strategy-game
  • 16. VR + ML A MARKUP LANGUAGE FOR THE METAVERSE? 4/7/2015http://www.tonyparisi.com  GLAM (GL AND MARKUP) - A DECLARATIVE LANGUAGE FOR 3D WEB CONTENT https://github.com/tparisi/glam/  DEFINE 3D SCENE CONTENT IN MARKUP; STYLE IT IN CSS <glam> <renderer type="rift"></renderer> <scene> <controller type="rift"></controller> <background id="sb1" class="skybox"> </background> <group y ='1' z='-3'> <sphere class="bubble skybox”> </sphere> <sphere class="bubble skybox”> </sphere> </group> … THE MARKUP <style> .skybox { envmap-right:url(../images/Park2/posx.jpg); … } .bubble { radius:.5; shader-vertex:url(../shaders/fresnel.vs); shader-fragment:url(../shaders/fresnel.fs); shader-uniforms:mRefractionRatio f 1.02 mFresnelBias f 0.1 mFresnelPower f 2.0 mFresnelScale f 1.0 tCube t null; } #sb1 { background-type:box; } </style> THE CSS Or check out SceneVR from Ben Nolan http://twitter.com/scenevr/
  • 17. CHALLENGES  WEBVR ON OCULUS IS NOT READY FOR PRIME TIME  (THAT’S OK NEITHER IS OCULUS!)  LATENCY IS THE BIGGEST ISSUE – BROWSER NEEDS TO UN- THROTTLE AT 60FPS (IT’S IN THE WORKS…)  DEVICE DRIVERS AND DISPLAY MODES SUUUUUUCK #tellmesomethingidontkow  BUT WE’RE GOOD TO GO ON CARDBOARD!  60FPS WORKS GREAT (ISH)  NEARLY 2 BILLION VR DEVICES ALREADY DEPLOYED!  FRAMEWORKS AND TOOLS ARE TYPICALLY WEB-ISH: UNDER DEVELOPMENT, ALWAYS IN FLUX, PRETTY MUCH OUT OF CONTROL  BUT OPEN SOURCE SO WE CAN LIVE WITH IT 4/7/2015http://www.tonyparisi.com
  • 18. LINKS  BROWSER DEV BUILDS Firefox http://blog.bitops.com/blog/2014/08/20/updated-firefox-vr-builds/ Chrome https://drive.google.com/folderview?id=0BzudLt22BqGRbW9WTHMtOWMzNjQ  MOZILLA VR SHOWCASE http://mozvr.com/  WEBVR MAILING LIST web-vr-discuss@mozilla.org  CARDBOARD VR SHOWCASE http://vr.chromeexperiments.com/  WEB VR EXAMPLE CODE https://github.com/tparisi/WebVR 4/7/2015http://www.tonyparisi.com