SlideShare une entreprise Scribd logo
1  sur  21
Graphics Programming
Workshop
Stephanie Hurlburt
Before I start talking…
 Download Cinder
 https://libcinder.org/download
 Windows users: download Visual Studio
 https://www.visualstudio.com/products/visual-studio-community-vs
 Mac users: download XCode
 https://developer.apple.com/xcode/download/
What is graphics programming?
 SIGGRAPH 2015 Technical Papers
https://www.youtube.com/watch?v=XrYkEhs2FdA
What is graphics programming?
 Cinder Creative Coding https://www.youtube.com/watch?v=uq1HetZMdfc
What is graphics programming?
 Oculus Medium https://www.youtube.com/watch?v=IreEK-abHio
Get into a good headspace
 These concepts will feel confusing and new
 Some of them still feel confusing to me, and I get paid to do this!
 Get used to not knowing a lot, but taking advantage of small pieces you do
know to build something great now
 Be patient, relax, be nice to yourself, have fun!
Get into a good headspace
 This workshop was meant to give you a taste of what it’s like to do low-level
graphics
 I purposefully will not dive too deep into any subjects. We’re aiming to
understand high level concepts, and enough to build something beautiful fast
while still coding in C++/OpenGL
 It’s how I learned graphics– just diving into a big low-level codebase, and
figuring things out as I go
What is graphics programming?
 Graphics programmers ask:
 How are graphics processed on my computer?
 How do GPUs work?
 What else can we use the GPU for?
 What isn’t possible now in graphics, and how can we make it possible?
What’s a Graphics Processor Unit (GPU)?
 It’s hardware made with drawing images in mind!
 The CPU sends it data needed for drawing
 Much, much more parallelized than the CPU
 This does come with downsides!
 It’s good for things other than graphics, too!
What is OpenGL?
 It allows you to tell your GPU what to do, in C
 Clear the screen, set up the camera, start drawing, go!
 OpenGL is just a standard. It tells the world what should be possible on GPUs.
 It’s up to the GPU manufacturers to implement the standard.
 You may have heard of GLSL
 Part of the OpenGL ecosystem
 Gives us control over shading, a particular part of graphics processing
What’s my job description?
 I’m a Graphics Engineer
 I build a graphics engine with C++/OpenGL
 Part coding and making things work, part research and constantly learning
Why do I love graphics programming?
 Graphics programming is a vastly unexplored new medium for art.
 The more you know about graphics programming, the more possibilities you
can unleash
 In digital art
 In computing!
 It’s like solving math puzzles and getting rewarded by doing something never
before possible in art.
 It’s like one big, really complicated, mind-blowingly powerful paintbrush!
 I can collaborate with a lot of fields– GPUs are used for lots of things!
 Mathematics can be an important part of innovating in graphics, and I love
math. I can get paid to do math.
Let’s do a sample together, to get
started.
About Cinder
 We’re not using direct C++/OpenGL, we’re using C++/Cinder.
 Cinder is built on top of OpenGL– all Cinder calls turn into OpenGL calls.
 It’s a great way to learn OpenGL while building things quickly
Particle Sphere
 Go to the directory Cinder is
installed in, then Samples ->
_openGL -> ParticleSphereGPU.
Open your project in your desired
IDE.
 Build and run the project.
 You should see a beautiful rainbow
particle system.
 Try clicking it and moving your
mouse.
 Let’s talk about how to modify
this.
Particle Sphere:
Control the movement of your particles
 Open up GPUSphereParticles -> Assets -> particleUpdate.vs
 This little piece of code controls all of those seemingly complex
movements in the particle system, and is processed completely on
the GPU.
 This code runs on every particle in your particle system, calculating
its position (That’s a lot of particles!)
 This particle system is a perfect candidate for GPU processing– none
of the particles need to know about each others’ existence, so each
particle’s simulation can be safely processed in parallel.
 Try to understand what the math is doing by changing the values and
seeing what happens.
 Save the file, then close and rerun your app to see how it’s changed
 Try changing dt2 to 0.0f, for example! Oh no!
Particle Sphere:
Create the initial particle layout
 Open ParticleSphereGPUApp.cpp
 We first create an array of Particles
 Each particle contains the properties we modified our vertex
shader
 They’re initially created on the CPU (in the Particle struct at the
top of this file), and that’s where their initial positions are set.
 Then set the initial positions of all our particles.
 That for loop’s math makes our particles start as a sphere! Try
modifying values to see how it works.
 Be sure to rebuild and rerun your project each time you make a
change.
Particle Sphere: Future Work
 That’s really it when it comes to modifying this project’s core functionality.
 Notice the comments around fragment shaders: we’re only using a special
