Ask HN: What are the best books on modern computer graphics?

BigJono | 294 points

I would not advise anyone to try to get into computer graphics directly with the Vulkan or DX12 APIs. Start with DX11, modern OpenGL and/or WebGL, and work through your computer graphics theory (and a lot of practice) using those. Geometry, illumination, shaders, tools and GPU computation will take a lot of time to master. When you decide you want to go into low level APIs, if you are comfortable with Apple systems, Metal will likely be easier than Vulkan/DX12.

A lot of the theory from classic books is still valid, so even a copy of Computer Graphics: Principles and Practice will look fine on your desk. "Real Time Rendering" by Moller/Haines and "Physically Based Rendering" by Pharr are excellent. "Game Engine Architecture" by Gregory and "Mathematics for 3D Game Programming and Computer Graphics" by Lengyel will probably prove very useful and relevant to you as well.

Online resources, the free https://learnopengl.com/ and the $10 http://graphicscodex.com/ are both fantastic. Make sure to read https://fgiesen.wordpress.com/2011/07/09/a-trip-through-the-..., and also study the techniques used for the craziest entries in https://www.shadertoy.com/

And then, lots and lots of papers and presentations from the past 5 or 10 years of Game Developers Cconference and Siggraph.

Jare | 7 years ago

If you're interested in something that's not strictly real-time a good book is physically based rendering http://www.pbrt.org/ . It uses a literate-programming style which is neat. It's about path-tracing which is similar to ray-tracing but can give an unbiased approximation to the rendering equation (which is a reasonably accurate model of "everyday" optics.) Here is a JS+WebGL (mostly WebGL ;) ) interactive path-tracer: http://madebyevan.com/webgl-path-tracing/

---

Vulkan is pretty boring to be honest. I'm very doubtful that you want to bother with it if you're just starting. Using these APIs is like filling out tax forms, but Vulkan is a lot more effort than OpenGL (but, OpenGL is weird...) Learning shaders in OpenGL will be pretty transferable knowledge. Vulkan uses a lower-level assembly-like language, SPIR-V that doesn't pretend to be C (like GLSL) but there are GLSL to SPIR-V compilers. I can't comment on DX (I haven't used it.)

Here's a tutorial on drawing you first triangle: https://software.intel.com/en-us/articles/api-without-secret... . Note that there is a lottttt of code to do this (this is part 3...) I really think you could learn more about modern graphics with glBegin(GL_TRIANGLES) and writing GLSL shaders than boring yourself with Vulkan.

If you do want to play with Vulkan there is this book (piggy-backing off the rep from the old "OpenGL Bible") https://www.amazon.com/Vulkan-Programming-Guide-Official-Lea... . I can't give it an honest review because I got bored; I plan to pick it up again later...

jacobparker | 7 years ago

If you have any interest in WebGL (1), I've been publishing screencasts on YouTube for a while now- I'm up to nearly 100.

The playlist for WebGL is https://www.youtube.com/playlist?list=PLPqKsyEGhUnaOdIFLKvdk...

I'm also covering 3D Math fundamentals now.

My channel https://www.youtube.com/user/iamdavidwparker

davidwparker | 7 years ago

- As a starter Realtime Rendering [0]

- The siggraph courses on shading [1]. The 2017 course will be on 30th of July [2]. Current techniques from AAA engines.

- Papers from JCGT [3].

- Plus the paper collection from Ke-Sen Huang linking all graphics related conferences [4]

have fun reading

[0] http://www.realtimerendering.com/book.html

[1] http://blog.selfshadow.com/publications/s2016-shading-course

[2] http://blog.selfshadow.com/publications/s2017-shading-course...

[3] http://jcgt.org/read.html?reload=1

[4] http://kesen.realtimerendering.com/

gregorburger | 7 years ago

I can't recommend Scratchapixel enough for diving deep into the concepts behind CG (although it seems to be down for me at the moment ironically). I can't remember how much it goes into libraries or if it sticks to implementing things from scratch, but I find knowing the concepts behind something makes learning the libraries much easier anyway.

https://www.scratchapixel.com

Guyag | 7 years ago

Fabien Sanglard's bookshelf has all you need: http://fabiensanglard.net/Computer_Graphics_Principles_and_P...

open_bear | 7 years ago

We made a mind map for learning computer graphics :

https://learn-anything.xyz/computer-graphics

The basics node has the best resources for learning the subject.

nikivi | 7 years ago

Whilst not realtime rendering - Physically Based Rendering (Pharr, Jakob & Humphreys) http://www.pbrt.org/ is great for understanding what people are trying to achieve, without being distracted by very detailed optimisation etc.

samlittlewood | 7 years ago

What many people fail to realize is that the older and fixed pipeline legacy API's in modern graphics cards are emulated with thin layers directly on top of the modern stacks. On today's iOS devices, OpenGL ES 1.0 is emulated with the OpenGL ES 3.0 API, which very likely in turn is emulated with the Metal API.

If there was a genuine interest in helping the transition to the newer API's, the different parties writing and implementing today's API's would publicly make available the code for emulation layers to the older API's.

escapetech | 7 years ago

@BigJono - it would help to hear a little more about your overall idea or goal of what you might want to do. Like are you thinking maybe game engine programming? Mentioning Vulkan/DX12 implies you might want to get into real time engine/shader programming, but that's only a small slice of "modern computer graphics".

If you're interested in computer graphics in general, and googling "modern computer graphics", then the Vulkan/DX12 APIs aren't super important, the fundamentals of CG have not changed at all. The paradigm shift with those APIs is centered on performance, not on new concepts. You can learn vast amounts of computer graphics by writing a ray tracer or animation program or using off the shelf renderers, and never touch Vulkan or DX12.

There are definitely lots of great suggestions here, but it's a wide variety, because it all depends on what you envision or hope to do. It doesn't have to be fully formed or thought out, but if you had some inking like 'hey I saw this awesome procedural animation on Vimeo and I want to learn how to do that' or 'I'd love to work for Valve someday... what steps do I have to start taking?' or 'I was thinking I should add some 3d to my website' or 'I want to be a film animator', if we had a little more insight on what you're hoping, we can definitely get answers that will be more focused and helpful.

dahart | 7 years ago

I sort of know this area.... There two separate paths -- realtime or non-real-time.

For non-real-time there is: http://www.pbrt.org/

For real-time there is this: http://www.realtimerendering.com/

Neither book gets into the details of the specific API, they are theoretical.

Real-time techniques change nearly complete about every 10 years because GPUs get faster and render more techniques possible and obsolete the older less good looking techniques.

bhouston | 7 years ago

It's not a book, but if you poke around the Unreal Engine source code you can learn quite a bit:

https://github.com/EpicGames/UnrealEngine/tree/release/Engin...

You need to join the org first, https://github.com/EpicGames/Signup

Mathnerd314 | 7 years ago

IMO you should step back and ask: what is your end goal?

1) To make games (commercial games) or other realtime graphics application?

