21 comments

[ 4.0 ms ] story [ 38.6 ms ] thread
Webpage doesn't work in Firefox/Android.
Love the attention to details,the read is seamless
I'm not a fan of how people talk about "first principles" as I think it just leads to lots of confusion. It's a phrase common in computer science that makes many other scientific communities cringe. First principles are things that cannot be reduced and you have to have very good justifications for these axioms. The reason the other scientific communities cringe is because either (most likely case) it's being used improperly and someone is about to demonstrate their nativity, or they know they're about to dive into a pedantic nightmare of nuances and they might never escape the rabbit holes that are about to follow.

In fact, I'd like to argue that you shouldn't learn things from first principles, at least in the beginning. Despite the article not being from first principles, it does illustrate some of the problems of first principles: they are pedantic. Everything stems from first principles so they have to be overly pedantic and precise. Errors compound so a small error in one's first principles becomes enormous by the time you look at what you're actually interested in. Worst of all, it is usually subtle, making it difficult to find and catch. This makes them a terrible place to begin, even when one already has expertise and is discussing with another expert. But it definitely should not be the starting place for an expert to teach a non-expert.

What makes it clear that the author isn't a physicist is that they don't appear to understand the underlying emergent phenomena[0]. It's probably a big part of why this post feels so disordered. All the phenomena they discussed are the same, but you need to keep digging deeper to find that (there's points where even physicists know they are the same but not how or why). It just feels like they are showing off their physics knowledge, but it is well below that which is found in an undergraduate physics degree[1]. This is why you shouldn't start at first principles, its simplicity is too complex. You'd need to start with subjects more complicated than QED. The rest derive out of whatever a grand unified theory is.

But as someone who's done a fair amount of physical based rendering, I'm just uncertain what this post has to do with it. I would highly recommend the book "Physically Based Rendering: From Theory To Implementation" by Pharr, Jakob, and Humphreys that the author says the post is based on. It does a much better job at introducing the goals and focusing on getting the reader up to speed. In particular, they define how the goal of PBR is to make things indistinguishable from a real photograph, which is a subtle but important distinction from generating a real photograph.

That said, I still think there's nice things about this post and the author shouldn't feel ashamed. It looks like they put a lot of hard work in and there are some really nice animations. It's clear they learned a lot and many of the animations there are not as easy as they might appear. I'm being critical but I want them to know to keep it up, but that I think it needs refinement. Finding the voice of a series of posts can be quite hard and don't let stumbles in the beginning prevent you from continuing.

[0] Well that and a lack of discussion of higher order interference patterns because physicists love to show off {Hermite,Laguerre}-Gaussian mode simulations https://en.wikipedia.org/wiki/Gaussian_beam#Higher-order_mod...

[1] In a degree you end up "learning physics" multiple times. Each time a bit deeper. By the end of an undergraduate degree every physicist should end up feeling like they know nothing about physics.

This comment eliminated any motivation I had to read the original article.
Maybe I skimmed too much but Chapter 1 seemed mostly irrelevant to me. It'd be like taking a car mantainence class and them starting at atoms and how atoms work in metals and how metals are magnetic or whatever, before finally getting to things that car mechanics actually care about. Maybe that's helpful to some.

I know this is going to sound critical, but part of me wondered if this wasn't a vibe coded project. The visuals are impressive, but you can go ask gemini canvas to make them and it will. Here's an example

https://jsbin.com/webudilaha/edit?html,output

PS: you need to close the banner at the top I think in order to be able to see the roughness slider.

It needs a little TLC but it works. Even if they weren't vibe coded, I mostly wanted to pass on they probably can be, for anyone who might find that useful for making more articles like this. Even if they just get you started.

Still, cool article!

The roughness reflection slider thingy is trivial to generate with any LLM, however you should try generating the BRDF illustration with:

- 3d primitives (arrows, hemisphere)

- billboarded text rendering

- mouse interaction/canvas rendering that works for multiple scenes

It might be possible to vibe code but you’ll hit a wall of complexity really quick

I wonder if part of the problem is that starting from electromagnetism doesn't necessarily lead naturally to classic PBR style raytracing; getting there requires fair amount of conceptual leaps, like going from waves to ray optics, or (usually) going from spectrums to rgb triplets. Many things in graphics rendering relies on scenes being well-behaved and relatively simple in a way that might not be obvious when coming from first principles.

It is also interesting to look what you can do if you make your rendering even more physically based. One example is wave_tracer which combines wave optics with path tracing to enable simulating wider range of phenomenons. They have nice theory writeup on their webpage:

https://wavetracer.dev/theory.html

I really like the interactive elements and animations.

Small nit on the wording: "This continuous cycle enables self-sustaining, self-propagating electromagnetic waves"

The term “self-propagating” makes it sound like the fields are somehow pushing each other forward, but really they’re just coupled solutions of Maxwell’s equations.

How was the interactivity achieved? Could you maybe link to the source so I can learn? I have been trying to get something like this working with quarto, but it is getting way too complicated.
Android Chrome on Pixel 7a. None of the interactive demos show up. Just blank white.
Are there any data driven approaches to physically based rendering?

Can't we measure micro-facet depth and angle distribution of real world materials using laser speckle and use it to inform the normal distribution function? Deriving ideals from first principles is great and all, but verifying them against real world measurements seems like the bare minimum.

This is beautifully done. Thanks.
For someone new, this was a really interesting read. Thanks for the effort. The picture of how the sky looks from underwater was so surprising to learn.

Regarding the 'first-principles' discussion, it is a relative term in usage despite the name. Explaining from a layer of abstraction below normal explanations.

Someone explaining how a computer works starting with machine instructions is doing first-priniciples, even if they wont explain details of atoms. The literal meaning would be almost impossible to implement, for instance none of Newton's work would be first principles given today's knowledge. Similarly, current physics can be subsumed in future principles.

You should add a section on polarization.
The discussion of the difference between metal and non-metal is a bit unclear. When he says that metal has no "diffuse reflection" but non-metals do, I think what he might mean is that metals have no subsurface scattering. Rough (not mirror-like) reflections do certainly also look "diffuse".