• enugu 6 hours ago

    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.

    • godelski 20 hours ago

      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.

      • imadr 20 hours ago

        Thanks for the constructive criticism! A few points I'd like to discuss:

        Let's suppose the aim of the article was indeed to learn PBR from first principles, what would it look like? Quantum electrodynamics?

        I think there is merit in exploring different physical models for fun and scientific curiosity (like I mentioned in the first chapter). I (personally) feel that it's boring to just dump equations like Snell's law without exploring the deeper meaning behind it. I also feel that it's easier to grasp if you have some surface knowledge about more complex physical models.

        I agree however that I probably made many mistakes since I didn't study physics, I'd appreciate any feedback to improve that.

        I dislike "Physically Based Rendering: From Theory To Implementation", I personally think that the literate programming approach of the book is way too confusing and disorganized. I prefer the SIGGRAPH talk by Naty Hoffman[0]

        [0] https://www.youtube.com/watch?v=j-A0mwsJRmk

        • magicalhippo 19 hours ago

          > Let's suppose the aim of the article was indeed to learn PBR from first principles, what would it look like?

          Well given the title I at least expected the article to explain or derive things like why and how metals and their alloys have the color (wavelenght-dependent complex index of refraction) that they do, why and how say quartz crystals have different colors, birefringence, fluorescence (makes T-shirts appear extra bright) etc.

          And there is no mention of the recording process. Are we simulating good old film with its silver crystals of various sizes? Different film stock is known to have very different looks due to their chemistry.

          Or a digital camera sensor with its quantum and thermal noise, bayer filter and a rolling shutter causing those funny-looking propeller pictures?

          Not knocking the article, but given the title it fell well short of my expectations going in. That is, I was wondering how on earth anyone had managed to do all that.

          • imadr 18 hours ago

            Yes I didn't have time to write a chapter about camera sensors, the human retina, and the whole image formation process. I'll definitely expand on this later on.

          • magicalhippo 19 hours ago

            > I dislike "Physically Based Rendering: From Theory To Implementation", I personally think that the literate programming approach of the book is way too confusing and disorganized.

            Interesting. Personally it's by far the best programming related book I've read. I didn't mind the literal programming, and I loved how it dove fairly deep into the math and physics but also into the details of implementing the math.

            The latter being important as there are can be so many gotchas when implementing math.

            • grg0 15 hours ago

              I agree with OP and find the literal programming in that book incredibly distracting and annoying. I prefer the theory up front and the code later. "Ray Tracing From the Ground Up" does a much better job in my opinion (although it also only covers a fraction of the topics in the PBR book.)

            • delta_p_delta_x 20 hours ago

              > Let's suppose the aim of the article was indeed to learn PBR from first principles, what would it look like? Quantum electrodynamics?

              Something like that, yes. A truly from-first-principles treatment of photon-surface interactions would involve an extremely deep dive into quantum numbers, molecular orbitals, solid state physics and crystal lattices (which are metals), including a discussion about how electron waves superpose to produce various conduction/valence bands with various band gaps, and then discuss how photons interact with these bands.

              • imadr 20 hours ago

                I might be a stupid question but how hard would that be to explain, and to understand?

                If you had to teach an alien from another universe physically based rendering:

                - In an exhaustive manner and,

                - You're only allowed to explain something if it derives from something more "fundamental" until we reach the most comprehensive physical models we have

                How hard would be the math behind it for example? Because realistically in my article the hardest piece of math is a very basic integral

                Could I for example start reading these Feynman lectures[0] and get up to speed on everything there is to know about photon-surface interaction?

                [0] https://www.feynmanlectures.caltech.edu/

                • delta_p_delta_x 19 hours ago

                  The raw mathematics isn't the hardest; most of this is settled by the end of the second year of undergraduate physics—things like Taylor series, ODEs, PDEs, special functions, a bit of linear algebra (no proofs needed, just use the results); perhaps complex analysis which leads to Fourier transforms and all. Maybe a treatment of tensors.

                  The issue is the sheer complexity of micro systems, and the unintuitive nature of going deeper than 'EM wave reflects off electrons'.

                  Consider metal-light interaction. Exactly how does a visible-light EM wave interact with a conduction band of superposed free valence electrons? How does the massive superposition elevate each valence electron up energy levels? Why do only metallic and semi-metallic crystals have no band gap? Why are electrons filled in the order of s, p, d, f, g, h orbitals? Why do these orbitals have these shapes? Why are electrons so much less massive than protons and neutrons? Why does the nucleus not tear itself apart since it only contains positive and neutral particles? Why are protons and neutrons made of three quarks each, and how does the strong interaction appear? Why are the three quarks' mass defect so much more than the individual masses of each quark? How does the mass-energy equivalence appear? Why does an accelerating electric charge produce and interact with a magnetic field, and thus emit EM radiation? What is mass, charge, and magnetism in the first place?

                  Each question is more 'first principles' than the last, and the answers get more complex. In these questions we have explored everything from classical EM, to solid state physics, to quantum electro- and chromodynamics, to particle physics and the Standard Model, and are now verging on special and general relativity.

                  • naasking 4 hours ago

                    > The raw mathematics isn't the hardest; most of this is settled by the end of the second year of undergraduate physics—things like Taylor series, ODEs, PDEs, special functions, a bit of linear algebra (no proofs needed, just use the results); perhaps complex analysis which leads to Fourier transforms and all. Maybe a treatment of tensors.

                    It sounds like the OP is saying you could tackle the article if you just know a little high school calculus and trig, and you're here saying that you need years of post-secondary mathematical education. I think you're making his case that he's dramatically simplified understanding how to compute these things for someone who doesn't have a post-secondary education.

                  • chermi 14 hours ago

                    No, Feynman lectures won't get you there.

                    • godelski 9 hours ago

                      I think people forget that The Feynman Lectures are aimed at undergraduates. They are great but far from comprehensive.

                • godelski 19 hours ago

                  Sure! And I appreciate the response. I hope I didn't come off as too mean, it can be hard to find that balance in text, especially while criticizing. I really do not want to discourage you, and I think you should keep going. Don't let mistakes stop you.

                    > Let's suppose the aim of the article was indeed to learn PBR from first principles, what would it look like?
                  
                  I think you shouldn't go that route, but the most honest answer I can give is that such a beginning doesn't exist in physics knowledge. You could start with something like String Theory, Supergravity, Loop Quantum Gravity, or some other proposition for a TOE. Physicists are still on the search for first principles.

                  All this is well beyond my expertise btw, despite having worked in optics. If you want to see some of this complexity, but at a higher level, I'd highly recommend picking up Jackson's Elecrtodynamics book. That's that canonical E&M book for graduate level physics, Griffith's is the canonical version for undergraduate (Junior/Senior year). Both are very well written. I also really like Fowles's "Introduction to Modern Optics", and it is probably somewhere in between (I read it after Griffiths).

                  I am in full agreement with you that having deep knowledge makes a lot of more shallow topics (and even many other deep topics) far easier to grasp. But depth takes time and it is tricky to get people to follow deep dives. I'm not trying to discourage you here, I actually do encourage going deep, but just noting how this is a tricky line and that's why it is often avoided. Don't just jump into the deepend. Either wade people in or the best option is to lead them in so they don't even recognize they're going deep until they're already there.

                    > I dislike <PBR Book>, I personally think that the literate programming approach of the book is way too confusing and disorganized
                  
                  This is very understandable and I think something you should hone in on and likely where you can make something very successful. But an important thing to note about his SIGGRAPH talk is his audience. His talk is aimed at people who are experts in computer graphics, but likely computer scientists and not physicists. So his audience knows a fair amount of rendering to begin with and can already turn much of what's being said into the code already. But if you listen to it again I think you'll pick up on where he mentions they'll ignore a bunch of things[0]. There's no shame in ignoring some things and working your way forward. I actually like what Hoffman said at 22:25 "and we know that's an error. But we'll live with it for now." That's the mark of good scientific and engineering thinking: acknowledge errors and assumptions, triage, but move forward. A common mistake looks similar, dismissing those errors as inconsequential. That's putting them in the trash rather than tabling for later. Everything is flawed, so the most important thing is keeping track of those flaws, least we have to do extra work to rediscover them.

                  So, who is your audience?

                  This is just my opinion, so you have to be the real judge; but I think you should leverage your non-expertise. One of the hard things when teaching is that once you understand something you quickly forget how difficult it was to learn those things. We quickly go from "what the fuck does any of this mean" to "well that's trivial" lol. You referenced Feynman in your blog post and most important thing I learned from him is one of the best tools for learning is teaching (I've given way too many lectures to my poor cat lol). It forces you to answer a lot more questions, ones you normally would table and eventually forget about. But at your stage it means you have an advantage, that the topics you are struggling with and have overcome are much more fresh. When learning things we often learn from multiple sources (you yourself shared overlapping material), and that's because multiple perspectives give us lots of benefits. But at this point, don't try to be a physicist. If you want to work towards that direction, great! If you don't, that's okay too. But let your voice speak from where you are now.

                  Reading your blog post and poking through others, there's a "you" that's clear in there. Lean into it, because it is good. I like your attention to detail. Like in your Ray Marching post how you just color code everything. Not everyone is going to like that, but I appreciate it and find it very intuitive. I'm a huge fan of color coding equations myself and make heavy use of LaTeX's annotate-equations package when I make slides.

                  But I think looking at this post in isolation the biggest part to me is that it is unclear where you're going. This is a problem I suffer from a lot in early drafts. An advisor once gave me some great advice that works really well for any formal communication. First, tell "them" what you're going to tell them, then tell them, then tell them what you told them. It's dumb, but it helps. This is your intro, it is your hook. I think there's places for these ideas but early on they almost feel disconnected. This is really hard to get right and way too easy to overthink. I think I can help with a question: "What is your thesis?"/"What is your main goal?" Is it "learn how our human eyes capture light and how our brains interpret it as visual information"? Or is it "Physically based rendering from first principles". Or even "learn how to create physically realistic renderings of various materials." These are not exactly the same thing. When I'm struggling with this problem it is because I have too much to say. So my process is to create a "vomit draft" where I just get all the things out and it's going to be a mess and not in the right order. But once out of my head they are easier to put together and in the right order. After your vomit draft check your alignment. What is most important and what can be saved? What's the most bare bones version of what you need to communicate? Build out of that.

                  I do really think there's a good blog post in here and I can see a lot of elements that suggest a good series may come. So I do really encourage you to keep going. Look at what people are saying they like and what they dislike. But also make sure to not take them too literally. Sometimes when we complain about one thing we don't know our issue is something else. What I'm saying is don't write someone else's perfect post, write your post, but find best how to communicate what you want. I know I've said a lot, and I haven't exactly answered all your questions, but I hope this helps.

                  [0] There's a side note here that I think is actually more important than it appears. But the thing is that there's a weird relationship between computation and accuracy. I like to explain this looking at a Taylor Series as an example. Our first order approximation is usually easy to calculate and can usually get us a pretty good approximation (not always true btw). Usually much more than 50% accurate. Second order is much more computationally intensive and it'll significantly increase your accuracy but not as much as before. The thing is accuracy converges much like a log-like curve (or S-curve) while computation increases exponentially. So you need to make these trade-offs between computational feasibility and accuracy. The most important part is keeping track of your error. Now, the universe itself is simple and the computational requirements for it are lower than it takes us to simulate but there's a much deeper conversation about this that revolves around emergence. (The "way too short" version is there's islands of computational reducibility) But the main point here is this is why you should typically avoid going too low quickly, because you end up introducing too much complexity all at once and the simplicity of it all is masked by this complexity.

                  • howardyou 2 minutes ago

                        > But the thing is that there's a weird relationship between computation and accuracy. I like to explain this looking at a Taylor Series as an example. Our first order approximation is usually easy to calculate and can usually get us a pretty good approximation (not always true btw). Usually much more than 50% accurate. Second order is much more computationally intensive and it'll significantly increase your accuracy but not as much as before. The thing is accuracy converges much like a log-like curve (or S-curve) while computation increases exponentially.
                    
                    This is something I've been thinking about a lot lately that I'd like to better understand. Are there any examples in physics or machine learning that you can think of that have more specific figures?
                    • imadr 18 hours ago

                      Again, thanks for the thorough and constructive answer, it doesn't come off as mean, on the contrary I appreciate it :)

                      I strongly agree that teaching is absolutely the best tool for learning. I wrote this article in part because I got inspired by the "What I cannot create, I do not understand" quote by Feynman.

                      I agree that the article is disorganized, and it's not only a feeling: it literally is! I had to shuffle around parts of the chapter about radiometry because I couldn't find the right place for it. I was kind of in a rush because I submitted this article as part of 3blue1brown's summer of math exposition.

                      I find it interesting that between the 3rd and 4th edition of pbr book, chapters have been reorganized too. Monte Carlo Integration has been moved to an earlier chapter before radiometry, reflection models..etc which I found confusing, but I suppose the authors had a good reason to do that. So I have a lot to learn on how to improve my writing and how to organize ideas into something coherent.

                      [0] https://some.3b1b.co/

                      • godelski 18 hours ago

                        Keep with it! And that reorganization between editions is a good reminder that things don't have to be perfect and can always be improved upon. We call these things "soft skills" but I think we've made a terrible mistake in implying that communicating is easy lol. Often it can be harder than the work itself! I think you got a good attitude and it'll take you far. So good luck on your submission! And FWIW, Monte Carlo Integration confused the hell out of me until I figured out how beautifully simplistic it is. If it hasn't clicked, keep with it. It eventually will.

                  • zokier 7 hours ago

                    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

                    • socalgal2 9 hours ago

                      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!

                      • delta_p_delta_x 20 hours ago

                        > By the end of an undergraduate degree every physicist should end up feeling like they know nothing about physics.

                        You couldn't have been any closer. I emerged feeling extremely stupid after doing physics at uni. My rather mediocre marks didn't help...

                        • godelski 18 hours ago

                          LOL to be honest I'm more scared of the people that it doesn't happen to. At first I feared them because I thought they knew so much more and it meant I was so far behind. But later I feared them because I recognized we were at not too dissimilar levels and the main difference was recognizing how far left we have to go.

                          I don't fear the man who knows more than me, I admire them and only have something to gain by admitting my ignorance to them. But I do fear the man who believes he knows more while in reality he doesn't. Nothing productive comes from them as they don't even recognize the journey we are both on.

                        • taeric 20 hours ago

                          It isn't just computer science people that do this, either. My gut is it was a common thing in MBA style classes as a way to approach a topic in a field you are not expert in. Specifically, it is common among management talkers, from my experience.

                          I think the idea is supposed to be to go back to the "first principals [that you would have been taught]." Which, yes, sometimes you will learn things that show these early teachings were wrong. Often, though, you can get far more mileage out of the naive models than people want to admit.

                          To that end, I think used judiciously, this has merit. Rarely does anything go against early teaching. It should lean on the specific assumptions and why they do or do not apply anymore, though.

                          • godelski 18 hours ago

                            I think >90% of the time I hear the phrase "first principles" mentioned I'm safe in expecting something that is very high level to follow. I'm glad nerds have (kinda) been pushed into celebrity status but I also think there's a lot of cargo culting that has followed. Unsurprising I guess, since one is much easier than the other. I just wish there was more pushback, especially in tech (not because the only abuser of this, but we're definitely the ones with the most weight)

                              > you can get far more mileage out of the naive models than people want to admit.
                            
                            All models are wrong, but some models are useful, right? I'm a big fan of this phrase so much because I think it helps us remember that it's okay to be wrong.

                            I feel like the biggest problem of first principles is that this is almost never where you start. Rather it is something you work towards. Where it then becomes an iterative process expanding/extrapolating out, then coming back in and refining. Low level knowledge is so beneficial, but also very difficult to obtain. It's even more difficult to see how much room is below you without ever having gone down.

                            • taeric an hour ago

                              Right, this is why I think people assume "first principals" means "first [learned] principals." It is almost always super high level and used synonymously with "back to basics."

                              And fully agreed on your reasoning on why these are good phrases to keep in mind. I think I would pile on to the "becomes an iterative process" to highlight that "starting from first principals" is more likely to be where folks start. With advanced solutions expanded to cover more and more details that the initial assumptions could gloss over.

                              I think this is largely justified, if only because "first principals" meaning "absolute foundation" are almost certainly still being discovered.

                          • jiggawatts 20 hours ago

                            The author went down to the electromagnetic wave theory of light. How much more “first principles” could this article be!?

                            • godelski 20 hours ago

                                > How much more “first principles” could this article be!?
                              
                              I think you've answered your own question and demonstrated my point. See my third sentence. The notion of "more 'first principles'" is like asking who's before the first person in line. If there's more people in front, then they aren't the first person in line and if there aren't, well you're right, how can you be more first? But I think we both know this isn't the start of the line...

                              As to your actual question(?) of "how more fundamental can it be"? Well, the answer is a lot. They barely scratched E&M theory. I specifically mentioned that even a undergraduate in physics would be exposed to much more fundamental aspects. Likely even before their junior year.

                              But if you're asking "how much more fundamental should* it be" well most of my comment is arguing that it should not be. I argued that it generally isn't a good idea to start from first principles, and I'll even argue that it probably isn't a good idea to start there even if they are in quotes.

                              • Krei-se 11 hours ago

                                i have a similar background to OP and went into physics mostly by accident learning geometric algebra, so i wonder why it's shunned skipping the deductive concepts you have to forget/correct later anyways - for me it makes a lot more sense building from the most abstract ground i can barely stand on.

                                • godelski 10 hours ago

                                  Mostly because it is like trying to teach people how to swim in the deep end. It's definitely possible but not a great idea for the majority of people.

                                  Do you really want to start learning physics from String Theory? You could, but it isn't a great idea. Even if you replace ST with an alternative proposed ToE.

                                  • Krei-se 8 hours ago

                                    Thanks for answering and: Valid point. I like about GA that it's not initially presented with the "added note" other theories are contradicting already with it which is giving me a hard time learning physics so far.

                                    So to answer the question: Well, i think if you come with relational database experience which is n-dim - learning string theory first is ... not that stupid. Maybe encouraging people to try this route would be better than forcing them to take the whole curriculum.

                                    Taking discreet numbers as common ground GA provides a stable scaffolding - i think in terms of a finite state machine getting stuff on a screen it's fair to say it's the right tool for that job in this constrained environment.

                                    I also dabbled with scattering amplitudes, but from what i understand so far it's similar to what category theory is in math: Structure before even agreeing on (countable, etc.) sets.

                                    I'm always open for dialog on these and like digging to solid grounds, still i think it makes sense to take a look at the environment then agree on a common ground to build from.

                                    In medicine this can be biochemistry and in computer aided rendering i think OPs "first" principles are not that far off.

                              • DiogenesKynikos 8 hours ago

                                Agreed - OP's criticism is way over the top.

                                This blog post is very much "first principles" for the layperson. It's not the level of "first principles" that a trained physicist would expect (where there would be rigorous derivations involving dielectric functions and the like), but it's great for a layperson who wants to understand why the world looks the way it does.

                                • MangoToupe 20 hours ago

                                  Idk, empirical observations? A theory is certainly not a principle.

                                • deadbabe 10 hours ago

                                  This comment eliminated any motivation I had to read the original article.

                                  • MangoToupe 20 hours ago

                                    I think Musk was the first person I noticed to really abuse this phrase.

                                    Not that it's not a useful phrase—of course it is. But it seems like it's an abuse of what should be called "core agreed assumptions" or something.

                                    • godelski 18 hours ago

                                      Yeah he abuses a lot of phrases... He does provide a master class on psuedointellectualism though. Drops enough vernacular that layman think he's smart and even enough that experts might think they're in good company if they don't pay too close attention. But I think the biggest clue that it's fake is how dismissive he is of nuance and detail. It's such a classic defense from psuedointellectuals because they know if they venture into depth then the gig is up. Meanwhile, look at any two nerds arguing. It's always nuanced and over minute things that they'll always insist are very important (because often it is, but only at that level).

                                      • naasking 4 hours ago

                                        > Meanwhile, look at any two nerds arguing. It's always nuanced and over minute things that they'll always insist are very important (because often it is, but only at that level).

                                        Sorry, but no, nerds are huge bikeshedders, and often miss the forest for the trees. I think this also explains how dismissive you are of experts who have actually worked with Musk and don't seem to share your low opinion of his expertise in certain areas. Often the importance of nuance is overblown, as it typically only has third or fourth order effects that can be ignored in favour of focusing on the first and second order factors that dominate.

                                        • MangoToupe 3 hours ago

                                          > I think this also explains how dismissive you are of experts who have actually worked with Musk and don't seem to share your low opinion of his expertise in certain areas.

                                          It is difficult to get a man to understand something, when his salary depends on his not understanding it.

                                          ---

                                          I think there's also something of a "gell-mann amnesia" effect going on here. I could buy him being a manufacturing genius or whatever for a while because I know nothing about car or rocket manufacturing. But as soon as he bought twitter, I realized he was an absolute moron who had never built or successfully software himself in his life (or perhaps his brain had simply severely atrophied since his time at PayPal to the point he should be aware), but wanted to sling buzzwords as if he were a coder.

                                      • chermi 14 hours ago

                                        Lol apparently reasoning by analogy is first principles to him -- see human drivers using only vision therefore no lidar somehow being "first principles".

                                        • godelski 10 hours ago

                                            > see human drivers using only vision
                                          
                                          Which is such a naive assumption too! Do you not feel the road? Listen to the road? I mean you might not think you do the latter but I bet if you closed your eyes you could get a decent estimate of how fast you are going.
                                          • naasking an hour ago

                                            Maybe I missed it, but I've never seen him claim that using only vision is "first principles" thinking. However, relying only on vision can make sense once you realize that roads and signage and everything is literally designed around vision. Any system that does not prioritize vision cannot deal with unexpected obstacles, like new signage. If your vision is good enough to see obstacles and understand signage, the added usefulness of lidar relative to the cost seems pretty low, and if you don't have vision and have only lidar, then your system will not be flexible enough, and if you have lidar and vision, then your system will be more expensive than a system without lidar.

                                      • smusamashah 20 hours ago

                                        Love the detailed interactive visual explanations, https://samwho.dev/ is another one like Ciechanow.ski

                                        • avereveard 6 hours ago

                                          Related: creating a virtual camera and using blender path tracing to simulate light capture from a camera in virtual space https://youtu.be/YE9rEQAGpLw?si=2YArt9l95c7VUCqa

                                          • amelius 21 hours ago

                                            Webpage doesn't work in Firefox/Android.

                                            • imadr 21 hours ago

                                              I developed this article on firefox desktop and tested it on safari ios, and here I was thinking my testing was exhaustive! I just hope it’s not some obscure webgl bug on android

                                              Anyways thanks for the feedback I’ll look into it

                                              • danielbln 21 hours ago

                                                Can confirm, latest Firefox on S24 doesn't render the interactive elements. Chrome does, however, and it's a beautiful article.

                                                • codethief 9 hours ago

                                                  Weird, for me neither Firefox nor Chromium show any animations on Android. (Android 16, Chromium/Vanadium 140, Firefox 142)

                                              • sabellito 18 hours ago

                                                Works on mine.

                                                FF: 142.0.1

                                                OS: Android 15

                                                • all2 21 hours ago

                                                  Chrome seems to function, at first glance.

                                                  • godelski 21 hours ago

                                                    Seems fine on Firefox on Mac

                                                • jupitr 19 hours ago

                                                  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.

                                                  • imadr 18 hours ago

                                                    I wrote everything from scratch in javascript and webgl. You can check the entire source code of the article here: https://imadr.me/pbr/main.js

                                                    Beaware though, it's a 8000+ lines of code js file that is very badly organized, it's by no mean a reference for good quality code. However I find writing everything by hand easier in the long term than using already existing libraries for example.

                                                    The code includes all the math functions, mesh primitive generation, shaders and even a sketchy text renderer using sdf fonts.

                                                    If I had to make it again I would use typescript, type errors were the biggest source of bugs.

                                                    • amitp 2 hours ago

                                                      Love it! For typescript, esbuild has been my favorite tool for turning typescript into browser-readable js, and then I check type errors separately using the ide plugin.

                                                      • Cthulhu_ 8 hours ago

                                                        How long did it take you to write that code / this article?

                                                        I'm a big fan of zero-dependency code (or at the very least with any dependency vendored/hosted locally), it means this page will still work and look as it does today in 25 years time.

                                                        I don't know if TS runs natively in browsers yet, but v8 / NodeJS does support it (just strips off Typescript specific tokens).

                                                    • sidcool 7 hours ago

                                                      This is beautifully done. Thanks.

                                                      • snarfy 4 hours ago

                                                        You should add a section on polarization.

                                                        • prathje 19 hours ago

                                                          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.

                                                          • ingen0s 2 hours ago

                                                            Fantastic

                                                            • cubefox 3 hours ago

                                                              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".

                                                              • Eduard 18 hours ago

                                                                Android Chrome on Pixel 7a. None of the interactive demos show up. Just blank white.

                                                                • kelseyfrog 18 hours ago

                                                                  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.

                                                                  • corysama 16 hours ago

                                                                    There have been decades of research into generalized BRDF measurement of real materials. Usually it starts with capturing calibrated images of the combination of all camera angles and all lighting angles on the hemisphere.

                                                                    https://www.researchgate.net/figure/Picture-of-the-BRDF-meas...

                                                                    https://www.iosb.fraunhofer.de/en/projects-and-products/sig_...

                                                                    • imadr 17 hours ago

                                                                      If i’m not mistaken that’s in part how they came up with micro facet models, or at least to verify their accuracy. Take this paper for example https://www.cs.cornell.edu/~srm/publications/EGSR07-btdf.pdf

                                                                      Real life measures are also useful for inverse rendering.

                                                                      • kelseyfrog 16 hours ago

                                                                        Interesting link, thank you!

                                                                        It looks like a good model for lower incident angles but begins to diverse at higher angles. There's also one huge caveat - it relates the GGX model to real world ground glass. Obviously it's important to compare like to like. However, very few materials in the real world are ground glass.

                                                                        Looking around my surroundings, I see painted drywall, wood, paper, plastics, and textiles. It would seemingly be a mistake to assume each of these materials behaved optically like ground glass. I hope that similar measurements are carried out on other materials.

                                                                  • dabla 21 hours ago

                                                                    Love the attention to details,the read is seamless