Live data from Hacker News

Physically based rendering from first principles

imadr.me

81–90 of 97 posts

Re: Physically based rendering from first principles

#81
post #45

Earlier quoted context omitted.

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

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

Let's get something out of the way, just to make sure we're able to continue. Do you agree that his tweet saying lidar can be inaccurate and mess up results compared to cameras only is idiotic? Do you think Elon really believes that tweet?

If so, do you think he's stupid? Do you think he thinks sensor fusion is a grand unsolved problem his cracked engineers can't implement?

I absolutely agree vision is very very important, given the roads + signage are designed for humans using their eyes among other factors.

Do I think we should take the abilities of human drivers with eyes as the gold standard for what we can achieve with autonomous vehicles? No, and I doubt he does either, but his ego can't backtrack. In fact, I'm pretty sure he finally accepted radar.

Do I believe that looking at humans driving and saying "they do it just their eyes (they don't) so we should!" is an example of his acclaimed first-principles reasoning ability? No, I think its shallow reasoning by analogy.

Also, I'm not aware of anyone going or championing full lidar. It was only musk who (apparently) believes more than one type of sensor is a negative.

What really gets me is that musk, the man who's proven just how good he is at scaling & supply chain, somehow didn't think lidar wouldn't dramatically come down in cost.

My most charitable interpretation is that he really saw the value in gathering as much data about driving as fast as possible, and the best way to do that was to build a bunch of cars with just cameras.(Smart) Somewhere along the way he got annoyed or jealous of the lidar-incorporating companies that were doing quite well with autonomy. Then some ego thing happened and he got ahead of his skis and said vision-only is the best(dumb) and his ego/brand value won't let him take it back.

I admire the hell out of musk based on his output, so I choose to believe that he can't possibly be stupid enough to not understand sensor fusion.

Oh back to the original subject. If he's never said that vision-only is first principles, I apologize for the misinformation. But you have to admit that the "reasoning" of saying humans can drive with vision only therefore no other sensors is quite firmly outside the realm of first principles, which is his m.o.

Re: Physically based rendering from first principles

#82

Earlier quoted context omitted.

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

Lidar is cheap now. But no, roads are not designed with just vision in mind. Designers use tecture not just for grip but to help communicate things to the driver. There's many subtler ones, but the most obvious one is the grooves you often find on the edge of highways that are used to warn you if you're veering off. This vibrates the car and creates a loud noise. That's two more senses that you're constantly using wh…

> Designers use tecture not just for grip but to help communicate things to the driver. There's many subtler ones, but the most obvious one is the grooves you often find on the edge of highways that are used to warn you if you're veering off.

This is a red herring. None of these feedback mechanisms existed for decades of driving. The core problem of driving is vision and everything else is just gravy. If lidar can't solve all of the vision issues, which it can't, then it makes perfect sense to ask whether vision can cover lidar's purposes and thus whether having both is actually useful. Focusing on lidar is ignoring the core issue.

Re: Physically based rendering from first principles

#83
post #81

Earlier quoted context omitted.

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

Let's get something out of the way, just to make sure we're able to continue. Do you agree that his tweet saying lidar can be inaccurate and mess up results compared to cameras only is idiotic? Do you think Elon really believes that tweet? If so, do you think he's stupid? Do you think he thinks sensor fusion is a grand unsolved problem his cracked engineers can't implement? I absolutely agree vision is very very impo…

I don't know what exactly Musk said on the topics you raise, I only know that he did say something like vision being the core problem and that lidar can't solve that problem (nor can any combination of other sensors we currently have). It makes sense to focus on vision and to question the value add of lidar, because if you can solve vision then many other sensors are redundant.

Maybe it can't be solved using current tech, who knows, but saying that fully autonomous driving in our current world isn't achievable without vision is a correct position. I have no opinion on anything else.

Re: Physically based rendering from first principles

#84

Earlier quoted context omitted.

