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
200
1
Share
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
43
Intro to 3D Graphics - WIG Boston - 2017
douglassturner
0
66
Metal for Mortals
douglassturner
0
110
The West 16th Street Peace Mural
douglassturner
4
70
How To Think About Software
douglassturner
0
160
Camp Interactive Talk - 9 Feb 2014
douglassturner
0
43
Bronx Community Charter School Visit - 4 jun 2014
douglassturner
0
130
iOS OpenGL
douglassturner
1
97
Implementing Data Visualization Apps on iOS Devices
douglassturner
2
130
Other Decks in Technology
See All in Technology
20260515 ID管理は会社を守る大切な砦!〜🔰情シス向け〜
oidfj
0
600
Oracle AI Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
4
2.6k
CARTA HOLDINGS エンジニア向け 採用ピッチ資料 / CARTA-GUIDE-for-Engineers
carta_engineering
0
47k
エンタープライズの厳格な制約を開発者に意識させない:クラウドネイティブ開発基盤設計/cloudnative-kaigi-golden-path
mhrtech
0
440
JTCでRedmine利用者2700人を実現した手法 第二部
nobuonakamura
0
120
ECSのTerraformモジュールにコントリビュートした話
harukasakihara
0
220
インプロセスQAのための要因から捉えるプロジェクトリスクマネジメントnano #1 開発リソース効率状態への対処 #jasstnano
barus_qa
0
150
"スキルファースト"で作る、AIの自走環境
subroh0508
0
570
AI飲み会幹事エージェントを作っただけなのに
ykimi
0
230
AWS WAFの運用を地道に改善し、自社で運用可能にするプラクティス
andpad
1
290
既存プロダクトQAから新規プロダクトQAへ
ryotakahashi
0
150
"うちにはまだ早い"は本当? ─ 小さく始めるPlatform Engineering入門
harukasakihara
6
620
Featured
See All Featured
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
460
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
65
54k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
510
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
220
Measuring & Analyzing Core Web Vitals
bluesmoon
9
820
How Software Deployment tools have changed in the past 20 years
geshan
0
33k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
How to make the Groovebox
asonas
2
2.2k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
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