vertex shader– the fragment shader only sets each particle to Cinder’s default
rainbow palette.
 Try simply modifying the values discussed in the previous slides. You can make
a completely different visual just by doing that.
 Try adding a custom fragment shader.
 Try adding more physics properties like gravity to the particles, and think
about what you’d need to do to enable collision.
 Try out the ParticleSphereCPU samples, and the other particle samples.
Now try some other samples!
 I’m here to help, and we can go through a few more together too.
 I want you to feel comfortable playing around with this unknown code so you
can see that you can make interesting visualizations, and then learn more and
figure out what you need to be learning to do more!
 Remember that there are lots of great resources online too that can help. It’s
common to frequently look up references to figure out how things are
working.
 Have fun!!!
Great graphics programming resources
 Graphics Codex
 http://graphicscodex.com/
 Real Time Rendering
 http://www.realtimerendering.com/
 Learn OpenGL
 http://learnopengl.com/
 Making WebGL Dance
 http://acko.net/files/fullfrontal/full
frontal/webglmath/online.html
 3D Graphics Tutorial
 http://petercollingridge.appspot.co
m/3D-tutorial
 Modern OpenGL Tutorials
 http://ogldev.atspace.co.uk
 Interactive 3D Graphics
 https://www.udacity.com/course/int
eractive-3d-graphics--cs291
 A Trip Through the Graphics Pipeline
 https://fgiesen.wordpress.com/2011
/07/09/a-trip-through-the-graphics-
pipeline-2011-index/
 The Book of Shaders
 http://patriciogonzalezvivo.com/201
5/thebookofshaders/
Great graphics programming resources
 GLSL Sandbox
 http://glslsandbox.com/
 Shadertoy
 https://www.shadertoy.com/
 Getting Started with Cinder
 https://libcinder.org/docs/guides/op
engl/index.html
 Processing Tutorials
 https://processing.org/tutorials/
 OpenFrameworks Tutorials
 http://openframeworks.cc/tutorials/
 SIGGRAPH Papers
 http://kesen.realtimerendering.com/
 Immersive Linear Algebra
 http://immersivemath.com/ila/index
.html
 Render Hell 2.0
 http://simonschreibt.de/gat/renderh
ell/
 OpenGL SuperBible
 http://www.openglsuperbible.com/

Contenu connexe

Dernier

The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...kalichargn70th171
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfryanfarris8
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024Mind IT Systems
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 

Dernier (20)

The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 

En vedette

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 

En vedette (20)

Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 

