A rt gallery pyconweb

dougsillars 305 views 61 slides May 26, 2019
Slide 1
Slide 1 of 61
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53
Slide 54
54
Slide 55
55
Slide 56
56
Slide 57
57
Slide 58
58
Slide 59
59
Slide 60
60
Slide 61
61

About This Presentation

PyconWeb May 26, 2019


Slide Content

Augmented Reality on the Web: Building an ARt Gallery Doug Sillars May 26, 2019 Pyconweb

Contact Me: @ DougSillars [email protected] www.dougsillars.com Doug Sillars Freelance Developer Relations Performance Audits: Web/Native Workshops: Performance/Images/Video/AR http:// bit.ly / HighPerformanceAndroidApps

Virtual Reality

Virtual Reality https:// www.flickr.com /photos/68158920@N08/17742136272

Virtual Reality

Virtual Reality

Augmented Reality

Augmented Reality

Augmented Reality Wearing fancy occulus with cameras Really $$$

Augmented Reality – Smartphone https://www.flickr.com/photos/bellemarematt/28124392062 https:// www.flickr.com /photos/ bagogames /28628142444

Augmented Reality – Smartphone https://www.flickr.com/photos/bellemarematt/28124392062 https:// www.flickr.com /photos/ bagogames /28628142444

AR/VR- in the Browser What we can do today What is coming tomorrow

AR/VR- in the browser What we can do today A-Frame https://aframe.io https://github.com/dougsillars/ARtGallery

AR/VR- in the browser What we can do today A-Frame https://aframe.io https://github.com/dougsillars/ARtGallery

VR with A-Frame https:// dougsillars.github.io / ARtGallery / aframeHW.html

VR with A-Frame https:// dougsillars.github.io / ARtGallery / aframeHW.html

VR with A-Frame https:// dougsillars.github.io / ARtGallery / aframeHW.html

VR with A-Frame https:// dougsillars.github.io / ARtGallery / aframeHW.html

VR with A-Frame https:// dougsillars.github.io / ARtGallery / aframeHW.html

Building a Gallery https:// dougsillars.github.io / ARtGallery / aframeroom.html

VR ART https:// dougsillars.github.io / ARtGallery / aframeroomart.html

VR ART https:// dougsillars.github.io / ARtGallery / justart.html Front Wall

VR ART https:// dougsillars.github.io / ARtGallery / justart.html Front Wall 2m up

VR ART https:// dougsillars.github.io / ARtGallery / justart.html

VR Art Animation https:// dougsillars.github.io / ARtGallery /justart1.html

VR More Art https:// dougsillars.github.io / ARtGallery /aframeroomart2.html

VR More Art https:// dougsillars.github.io / ARtGallery /aframeroomart2.html

VR More Art https:// dougsillars.github.io / ARtGallery /aframeroomart2.html

GLTF Models

GLTF Models

VR Models Are Large We won’t forget optimization!!

AR with A-Frame We’ll use AR.js to add AR functionality to the page 3D objects are placed with Markers:

AR Markers http:// bit.ly / ARHiro

AR Markers Create Your Own Markers https:// jeromeetienne.github.io / AR.js / three.js /examples/marker-training/examples/ generator.html Creates an image to print and tape to the wall. Creates a . patt pattern file for the browser

AR Markers Create Your Own Markers https:// jeromeetienne.github.io / AR.js / three.js /examples/marker-training/examples/ generator.html Creates an image to print and tape to the wall. Creates a . patt pattern file for the browser

AR Markers Create Your Own Markers

AR Markers to Create A Scene https:// dougsillars.github.io / ARtGallery / ARt.html

Optimisations for AR/VR Images are integral to the view – we want them to load quickly

Optimisations for AR/VR Reduce File Size

Optimisations for AR/VR Reduce File Size Resize images (to power of 2) https:// res.cloudinary.com / dougsillars /image/upload/h_1024/v1552460601/ VanGogh-starry_night_qoohur.jpg

Optimisations for AR/VR

Optimisations for AR/VR

