Here’s a curated list of learning resources I usually recommend for self-studying the domain of Computer Graphics.
Learning graphics concepts isn’t the same as learning a rendering library; the latter is usually not very beneficial since a new library eventually replaces/takes over. Strive to learn the theory behind the domain, not the tools or their idiosyncrasies. Once you internalize the basic ideas, try doing some CG projects with increasing hardness.
I’ve mostly centred the resources around OpenGL and not other libraries since they’re not cross-platform. Starting with OpenGL, instead of Vulkan, is better to learn graphics programming. Another article also admonitions not to start with Vulkan or D3D 12 and instead go with OpenGL or D3D 11.
Tutorials / eBooks
- Learn OpenGL is a very clear and extensive OpenGL tutorial series on various topics ranging from basics to advanced levels. Its categorization and illustrations are very good too. Highly recommended for beginners.
- Learning Modern 3D Graphics Programming is probably the most extensive free, well-maintained online/offline (download-able for desktop, tablet and even kindle) book on modern OpenGL programming.
- OpenGL-Tutorial is also modern and good, but isn’t that extensive/detailed as compared to the former; although perspective projections are explained with diagrams extremely well here.
- OGLdev has close to 40 tutorials on modern OpenGL with nice explanations and rendered outputs.
- Lighthouse 3D has tutorials for most of CG ~ math, Open GL, GLSL, GLUT, writing your own light weight library for game development.
- An Intro to Modern OpenGL is short and sweet; it’s good to understand the rendering pipeline more clearly; once again because it’s very illustrative. For more in-depth understanding, read A trip through the Graphics Pipeline.
- OpenGL on WikiBooks has lot of hands-on tutorials which seem to be good too.
To be proficient in computer graphics or even to understand the basics, a decent amount of mathematical concepts needs to be grasped; it requires one to be comfortable in using trigonometry and linear algebra. For this I recommend
- Vector Math Tutorial to visualize, seal the understanding and get comforable using vectors and matrices
- Song Ho Ahn’s Articles on CG Math and OpenGL
- Matrix and Quaternion FAQ should clarify your doubts on vectors, matrices and quaternions.
- Linear Algebra Free Text by Professor Jim Hefferon covers linear algebra from ground up with lot of exercises.
- 3D Game Engine Programming has a bunch of articles covering spaces, vectors, matrices and quaternions
3D Math Books
I’d recommend at least one book as tutorials just aren’t enough. To get intuition and comfortably work in abstract 3D these would help:
- 3D Math Primer for Graphics and Game Development (free to read online)
- Essential Mathematics for Games and Interactive Applications: A Programmer’s Guide, 2nd/3rd Edition
- Mathematics for 3D Game Programming and Computer Graphics, 3rd Edition
Out of these math books, the most intuitive is the first with lot of funny anecdotes in between, the last is for hard core math fanatics (if you’re afraid of symbol vomit, steer clear of it), although it’s a good book for experienced CG programmers who need a reference. The one in between is really good in that it details out somethings which the other two (or many books for that matter) omit, and in the spectrum of intuitiveness and hard core math it’s in between.
- The Book of Shaders is for those who want to write cool-looking pixel effects using fragment shaders.
- Shader School is an introduction to GLSL shaders and graphics programming using WebGL; looks promising.
WebGL is attractive option since
- Setup costs are lower1
- Concepts learnt map 1:1 to other graphics programming libraries like D3D 11, OpenGL, etc.
- Very little legacy cruft since WebGL 2 is based on OpenGL ES 3.0
However, I’ve seen library and tooling availability w.r.t. CG more in C and C++.
- WebGL Academy is the most interactive tutorial out there teaching 3D computer graphics with step by step code walk-through and showing what changed on screen. It starts with the basics and goes on to cover advanced topics like PCF, distance mapping, variance shadow mapping, deferred shading, etc.
- WebGL2 Fundamentals is a very good introduction to 2D and 3D computer graphics using WebGL by Gregg Tavares. He also has
Most aforementioned resources are for real-time or online rendering where 30 to 60 frames are pumped on screen every second by a rasterizer. Another branch of CG is offline rendering: every frame takes minutes (or sometimes hours!) to render on a single computer by a ray tracer. For these, per-frame render time isn’t a problem; they value visual quality. Once rendered, the output can be viewed at leisure, without any user input business.
- Ray Tracing in One Weekend is a free book series by Peter Shirley; covers the ideas from ground-up
- In One Weekend
- The Next Week
- The Rest of Your Life
- ScratchAPixel.com is an excellent resource for in-depth Computer Graphics theory partial to raytracing
- ECS 175 Computer Graphics, UC Davis by Professor Kenneth Joy. The math explanations/proofs are intuitive and the professor is very interactive and dynamic. He has good change in pace when explaning difficult concepts differently. All his assignments are still available as PDFs, one can download and work them out.
- CSE 167 Computer Graphics, UC San Diego by Professor Ravi Ramamoorthi
- Computer Graphics, 2012 by Professor Wolfgang Huerst was also good for learning varied concepts; his assignments too are available online.
- Interactive 3D Graphics by Eric Haines teaches the basics of 3D computer graphics: meshes, transforms, cameras, materials, lighting, and animation using three.js and WebGL.
- Computer Graphics: Principles and Practice, 3rd Edition (2nd is also highly regarded) - this book is called The Bible of CG
- Computer Graphics, C Version, 2nd Edition (not 3rd or 4th which weren’t well received)
- Fundamentals of Computer Graphics, 4th Edition
- Computer Graphics using OpenGL, 2nd or 3rd Edition*
- Interactive Computer Graphics: A Top-Down Approach with WebGL, 7th Edition*
- 3D Computer Graphics: A Mathematical Introduction with OpenGL*
*: not OpenGL books; they just use OpenGL to teach rudimentary CG concepts
Of these, my personal favourites are the last two. More practical and hence engrossing for the beginner; the explanations aren’t very cryptic, unlike the other, more academic books in the list.
Physically Based Rendering seems to be the book for designing and coding a physically-based ray tracer from scratch.
Serious game development eventually leads to low-level optimisations. This list might help at that point:
- Modern X86 Assembly, Daniel Kusswurm
- Low-level C and C++ curriculum, Alex Darby
- Assembly and the Art of Debugging, Mohit
- Write Great Code: Volume 1, Randall Hyde
- 3D Game Engine Programming ~ §Fast 3D Calculus, Stefan Oliver
- Fundamentals of Software Engineering for Games ~ Chapter 3, Jason Gregory
- Mathematics for Game Developers ~ Part V ~ Optimization, Christopher Tremblay
- Vector Game Math Processors, James C. Leiterman
- Real-Time Collision Detection ~ Chapter 13 Optimization, Christer Ericson
- Instruction-level Parallelism, Wikipedia
- GPGPU Programming for Games and Science ~ Chapter 3, David Eberly
Reinventing the Wheel Often is natural when learning! I like this quote from Assembly Language Step by Step, 3rd Edition by Jeff Duntemann:
“When somebody asks you, “Why would you want to do that?” what it really means is this: “You’ve asked me how to do something that is either impossible using tools that I favor or completely outside my experience, but I don’t want to lose face by admitting it.” […] The answer to the Infamous Question is always the same, and if the weasels ever ask it of you, snap back as quickly as possible, “Because I want to know how it works.” That is a completely sufficient answer.”
You just need a text editor and a browser (which also has a JS debugger) ↩︎