Physically Based Rendering: From theory to implementation (2016)
pbr-book.org
pbr-book.org
I've spent my entire life studying this stuff and feel extremely lucky on so many levels: that we have these incredible computers which can actually do the computation, that we happen to have such a powerful theory that can model and even predict visual reality, and perhaps most of all, that a single person can learn all this stuff and carry it around with them everyday - it's really changed how I see the world.
My deepest thanks go to those who have developed and passed all this on through their papers and books; it's literally what I'm getting the meaning of life from.
These days the most exciting research I think is in path guiding and many-light sampling techniques.
[0] https://research.nvidia.com/sites/default/files/pubs/2013-07...
[1] https://research.nvidia.com/publication/understanding-effici...
[2] https://research.nvidia.com/publication/2021-06_Alias-Free-G...
Its primary purpose is to be be used by artists for SFX type work, but if you're looking to make really accurate renderings of complex lighting scenes, for e.g. accurate architectural renderings, I would not use cycles and look at luxcore [0][1] instead.
Basically what you're doing in MC is estimating expected values (and thereby integrals: average height times base width equals area under the graph) using random numbers, to be roughly thought of as a rnd() function which gives you back a float in [0,1).
However, using actual proper random number generators has a very slow convergence rate, as the random numbers chosen will tend to clump; on the other hand, if you just use a perfectly uniform distribution, you'll suffer from correlation problems.
Consider a 1-D numerical integration problem, and instead of using rnd() to pick points in your integrand range, you start with some seed value in [0,1), and each time you need a new random number, you add phi-1 to the existing number and mod with 1.0 to get the new number. If you plot this sequence on a [0,1) number line, you'll see that it divides up the interval into finer pieces really nicely, magically keeping a good distance from all the previous values, without even knowing them!
Why does this work? Well, there's a lot of beautiful theory about phi (also relating to biology and nature, e.g. seashells and the distribution of sunflower seeds), in particular how it is in some sense (continued fraction) the "most irrational" number. Does it work well for other numbers, and can it be extended to higher dimensions? Sure, there are some interesting things you can do: http://extremelearning.com.au/unreasonable-effectiveness-of-...
This isn't even scratching the surface of things like the Halton, Hammersley and Sobol sequences, the human visual response to different kinds of noise that makes blue noise preferable, etc. Here's a wealth of recent research on all that: https://sites.google.com/view/myfavoritesamples
Rendering is particularly beautiful in that it touches on so many fields, from pure maths, to applied maths and numerical methods, to physics, to human biology and perception, aesthetics, both low- and high-level programming concerns, even philosophy: if we can simulate visual reality to such high precision, it lends credence to the idea that we ourselves are simulated. To me the apparently obvious truth of this is up there with understanding that the iron that makes our blood red can only be formed in supernovae.
(h/t Leonid Petrov, Victor Kleptsyn)
[1] https://www.wired.com/2012/12/what-does-randomness-look-like...
[2] https://www.actuaries.org.uk/system/files/documents/pdf/0481...
IIRC, he moved on from inventing a brand new rendering methodology inspired from oldie research in nuclear physics [0] to designing the S2 system at Google [1] to building one of the largest money-making machines in the ads world at Google [2][3].
Not exactly your average engineer.
[0] https://en.wikipedia.org/wiki/Nicholas_Metropolis
[1] https://en.wikipedia.org/wiki/Eric_Veach
[2] https://uwaterloo.ca/math/people-profiles/eric-veach
[3] https://www.businessinsider.com/unsung-google-heros-2011-5?r...
For others who like opensource renderers: Appleseed (which Franz is lead developer of) is amazing, check it out! https://appleseedhq.net/
The Early Release (still in-development) version of pbrt-v4 can be found here:
If any of you have time to go through the book, go through it slowly and carefully. There are a lot of nuances that isn't apparent on the first attempt. It is comprehensible to most of us. The authors have exclusively marked the chapters that can be skipped on the first run. No matter how many times one goes through the book, it will still feel like a gem!
I recommend taking a look at the amazing story behind it https://pharr.org/matt/blog/2018/04/30/ispc-all .
It's very interesting to see not only the pure tech part, but also the disheartening lack of interest at Intel on the subject. Missed opportunity I think... You can feel a lot of fun turning into a lot of... Sadness? in the end.
Really a big fan of all things Matt Phar, I hope he has the time of his life at nvidia and that they put him to good use!
The book is a "literate program". You can run the book through a parser and it will give you the compliable working source of the complete renderer it is describing. https://www.pbr-book.org/3ed-2018/Introduction/Literate_Prog...
It is the only book to win an Oscar https://www.oscars.org/news/19-scientific-and-technical-achi...
Well, reality is even stranger than imagination: no computer program has won a Pulitzer prize, but this computer program won an Oscar! Here's a video of the awards ceremony, where Kristen Bell and Michael B. Jordan introduce the recipients, and at 2:12 Matt Pharr comes up and says "needless to say, when we started writing a book we never expected an Academy Award would be the end result of that effort" and thanks Donald Knuth for literate programming: https://www.youtube.com/watch?v=7d9juPsv1QU
Knuth has repeated the joke/remark (https://www.pbr-book.org):
> “This book has deservedly won an Academy Award. I believe it should also be nominated for a Pulitzer Prize.”
If you would like to take some first steps into this domain I can recommend Ray Tracing in One Weekend [1]. Not only will you learn how to write a path tracer, but it also touches on things like motion blur and animation. For me it was one of the best starting points because it was very simple to follow.
“Physically” is an adverb, which should modify an adjective or verb. So parsing the phrase, “physically based” implies that “based” is used as an adjective or verb, which would imply that “physically based rendering” is a special form of “based rendering”, which makes no sense.
“What kind of rendering is it? Based rendering. What kind of Based rendering? Well, Physically Based, of course.”
It should probably instead be “physics based rendering”, right?
Edit: english.stackexchange seems to agree, although it’s closed as offtopic: https://english.stackexchange.com/questions/165416/is-physic...
I would have agreed with you back in the 80's.
But since then, taking care of atmospheric / volumetric effects in rendering is absolutely essential to rendering realistic scenes, especially in movie SFX.
I'm not going to claim that SFX folks care about being physically accurate when doing volume rendering, but they do care a very great deal about clouds fog, subsurface rendering, light rays through mist, etc ...
This book has a great mix IMHO, going into the math as well as tricky implementation details yet in a very approachable manner.
Lots of great times were had as a result of this book.
I read in another book about how to learn, there is something called the illusion of competence. If you passively read something a couple of times, you will think you learned and understood it. But in reality you just recognized it. Without the external triggers and clues you couldn't solve it.
Had this book on my "to read" list for a while. Given that it appears to be more rigorous than my previous contact with the world of rendering, and since this is just a hobby of mine:
What pre-knowledge (topics, math, other sources or books) offers a solid preparation to fully tackle the pbr book?
While it goes through vectors and such from the bottom up, it does so quite quickly so will probably be a bit steep if you haven't had any linear algebra from before.
Partial derivatives show up a lot, probably good if one has some experience from before.
Overall though the book doesn't assume a lot as I recall, and goes through the constructions from a fairly basic level and up.
You might also want to try this sort of thing in a study group. You definitely get more out of exercises if you have people to discuss them with.
As for language of choice, anything will be fine. The book will build up a solid foundation. The only thing that can stop you is the amount of frustration which you may face when not figuring out the things. It can be confusing at times, but please give your time and let it sink in. After sometimes, you can review it with a completely fresh eyes and you may fix a lot of issues!
Goodluck!
Rust may be tricky because you will need to render pixels in parallel, and most higher level languages will take a lot of skill to make fast.