Optimisations for AR/VR Optimize Quality https:// res.cloudinary.com / dougsillars /image/upload/h_1024,q_auto,/v1552460601/ VanGogh-starry_night_qoohur.jpg

Optimisations for AR/VR Optimize Format https:// res.cloudinary.com / dougsillars /image/upload/h_1024,q_auto,f_auto/v1552460601/ VanGogh-starry_night_qoohur.jpg

Optimisations for AR/VR Optimize Format https:// res.cloudinary.com / dougsillars /image/upload/h_1024,q_auto,f_auto/v1552460601/ VanGogh-starry_night_qoohur.jpg

Optimisations for AR/VR Optimize Format https:// res.cloudinary.com / dougsillars /image/upload/h_1024,q_auto,f_auto/v1552460601/ VanGogh-starry_night_qoohur.jpg 1.8 MB -> 323 KB

Optimisations for AR/VR Optimize Format https:// res.cloudinary.com / dougsillars /image/upload/h_512,q_auto,f_auto/v1552460601/ VanGogh-starry_night_qoohur.jpg 1.8 MB -> 93 KB

Optimisations for GLTF Draco Compression optimizes .bin files

AR with WEBXR

AR with WEBXR All WebXR Demos require: Android 8.0+ Chrome Canary v70-72 (late 2018) Flags enabled: WebXR Device API WebXR Hit Test ARCore installed Protip : If using WebXR a lot, prevent Canary from auto-updating in Play Store

WEBXR Hit Test https:// codelabs.developers.google.com / codelabs / ar -with- webxr /#4

WEBXR Hit Test https:// dougsillars.github.io / ar -with- webxr / WebXrARt /

Optimisations for WebXR 1024X1024 1024X1025

https:// res.cloudinary.com / dougsillars /image/upload/x_230,y_128,w_512,h_512,c_crop/w_256/v1552682248/ stabilization_yegbkb.gif 850 KB -> 174 KB Optimisations for aGIF

Optimisations for PNG https:// res.cloudinary.com / dougsillars /image/upload/q_auto,w_256/c_crop,w_256,h_256/v1552682248/ Anchor_rzjbco.png Optimise quality, shrink to 256 KB wide Crop to 256x256 36 KB -> 2.2 KB

Loading WEbXR Art Gallery (Optimized)

Conclusions AR on the web is available today with A-Frame AR with Hit Points is coming AR does not have to be processor intensive, nor utilize huge amounts of data

Let’s build! Art Files you can use: https://res.cloudinary.com/dougsillars/image/upload/w_1000/v1551634938/scream_qbwybi.jpg https://res.cloudinary.com/dougsillars/image/upload/w_1000/v1551634946/monalisa_nlcskz.jpg https://res.cloudinary.com/dougsillars/image/upload/w_1000/v1551634942/Mural_del_Gernika_s9ldah.jpg https://res.cloudinary.com/dougsillars/image/upload/v1552460601/VanGogh-starry_night_qoohur.jpg https://res.cloudinary.com/dougsillars/image/upload/v1553694737/CAPPELLA_SISTINA_Ceiling_oosz7w.jpg https://res.cloudinary.com/dougsillars/image/upload/v1553694758/last_supper_hykuux.jpg https://res.cloudinary.com/dougsillars/image/upload/v1553694762/The_Nightwatch_kkzvus.jpg Try: Sketchfab.com for 3D Models

Links Code: https://github.com/dougsillars/ARtGallery https://github.com/dougsillars/ar-with-webxr WebXR spec: https://www.w3.org/TR/2019/WD-webxr-20190205/ Cloudinary : https://cloudinary.com

Love Building with Video and Images? Media Developer Expert [email protected] Become a

Setup https://github.com/dougsillars/ARtGallery git clone https://github.com/<username>/ARtGallery Seeing your Code GitHub Account No GitHub Account Details: https://gist.github.com/jgravois/5e73b56fa7756fd00b89 Seeing your Code Local Webserver python - m SimpleHTTPServer 1337 In Browser : Localhost:1337
Tags