I'm not sure what you exactly mean. But if you are interested in the problem in general I think any book on computational physics will make you quickly face this constraint. There's a reason people love first order methods like Euler but why second or higher order methods are needed in other situations. Or maybe you could look at second order gradient descent methods as they apply to machine learning (add "Hessian" t…

Touching on what you were saying about accuracy converging like a log-like curve while computation increases exponentially, do you have an example where increasing computational resources by ten times leads to, say, only a 20% improvement in accuracy?

What I said before is a bit handwavy so I want to clarify this first. If we make the assumption that there is something that's 100% accurate, I'm saying that your curve will typically make the most gains at the start and much less as at the end. There can be additional nuances in this when discussing the limitations of metrics but I'd table that for your current stage (it is an incredibly important topic, so make sure you come back to it. You just need some pre-reqs to get a lot out of it[0]).

So maybe a classic example of this is the infamous 80/20 rule. You can read about the Pareto Principle[1] which really stems from the Pareto Distribution, which is a form of a Power Distribution. If you're looking at the wiki page for the Pareto Distribution (or Power Law), you'll see the shapes I'm talking about.

A real life example of this is when you train a machine learning model. Let's take accuracy for just simplicity. Let's look at PyTorch's example on using Tensorboard since that includes a plot at the very end[2]. Their metric is loss, which in this case is the inverse accuracy. So Accuracy is 0-100 (0 to 1) where higher is better, loss is just 1-accuracy, so 0 means perfectly accurate. From 0-2k iterations, they went from 1 to 0.6 (a 0.4 gain). Then at 4k iterations they are at a 0.4 loss (a 0.2 gain over 2k iterations). You see how this continues? It is converging towards a loss of 0.2 (accuracy = 80%). This is exactly what I'm talking about. Look at your improvements over some delta (in our case loss/(2k iterations)). It's a second order effect here, meaning it's non-linear.

This nonlinearity shows up everywhere. Going back to the 80/20 rule, it is often applied to coding. 80% of code is written using 20% of the time, but 20% of the code is written with 80% of the time. This should make sense as there are different bottlenecks. We'd be naive to just measure by lines of code (see [0]). A lot of time is spent on debugging, right? And mostly debugging just a few key areas. The reason this is true can derive from a simple fact: not all lines of code are equally as important.

So the other example I mentioned in the previous comment is Fourier Series[3]. That wiki has some nice visualizations and you'll be able to grasp what I'm talking about from them. Pay close attention to that first figure, the middle plot (image 2/17). These are different order approximations to a square wave. Might be hard to see, but as the more complex the wave (higher order) the better approximation you get to that square wave. Pay close attention to the calculations. Do a few yourself! How much work goes into calculating each term? Or rather, each order of approximation. I think you'll get the sense pretty quickly here that every higher order calculation requires you to also do the lower order ones.

As a more realistic example I am the creator of a state of the art image generator (I won't say which one to maintain some anonymity). When training my model the score quickly improves and really only a small amount of time. This training run took approximately 2 weeks wall time (what the clock says, not the GPU). Most of the improvement (via metric) took place in the first 6hrs. I was >90% of the way to my final score within the first day. If you look at the loss function in full, almost everything looks flat. But if you window it to exclude the first 24hrs, the shape reappears! There's a fractal nature to this (Power Distribution!). To put numbers to this, my whole run took 1M iterations and my final score was ~4.0. My first measurement was at 5k and was 180. My next measurement was at 25k and at 26. 15@50k, 9@100k, 6.8@200k, 5@500k, and so on. This is very normal and expected. (Then there's the complexity of [0]. Visually the images improved too. At 5k they were meaningless blobs. By 100k they had the general desired shape and even some detail appeared. By 500k most images resembled my target. At 800k I had SOTA but had could tell things were off. By 1M I thought there was a huge visual improvement from 800k but this is all down to subtle details and there are no measurements that can accurately reflect this)

I am happy to answer more but you're also asking about a complex topic with a lot of depth. One I absolutely love, but just giving you a warning :)

[0] The super short version is no matter what measurement you take you are using a proxy. Even a ruler is a proxy for a meter. It isn't exact. When measuring you approximate the measurement of the ruler which is an approximation of the measurement of a meter. This case is typically very well aligned so the fact that it is a proxy doesn't matter much (if you include your uncertainties). This isn't so simple when you move to more complex metrics like every single one you see in ML. Even something like "accuracy" is not super well defined. Go through a simple dataset like CIFAR-10 and you'll find some errors in labels. You'll also find some more things to think about ;) Table this for now but keep it in the back of your head and let it mature.

[1] https://en.wikipedia.org/wiki/Pareto_principle

[2] https://docs.pytorch.org/tutorials/intermediate/tensorboard_...

[3] https://en.wikipedia.org/wiki/Fourier_series

Re: Physically based rendering from first principles

#85
post #54

Earlier quoted context omitted.

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

> learning string theory first is ... not that stupid I disagree, it would be stupid to start with ST. I think you're making judgements without fully understanding what the conclusions entail. This requires so much more complexity that doesn't matter for 99.9% of things. We leverage emergence because it allows us to drop complexity at different levels. For a different look maybe check out Wolfram's Metamathematics, s…

Thanks a lot for again answering, i'm always open to correction and further hints. Wolfram Metamethematics sounds really cool and captures what i think about structure before data - i'll certainly have a look and try to bridge it to my category theory understanding.

I wrote an n-dim engine based on graphs -> 4D tree -> rendering you might like as it would basically support any ruleset and honestly after getting there orientation personal for me died down so maybe me talking without not much academic background is a way to find further pointers.

The choice of words for "first principles" is misleading, granted, but the discussion about what these are might be less fruitful than encouraging the author to stay at it and keep it constructive criticism.

Re: Physically based rendering from first principles

#86

Earlier quoted context omitted.

Touching on what you were saying about accuracy converging like a log-like curve while computation increases exponentially, do you have an example where increasing computational resources by ten times leads to, say, only a 20% improvement in accuracy?

What I said before is a bit handwavy so I want to clarify this first. If we make the assumption that there is something that's 100% accurate, I'm saying that your curve will typically make the most gains at the start and much less as at the end. There can be additional nuances in this when discussing the limitations of metrics but I'd table that for your current stage (it is an incredibly important topic, so make sur…

Thanks for all of that!

If you don't mind, could I talk about it with you more over email? My email address is listed in my profile.

Re: Physically based rendering from first principles

#87
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…

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

Re: Physically based rendering from first principles

#88

Earlier quoted context omitted.

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.

So then, why use that phrase and not a more accurate one?

Because it's a widely used phrase that everyone understands.

What the "first principles" are for a layperson and a physicist are different, as is the expected level of rigor in the derivations.

Re: Physically based rendering from first principles

#89
post #12

Earlier quoted context omitted.

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…

no, the first principles could be reduced to the domain that you're working in, which in this case would be non-relativistic physical optics. that is, the description of electromagnetic waves using maxwells equations. these could be considered true first principles for this problem domain. you don't need to go to quantum physics or general relativity for everything, that would mean that a description from first princ…

I definitely agree with you that the article lacks mathematical rigor, it's something I'll try to improve in the future. Thanks for the feedback!

Re: Physically based rendering from first principles

#90

Earlier quoted context omitted.

Lidar is cheap now. But no, roads are not designed with just vision in mind. Designers use tecture not just for grip but to help communicate things to the driver. There's many subtler ones, but the most obvious one is the grooves you often find on the edge of highways that are used to warn you if you're veering off. This vibrates the car and creates a loud noise. That's two more senses that you're constantly using wh…

> Designers use tecture not just for grip but to help communicate things to the driver. There's many subtler ones, but the most obvious one is the grooves you often find on the edge of highways that are used to warn you if you're veering off. This is a red herring. None of these feedback mechanisms existed for decades of driving. The core problem of driving is vision and everything else is just gravy. If lidar can't…

  > This is a red herring. None of these feedback mechanisms existed for decades of driving
Sorry, I want to make sure I understand you correctly.

Are you claiming humans didn't have the sense of sound nor the sense of touch until relatively recently?

Or are you claiming that as soon as someone enters a car these senses go away?

Are you arguing you can't hear things while in a car? Windows up? Windows down? In an open car like a convertible, jeep, or a model T?

Are you arguing that you don't feel bumps in the road?

Are you arguing you can't tell the difference between driving on asphalt vs concrete?

I think we're done here because you need to get an EKG as soon as possible.

Post reply on HN