Live data from Hacker News

Physically based rendering from first principles

imadr.me

51–60 of 97 posts

Re: Physically based rendering from first principles

#51
post #9

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 im…

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!

Re: Physically based rendering from first principles

#52
post #6

Earlier quoted context omitted.

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

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

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

Re: Physically based rendering from first principles

#53
post #44
post #21

Earlier quoted context omitted.

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 realisticall…

No, Feynman lectures won't get you there.

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

Re: Physically based rendering from first principles

#54
post #46

Earlier quoted context omitted.

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.

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.

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.

Re: Physically based rendering from first principles

#55
post #28
post #26

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.

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 m…

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

Re: Physically based rendering from first principles

#56
post #9

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 im…

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

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.

Re: Physically based rendering from first principles

#58
post #9

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 im…

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

Re: Physically based rendering from first principles

#60
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.

Post reply on HN