Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
[Martin Splitt] Practical WebGL with Three.js
Search
Google Developers Group Lviv
September 10, 2016
Technology
930
1
Share
[Martin Splitt] Practical WebGL with Three.js
Presentation from GDG DevFest Ukraine 2016.
Learn more at:
https://devfest.gdg.org.ua
Google Developers Group Lviv
September 10, 2016
More Decks by Google Developers Group Lviv
See All by Google Developers Group Lviv
[Elad Bezalel] Angular Material CDK
gdglviv
1
170
[Zac Sweers] Breaking the Android ClassLoader
gdglviv
1
250
[Daniel Galpin] Adventures in Navigation
gdglviv
2
580
[Rebecca Franks] Practical Image Processing in Android
gdglviv
1
470
[Mateusz Herych] Architecture for App Bundles
gdglviv
2
140
[Andrea Falcone] Iterative Mobile Development
gdglviv
2
130
[Yonatan Levin] Keynote: The world of change and your significance in it
gdglviv
1
150
[Denys Tkalich] Using BigQuery as a data warehouse in B2B startup
gdglviv
1
130
[Mete Atamel] Google Assistant powered by Containers, Machine Learning and .NET on Google Cloud
gdglviv
1
170
Other Decks in Technology
See All in Technology
OCI技術資料 : ロード・バランサ 概要 - FLB・NLB共通
ocise
4
27k
Oracle Cloud Infrastructure(OCI):Onboarding Session(はじめてのOCI/Oracle Supportご利⽤ガイド)
oracle4engineer
PRO
2
17k
タスク管理も1on1も、もう「管理」じゃない - KiroとBedrock AgentCoreで変わった“判断の仕事”
yusukeshimizu
0
160
開発チームとQAエンジニアの新しい協業モデル -年末調整開発チームで実践する【QAリード施策】-
kaomi_wombat
0
290
パワポ作るマンをMCP Apps化してみた
iwamot
PRO
0
280
Data Enabling Team立ち上げました
sansantech
PRO
0
170
マルチモーダル非構造データとの闘い
shibuiwilliam
1
130
【AWS】CloudTrail LakeとCloudWatch Logs Insightsの使い分け方針
tsurunosd
0
130
会社紹介資料 / Sansan Company Profile
sansan33
PRO
16
410k
制約を設計する - 非決定性との境界線 / Designing constraints
soudai
PRO
4
610
スケーリングを封じられたEC2を救いたい
senseofunity129
0
130
「できない」のアウトプット 同人誌『精神を壊してからの』シリーズ出版を 通して得られたこと
comi190327
3
520
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Are puppies a ranking factor?
jonoalderson
1
3.2k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
170
Producing Creativity
orderedlist
PRO
348
40k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
Six Lessons from altMBA
skipperchong
29
4.2k
A Modern Web Designer's Workflow
chriscoyier
698
190k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8k
Leo the Paperboy
mayatellez
6
1.6k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Transcript
@g33konaut with Three.js Practical WebGL
@g33konaut Hi, I’m Martin, Senior Dev @ Archilogic @g33konaut on
Twitter
@g33konaut This is what we do
@g33konaut The next 30ish minutes... Why should you be excited?
How do you create 3D experiences? What is next?
@g33konaut Why?
@g33konaut Use cases • Maps / Navigation • Education /
Research • Healthcare / Therapy • Entertainment / Journalism • Marketing
@g33konaut So, what’s it look like?
@g33konaut It’s well-ish-supported
@g33konaut Is WebGL fast?
@g33konaut
@g33konaut How?
@g33konaut
@g33konaut So how do we get 3D graphics? 1. We
need points (“vertices”) 2. We need to connect them (“faces”) 3. We need to define a. What colour? b. What texture? c. Shiny / Transparent / …? “Material”
@g33konaut The WebGL pipeline
@g33konaut Three.js • threejs.org • Lots of plugins, 3D format
importers, ... • Basic principle: ◦ “Movie shooting”: Camera, Scene, Meshes • Let’s go: avgp.github.io/h2g2three
@g33konaut The WebGL pipeline Three.js covers this
@g33konaut Setup var renderer = new THREE.WebGLRenderer(), scene = new
THREE.Scene(), camera = new THREE.PerspectiveCamera( ...)
@g33konaut Getting something on stage var box = new THREE.Mesh(
new THREE.BoxGeometry(100, 100, 100), new THREE.MeshBasicMaterial() ) scene.add(box)
@g33konaut Rendering it out (function render() { requestAnimationFrame( render )
renderer.render( scene, camera ) })()
@g33konaut Working with 3D assets • Use the 3D editor
of your choice (e.g. Blender) • Export as a common 3D format (e.g. OBJ or glTF)
@g33konaut Tips & Tricks
@g33konaut The basic ones: Reducing vertices
@g33konaut The basic ones: Level of detail
@g33konaut The basic ones: Extensions
@g33konaut Using textures to cheat • Normal maps • Light
maps • Bump maps • Environment maps
@g33konaut Normal maps
@g33konaut Light maps
@g33konaut Light maps
@g33konaut Bump maps
@g33konaut Environment maps
@g33konaut Post processing
@g33konaut Tooling • Shader Editor: Chrome & Firefox (built in)
• WebGL Insight • WebGL Inspector
@g33konaut What’s next? • Explore WebVR • Check out what’s
coming in WebGL 2 • Get started!
@g33konaut Wrap up • 3D is great for spatial visualisation
• 3D can be used as an enhancement • Three.js gets you up & running quickly • Trick the eyes to get nicer visual quality
@g33konaut GO EXPLORE! • The harder way: learningwebgl.com • The
easier way: three.js.org/docs
@g33konaut Thank you! Questions? Slides: bit.ly/dfua-webgl Twitter: @g33konaut Web: spaces.archilogic.com
Feedback wanted ;-)