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
Introduction to 3D Graphics - BostonVR VR/AR Ha...
Search
Douglass Turner
March 11, 2017
Technology
210
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Introduction to 3D Graphics - BostonVR VR/AR Hack Day
Introduction to 3D Graphics
Presented at BostonVR VR/AR Hack Day
March 11 2017
Douglass Turner
March 11, 2017
More Decks by Douglass Turner
See All by Douglass Turner
How To Think About Augmented Reality
douglassturner
0
50
Intro to 3D Graphics - WIG Boston - 2017
douglassturner
0
70
Metal for Mortals
douglassturner
0
110
The West 16th Street Peace Mural
douglassturner
4
75
How To Think About Software
douglassturner
0
160
Camp Interactive Talk - 9 Feb 2014
douglassturner
0
45
Bronx Community Charter School Visit - 4 jun 2014
douglassturner
0
130
iOS OpenGL
douglassturner
1
100
Implementing Data Visualization Apps on iOS Devices
douglassturner
2
140
Other Decks in Technology
See All in Technology
勉強会企画をアプリで構造化してみた 〜そこで見えた、AIとの付き合い方〜 / I've structured a study group plan using an app.
pauli
0
340
脱金融のフューチャー・デザイン / Future Design Beyond Finance
ks91
PRO
0
140
オブザーバビリティ、本当に活用できてる? 〜API連携×生成AIで成熟度を自動評価〜
dmmsre
1
2.8k
プロダクトだけじゃない、社内プロセスにおける自動化・省力化ノススメ
kakehashi
PRO
1
3.5k
SRE本の知られざる名シーン / The Hidden Gems of Google SRE Book
nari_ex
1
340
クラウド上のデータ復旧で見落としがちな制約: 医療系 SaaS の BCP 設計から得た教訓
kakehashi
PRO
0
3.2k
「ちゃんとやっている」は独りよがりだった ― 不安に寄り添うインシデント対応へ / Towards incident response that addresses anxieties
chmikata
1
4.7k
KiCAD講習会②
tutcreators
0
110
AI駆動開発におけるQAエンジニアの役割事例 〜AI駆動開発の現場から〜
kobayashiyorimitsu
0
480
ZOZOTOWNの進化と信頼性を両立する負荷試験
zozotech
PRO
2
160
貴方はどのエンジニアリングを磨くのか
hatyibei
0
110
AWS Summit の片隅で、体育座りしながらコミュニティがにぎわう理由を考えた
k_adachi_01
2
370
Featured
See All Featured
How to Ace a Technical Interview
jacobian
281
24k
Leo the Paperboy
mayatellez
8
1.9k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
460
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.6k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
Tell your own story through comics
letsgokoyo
1
990
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.7k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
300
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
Transcript
INTRO TO 3D GRAPHICS Douglass Turner
[email protected]
@dugla 781 775
3708 DOUGLASS TURNER ELASTICIMAGE SOFTWARE email:
[email protected]
twitter: @dugla
Aim the camera
Elastic Image Software LLC Copyright Steve Jubinville Select and pose
the model
Elastic Image Software LLC Design Appearance. Light Scene. Copyright ©
2006 Holger Schömann 4
Render
Let’s unpack these activities …
Camera. Lights. Models. They all rely on various flavors of
transformation matrices for position, orientation, and scale.
Transform Transformation Matrix Coordinate Frame Reference Frame Eye Space Model
Space World Space Different words for the same thing
They are the fundamental state of your objects I think
of them as their DNA
Every object in Unity exists in a hierarchy. Think tree-branch.
Think parent-child, or sibling relationship.
Matrices are the basis of this hierarchical relationship.
Matrix Demo: Parent Child - Unity
Unity uses quaternions for rotation. They are easier to specify
and control then rotation via matrices.
Quaternion demo: HelloLight - iPhone For an implementation of quaternions
in Swift for iOS see the EIArcball class in my HelloMetal repository on Github: https://github.com/turner/HelloMetal
Models
Model demo: Bust - Blender model download: http://bit.ly/2mbLDZj
Hang on! Where did those surfaces come from …? Rendering.
3D shapes are defined by vertices. Each is a point
in 3-space.
We attach a set of attributes to each vertex. •
position: x, y, z • surface normal: nx, ny, nz, • texture coordinate: u, v
u,v define a coordinate system on the surface of an
object for attaching a texture u v
QUAD
Elastic Image Software LLC 22 SPHERE
Elastic Image Software LLC 23 TORUS
Something more interesting
UV Demo: Bust - Blender
Texture Mapping Demo: Low Poly Bust - Unity
surface normals
Normal Vector Demo: HelloLight - iPhone
Illumination Models
PrettyPixels = kd * (N.L) + ks * (R.V)^n An
illumination model describes the interaction between a object’s surface and light sources
PrettyPixels = kd * (N.L) + ks * (R.V)^n •
V - Eye vector • L - Light source vector • N - Normal vector • kd - diffuse scale factor Diffuse Illumination
PrettyPixels = kd * (N.L) + ks * (R.V)^n •
V - Eye vector • L - Light source vector • N - Normal vector • R - Refection vector • n - specular exponent • ks - specular scale factor Specular Illumination
In the real world surfaces are neither pure diffuse nor
pure specular.
Diffuse & Specular Show and Tell
Image Based Lighting (IBL) combined with High Dynamic Range (HDR)
Images allows us to eliminate “lights” entirely. Global Illumination (GI) takes things to another level.
IBL - HDR - GI Demo 1: Lego Star Wars
- Unity
IBL - HDR - GI Demo 2: Low Poly Bust
- Unity
All of what we have talked about up to this
point is preamble to where the real action happens, the … GPU
Elastic Image Software LLC Think of the GPU as a
dragster
Elastic Image Software LLC It does one thing insanely well
The GPU is a SIMD computing beast
SnapChat and Instagram are GPU apps
The GPU takes the triangles and textures and rasterizes then
for display. We control the GPU with small programs called shaders written in GLSL or Metal (iOS).
A shader defines the look of an object Shaders come
in pairs • vertex shader • fragment shader
vertexShader fragmentShader vertexShader vertexShader
void main() { vec4 raw = texture2D(hero, v_st); vec3 inverted
= 1.0 - raw.rgb; gl_FragColor = vec4(inverted, 1.0); } fragmentShader code
GPU - GLSL Demo 1: FotoCollection - iPad
Doug’s Brain
The shader concept was introduced by Pixar in the form
of RenderMan. It is a powerful idea that has unleashed all the visual f/x we take for granted in games and effects-heavy movies.
I wrote a 3D rendering system with an interpreted object-based
language where shaders are first class citizens
Doug’s Shading Language The language implements objects, variables and expressions
Doug’s Shading Language + + = shiny = ambient +
diffuse + specular
So how far can you take this shader idea?
DSL Demo: Swirl - Photoshop
DSL Demo: High Noon - Video
DSL Demo: Lance Williams Bust Gallery
None
360 Video Demo: Presence and Natural Phenomena
Thank You! Douglass Turner ElasticImage Software twitter: @dugla email:
[email protected]
Douglass Turner
[email protected]
@dugla 781 775 3708