Better HN
topnewbestaskshowjobs
Log inSign up

imadr

715 karma · joined May 21, 2020 (6y ago) · 73 submissions

Software developer, I love graphics programming, procedural generation, game dev, making interactive tutorials Checkout my website https://imadrahmoune.com
Submissions

comment 4w ago · link · parent

Misunderstood your question sorry, I have no idea!

comment 4w ago · link · parent

P=NP -> 3SAT has a polynomial time algorithm

P=/=NP -> 3SAT has no polynomial-time algorithm

ETH is true -> 3SAT has no subexponential time algorithm

ETH is false -> 3SAT has a subexponential time algorithm

------

ETH true -> P=/=NP

ETH false (!!!) -> P ?= NP remain unsolved

comment 1mo ago · link · parent

What part of "math is the process of humans understanding math" did you not understand or agree with?

4.

Bullshit arguments about AI (not) replacing jobs (2023)(imadrahmoune.com ↗)

2 points · by imadr · 2mo ago · 1 comment

comment 5mo ago · link · parent

Is no one tired else of these repetitive, obviously Claude-made webdesigns?

comment 8mo ago · link · parent

Is it the em dashes? I didn't get the feeling it was AI generated at all

7.

Building a Procedural Hex Map with Wave Function Collapse(felixturner.github.io ↗)

580 points · by imadr · 8mo ago · 86 comments

comment 9mo ago · link · parent

Yes and? Let's suppose your statement is 100% true, I genuinely don't see the point of these kinds of comments.

Why every time some person/group of people enact an anti-LLM policy in their project, other people feel the personal need to stress how useful LLMs are and how that project is bound to fail if they don't use it?

Postmarketos clearly exists and works, EVEN if LLMs were absolutely perfect for speeding up development ten folds, is there any absolute moral necessity to use them?

Also isn't this just moving the goalpost that LLM fanatics love to point out?

comment 10mo ago · link · parent

I like your style! Reminds me of https://usgraphics.com/

comment 10mo ago · link · parent

What does this even do? Read most of the page but still didn't understand the project actually is

comment 1y ago · link · parent

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!

comment 1y ago · link · parent

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

comment 1y ago · link · parent

I took me about 3 months working on it on and off, it amounts to about 3 weeks of full time work. For my other projects I'm just writing everything to a single typescript file and compiling it with tsc, works like a charm and zero dependencies!

comment 1y ago · link · parent

Yes, in rendering when we talk about “diffuse” reflection we implicitly mean fuzzy reflections due to light penetrating the material and exiting a small distance away from the entry point (less than a pixel far)

The term subsurface scattering is used for light that exits further away (more than a pixel) like in simulations of human skin

However that part of the article isn’t clear enough and warrants a rewrite

comment 1y ago · link · parent

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.

comment 1y ago · link · parent

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.

comment 1y ago · link · parent

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/

comment 1y ago · link · parent

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.

comment 1y ago · link · parent

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/

comment 1y ago · link · parent

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

comment 1y ago · link · parent

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

22.

Physically based rendering from first principles(imadr.me ↗)

290 points · by imadr · 1y ago · 92 comments

comment 1y ago · link · parent

And it shouldn't need to. Making (relatively) simple changes like checking-in fixed versions of dependencies in the code base and abstracting away core logic from the platform layer goes a long way. This works well for video games

comment 1y ago · link · parent

I haven't used Rust extensively so I can't make any criticism besides that I find compilation times to be slower than C

25.

Undefined Behavior in C and C++ (2024)(russellw.github.io ↗)

101 points · by imadr · 1y ago · 233 comments

comment 1y ago · link · parent

The model has multiple layers which are basically a giant non-linear equation to predict the final shaded pixel, I don't see how it's inherently difference from a shader outputing a pixel "at once".

Correct me if I'm wrong, but I don't see how you can simulate a PBR pixel without doing ANY pbr computation whatsoever.

For example one could imagine a very simple program computing sin(x), or a giant multi-layered model that does the same, wouldn't it just be a latent, more-or-less compressed version of sin(x)?

comment 1y ago · link · parent

Don't you think a sufficiently advanced model will end up emulating what normal 3D engines already do mathematically? At least for the rendering part, I don't see you can "compress" the meaning behind light interaction without ending up with a somewhat latent representation of the rendering equation

28.

Do photons take all paths or not?(physics.stackexchange.com ↗)

4 points · by imadr · 1y ago · 1 comment

29.

How Apple's Liquid Glass (probably) works(imadr.me ↗)

8 points · by imadr · 1y ago · discuss

comment 1y ago · link · parent

> So, I don't think you can make a name for yourself by blogging alone

Or maybe you could if you post bangers like https://ciechanow.ski/

Nice blog either way!

123