
Ask HN: What are the best resources for learning modern 3D graphics? - kenver
I’ve been out of the 3D graphics game for many years and would like to pick it back up. Things have moved on a lot so I’m looking for a good book on modern 3D graphics and the state of the art.
======
Jasper_
When you say "modern 3D rendering", do you mean modern native APIs like
Vulkan, Direct3D 12 and Metal? In that sense, modern GPU programming becomes
about scheduling and co-operative buffer management, along with writing
programs to be parallel. There's no great guide for this to my knowledge.

If you mean everything above the graphics API, e.g. modern lighting and
shading techniques, there is a wide range of choices. PBR-inspired material
response models are now dominant, and I recommend Naty Hoffman's slide deck as
an excellent overview of the subject [0]. I can go into more details here if
wanted. Haines's Real-Time Rendering is a pretty good reference. Get familiar
with math, geometry and trigonometry. I recommend "3D Math Primer for Graphics
and Games" by Parberry and Dunn [1] if you need a refresher.

[0] [https://blog.selfshadow.com/publications/s2015-shading-
cours...](https://blog.selfshadow.com/publications/s2015-shading-
course/hoffman/s2015_pbs_physics_math_slides.pdf) [1]
[https://www.amazon.com/Math-Primer-Graphics-Game-
Development...](https://www.amazon.com/Math-Primer-Graphics-Game-
Development/dp/1568817231)

~~~
kenver
Thanks for your recommendations. I'll probably be using metal or vulcan for
most of my work so I'll need to get an overview of those (I last did graphics
work with OpenGL back in the late 90s), but I really want to get an
understanding of all the fundamentals - your links will be super helpful.

------
slavik81
For rendering rates measured in frames per second, maybe check out "Real-time
Rendering", currently on its 4th edition.
[https://www.realtimerendering.com/](https://www.realtimerendering.com/)

For rendering rates measured in seconds per frame, consider the "Physically
Based Rendering Textbook", currently on its 3rd edition.
[https://www.pbrt.org/](https://www.pbrt.org/)

------
planteen
Lots of people here are recommending "Real-time Rendering" by Haines. While an
excellent book, it goes into a ton of depth and will be very difficult to read
cover to cover. Many topics are irrelevant for someone new to graphics.

A much shorter book with breadth is "Foundations of 3D Computer Graphics" by
Steven J. Gortler.

------
abiro
For an overview: Real-Time Rendering 4th edition by Haines et al.

For advanced techniques:

\- GPU Pro and GPU Zen series (ed. Engel)

\- Ray Tracing Gems (Haines et al.)

\- Unreal Engine tutorials and source code for reference implentation

------
marknadal
Me too, please!

I want to build (or use) a custom 3D rendering engine that:

\+ Renders from center of screen, in clockwise spiral outward, if any pixels
remain after 15ms I want to drop them (should only be peripheral, I'm OK with
that in exchange for constant performance time).

\+ Can add secondary orthogonal clipping triangles to each triangle, such that
the clipping edge could be defined by a curve. Imagine a hexagon (made of 6
triangles), we could easily extend a low poly hexagon into a high resolution
circle just by interpolating a curve here.

\+ My goal after that is to then define an animation pipeline, where it will
procedurally generate thousands of fluid dynamic simulations that it then
feeds back into itself as a machine learning training set. Once it has
associated these slow compute intensive simulations with the model, ideally we
can swap in high-resolution smoke/fluid graphics in-game by only using a few
low resolution particle "marker" calculations that then trigger substitutions
for the model.

And much more.

I'm OK if this takes me 9 years to make. My target is Rust+WebGL, inspired by
the really impressive work of MakePad.

I'm also willing to spend money on people who can teach me this, so please
contact me if you're an expert on Shaders and low level WebGL experience.

~~~
manytexel
With the first two points, it's not clear to me _why_ you want to do that. If
the reason is performance, I suggest you should first learn how to program
GPUs, then think about it again. It'll be more obvious what you can and can't
do efficiently.

> Renders from center of screen, in clockwise spiral outward, if any pixels
> remain after 15ms I want to drop them (should only be peripheral, I'm OK
> with that in exchange for constant performance time).

I suppose you could split up your CPU-side render calls into segments and drop
the ones that occur beyond what you measure as 15ms.

However, this means that you need to wait for the GPU to finish work after
each segment, which has some overhead. It's probably better to figure out how
much you can fit into 15ms ahead of time and then submit all that in one go.

> Can add secondary orthogonal clipping triangles to each triangle, such that
> the clipping edge could be defined by a curve. Imagine a hexagon (made of 6
> triangles), we could easily extend a low poly hexagon into a high resolution
> circle just by interpolating a curve here.

This kind of variable-length output problem is something that GPUs aren't very
good at. You could do it with Geometry Shaders, but those tend to perform
poorly and aren't available in WebGL (or Apple Metal).

It might be better to just submit a sufficient amount of vertices, which you
can analytically displace, so for example you don't have to supply the
coordinates of every vertex on the circle, but rather calculate them from the
index on-the-fly. You can also use Tesselation Shaders to amplify geometry in
an efficient and view-adaptive way, but again that's not in WebGL.

Having said that, all of this "smart rendering" might not be necessary at all.
After all, your goal is to train a neural network. You can probably just use
an off-the-shelf renderer with off-the-shelf hardware and it'll be fast enough
to not be the bottleneck - especially nine years down the line.

------
ArtWomb
All good suggestions ;)

See also

[https://webgl2fundamentals.org/](https://webgl2fundamentals.org/)

And for state-of-the-art check out the Pixar Moana Island Scene and Disney's
Hyperion Renderer (although perhaps that is on its way to becoming obsolete!)

[https://www.yiningkarlli.com/projects/hyperiondesign/hyperio...](https://www.yiningkarlli.com/projects/hyperiondesign/hyperiondesign.pdf)

[https://www.technology.disneyanimation.com/collaboration-
thr...](https://www.technology.disneyanimation.com/collaboration-through-
sharing)

------
deepaksurti
This [1] gives you quite a few options to pick a starting point.

A very good practical hands-on bottoms up [2] resource.

[1]
[https://fabiensanglard.net/Computer_Graphics_Principles_and_...](https://fabiensanglard.net/Computer_Graphics_Principles_and_Practices/index.php)

[2] [http://antongerdelan.net/opengl/](http://antongerdelan.net/opengl/)

------
Pharaoh2
Modern 3D graphics has a lot of facets, a good resource as well as engine for
PBR rendering is filament and is documented here:
[https://google.github.io/filament/Filament.html](https://google.github.io/filament/Filament.html)

------
pizzaparty2
If you're okay with using a game engine I highly recommend Unity 2018 Game
Development in 24 Hours, Sams Teach Yourself (3rd Edition)
[https://www.amazon.com/dp/0134998138/ref=cm_sw_r_cp_apa_i_tY...](https://www.amazon.com/dp/0134998138/ref=cm_sw_r_cp_apa_i_tYRXDbYXSPAV2)

------
flqn
If you're after an OpenGL 3+ guide [http://open.gl](http://open.gl) is pretty
good!

------
kenver
Thanks to everyone for your recommendations. There's some real gems here.

------
minraws
What I use(yes I am a beginner have only just started with most of it):

\- GPU Gems

\- SIGGRAPH

\- Real Time Rendering Book