2) To make 3D rendering software or other semi-non-realtime software?

3) To have fun / learn?

4) Etc.

If you just want to learn/have fun, my personal recommendation is to write your own software, from the ground up. Ignore DirectX and OpenGL (unless you need them for a context to get pixels on the screen). Use a fast, native language like C/C++.

Teaching yourself and exploring is 100x more fun than reading a book, IMO (at the same time, you may learn faster using a book).

Try working with a naive projection algorithm to get 3d points on the screen. Like y' = y +/- z (Zelda-esque bird's eye view). When you are comfortable with matrices and vectors, learn "real" projection algorithms.

gavanwoolery | 7 years ago

I am picking up on computer graphics again now, too, after dabbling a bit in it well over 18 years ago (and for a small iOS game 8 years ago). I am restricting myself to Apples platform currently, this might not be what you want, but maybe others prefer it. They have great SceneKit WWDC videos dating back all the way to 2012. I recommend watching them from 2012 to 2017 in historical order. Also I am learning Blender, a free 3D authoring tool. I can recommend the free wiki book at https://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro .

auggierose | 7 years ago

I would recommend starting with things like touch designer and/or houdini. Jumping into the programming side right away can be done, but understanding things visually should give a much better foundation. From there you can write shaders in real time in touch designer or put them together with nodes in houdini. Simple expressions and small python fragments can help understand what certain manipulations look like. From there the programming side will make a lot more sense.

CyberDildonics | 7 years ago

Slightly off-topic, I am looking for resources about geometry applied to computer graphics (because I have forgotten everything I learned at school). Any advice ?

nkg | 7 years ago

Does anyone have comments on Ray Tracing Minibooks -- Ray Tracing in One Weekend, Ray Tracing: the Next Week and Ray Tracing: The Rest of Your Life?

https://www.amazon.com/Ray-Tracing-Weekend-Minibooks-Book-eb...

mi_lk | 7 years ago

Real Time Rendering is particularly good at explaining the underlying concepts of modern GPU rendering pipelines.

kobeya | 7 years ago

I'm actually trying to learn compute shaders specifically. I've followed all the tuts and guides I could find and have made some neat things, but I still want more depth than I can just find through Google. If anyone has any recs for further study I'd really appreciate it :)

sciguy77 | 7 years ago

I understand that Vulkan is more efficient for the CPU, not the GPU. However, because it's low-level, giving more control over the hardware, it can enable new techniques that weren't possible before.

Do any of these new Vulkan (or Metal or DX12) techniques actually exist yet?

hyperpallium | 7 years ago

To be honest, the books in GFX programming are usually about old consolidated methods. The new stuff is - everywhere, in blogs, in papers, in shader-toys.

honestoHeminway | 7 years ago

Here you can find most mentioned graphic books on Stackoverflow. http://booksoverflows.com/search?searchtxt=graphics

johndoe22 | 7 years ago

There was a book written by a US college CS professor that I saw a while ago online. I think it was free to read online, maybe other versions were paid. Unfortunately don't remember the professor or book name now. It covered OGL and HTML Canvas. I remember thinking it looked good. Maybe someone else here can say what the book name is.

Edit: Maybe covered WebGL too.

vram22 | 7 years ago