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
1
190
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
Tweet
Share
More Decks by Douglass Turner
See All by Douglass Turner
How To Think About Augmented Reality
douglassturner
0
35
Intro to 3D Graphics - WIG Boston - 2017
douglassturner
0
58
Metal for Mortals
douglassturner
0
90
The West 16th Street Peace Mural
douglassturner
4
54
How To Think About Software
douglassturner
0
150
Camp Interactive Talk - 9 Feb 2014
douglassturner
0
35
Bronx Community Charter School Visit - 4 jun 2014
douglassturner
0
120
iOS OpenGL
douglassturner
1
86
Implementing Data Visualization Apps on iOS Devices
douglassturner
2
120
Other Decks in Technology
See All in Technology
組織貢献をするフリーランスエンジニアという生き方
n_takehata
1
1k
モノレポ開発のエラー、誰が見る?Datadog で実現する適切なトリアージとエスカレーション
biwashi
6
770
技術的負債解消の取り組みと専門チームのお話 #技術的負債_Findy
bengo4com
1
1.2k
生成AIの利活用を加速させるための取り組み「prAIrie-dog」/ Shibuya_AI_1
visional_engineering_and_design
1
140
10分で紹介するAmazon Bedrock利用時のセキュリティ対策 / 10-minutes introduction to security measures when using Amazon Bedrock
hideakiaoyagi
0
170
AWSでRAGを実現する上で感じた3つの大事なこと
ymae
3
1k
依存関係があるコンポーネントは Barrel ファイルでまとめよう
azukiazusa1
3
530
Classmethod AI Talks(CATs) #15 司会進行スライド(2025.02.06) / classmethod-ai-talks-aka-cats_moderator-slides_vol15_2025-02-06
shinyaa31
0
170
バックエンドエンジニアのためのフロントエンド入門 #devsumiC
panda_program
16
6.5k
サーバーレスアーキテクチャと生成AIの融合 / Serverless Meets Generative AI
_kensh
12
3k
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
6
57k
The 5 Obstacles to High-Performing Teams
mdalmijn
0
270
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Fireside Chat
paigeccino
34
3.2k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
The Language of Interfaces
destraynor
156
24k
Producing Creativity
orderedlist
PRO
343
39k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
29
4.6k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Side Projects
sachag
452
42k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
540
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
99
18k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.5k
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