Graphics Programming Workshop

  • 2. Before I start talking…  Download Cinder  https://libcinder.org/download  Windows users: download Visual Studio  https://www.visualstudio.com/products/visual-studio-community-vs  Mac users: download XCode  https://developer.apple.com/xcode/download/
  • 3. What is graphics programming?  SIGGRAPH 2015 Technical Papers https://www.youtube.com/watch?v=XrYkEhs2FdA
  • 4. What is graphics programming?  Cinder Creative Coding https://www.youtube.com/watch?v=uq1HetZMdfc
  • 5. What is graphics programming?  Oculus Medium https://www.youtube.com/watch?v=IreEK-abHio
  • 6. Get into a good headspace  These concepts will feel confusing and new  Some of them still feel confusing to me, and I get paid to do this!  Get used to not knowing a lot, but taking advantage of small pieces you do know to build something great now  Be patient, relax, be nice to yourself, have fun!
  • 7. Get into a good headspace  This workshop was meant to give you a taste of what it’s like to do low-level graphics  I purposefully will not dive too deep into any subjects. We’re aiming to understand high level concepts, and enough to build something beautiful fast while still coding in C++/OpenGL  It’s how I learned graphics– just diving into a big low-level codebase, and figuring things out as I go
  • 8. What is graphics programming?  Graphics programmers ask:  How are graphics processed on my computer?  How do GPUs work?  What else can we use the GPU for?  What isn’t possible now in graphics, and how can we make it possible?
  • 9. What’s a Graphics Processor Unit (GPU)?  It’s hardware made with drawing images in mind!  The CPU sends it data needed for drawing  Much, much more parallelized than the CPU  This does come with downsides!  It’s good for things other than graphics, too!
  • 10. What is OpenGL?  It allows you to tell your GPU what to do, in C  Clear the screen, set up the camera, start drawing, go!  OpenGL is just a standard. It tells the world what should be possible on GPUs.  It’s up to the GPU manufacturers to implement the standard.  You may have heard of GLSL  Part of the OpenGL ecosystem  Gives us control over shading, a particular part of graphics processing
  • 11. What’s my job description?  I’m a Graphics Engineer  I build a graphics engine with C++/OpenGL  Part coding and making things work, part research and constantly learning
  • 12. Why do I love graphics programming?  Graphics programming is a vastly unexplored new medium for art.  The more you know about graphics programming, the more possibilities you can unleash  In digital art  In computing!  It’s like solving math puzzles and getting rewarded by doing something never before possible in art.  It’s like one big, really complicated, mind-blowingly powerful paintbrush!  I can collaborate with a lot of fields– GPUs are used for lots of things!  Mathematics can be an important part of innovating in graphics, and I love math. I can get paid to do math.
  • 13. Let’s do a sample together, to get started.
  • 14. About Cinder  We’re not using direct C++/OpenGL, we’re using C++/Cinder.  Cinder is built on top of OpenGL– all Cinder calls turn into OpenGL calls.  It’s a great way to learn OpenGL while building things quickly
  • 15. Particle Sphere  Go to the directory Cinder is installed in, then Samples -> _openGL -> ParticleSphereGPU. Open your project in your desired IDE.  Build and run the project.  You should see a beautiful rainbow particle system.  Try clicking it and moving your mouse.  Let’s talk about how to modify this.
  • 16. Particle Sphere: Control the movement of your particles  Open up GPUSphereParticles -> Assets -> particleUpdate.vs  This little piece of code controls all of those seemingly complex movements in the particle system, and is processed completely on the GPU.  This code runs on every particle in your particle system, calculating its position (That’s a lot of particles!)  This particle system is a perfect candidate for GPU processing– none of the particles need to know about each others’ existence, so each particle’s simulation can be safely processed in parallel.  Try to understand what the math is doing by changing the values and seeing what happens.  Save the file, then close and rerun your app to see how it’s changed  Try changing dt2 to 0.0f, for example! Oh no!
  • 17. Particle Sphere: Create the initial particle layout  Open ParticleSphereGPUApp.cpp  We first create an array of Particles  Each particle contains the properties we modified our vertex shader  They’re initially created on the CPU (in the Particle struct at the top of this file), and that’s where their initial positions are set.  Then set the initial positions of all our particles.  That for loop’s math makes our particles start as a sphere! Try modifying values to see how it works.  Be sure to rebuild and rerun your project each time you make a change.
  • 18. Particle Sphere: Future Work  That’s really it when it comes to modifying this project’s core functionality.  Notice the comments around fragment shaders: we’re only using a special vertex shader– the fragment shader only sets each particle to Cinder’s default rainbow palette.  Try simply modifying the values discussed in the previous slides. You can make a completely different visual just by doing that.  Try adding a custom fragment shader.  Try adding more physics properties like gravity to the particles, and think about what you’d need to do to enable collision.  Try out the ParticleSphereCPU samples, and the other particle samples.
  • 19. Now try some other samples!  I’m here to help, and we can go through a few more together too.  I want you to feel comfortable playing around with this unknown code so you can see that you can make interesting visualizations, and then learn more and figure out what you need to be learning to do more!  Remember that there are lots of great resources online too that can help. It’s common to frequently look up references to figure out how things are working.  Have fun!!!
  • 20. Great graphics programming resources  Graphics Codex  http://graphicscodex.com/  Real Time Rendering  http://www.realtimerendering.com/  Learn OpenGL  http://learnopengl.com/  Making WebGL Dance  http://acko.net/files/fullfrontal/full frontal/webglmath/online.html  3D Graphics Tutorial  http://petercollingridge.appspot.co m/3D-tutorial  Modern OpenGL Tutorials  http://ogldev.atspace.co.uk  Interactive 3D Graphics  https://www.udacity.com/course/int eractive-3d-graphics--cs291  A Trip Through the Graphics Pipeline  https://fgiesen.wordpress.com/2011 /07/09/a-trip-through-the-graphics- pipeline-2011-index/  The Book of Shaders  http://patriciogonzalezvivo.com/201 5/thebookofshaders/
  • 21. Great graphics programming resources  GLSL Sandbox  http://glslsandbox.com/  Shadertoy  https://www.shadertoy.com/  Getting Started with Cinder  https://libcinder.org/docs/guides/op engl/index.html  Processing Tutorials  https://processing.org/tutorials/  OpenFrameworks Tutorials  http://openframeworks.cc/tutorials/  SIGGRAPH Papers  http://kesen.realtimerendering.com/  Immersive Linear Algebra  http://immersivemath.com/ila/index .html  Render Hell 2.0  http://simonschreibt.de/gat/renderh ell/  OpenGL SuperBible  http://www.openglsuperbible.com/