Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
The Secret Life of Photons: Simulating 2D Light Transport (benedikt-bitterli.me)
76 points by davidbarker on Nov 15, 2015 | hide | past | favorite | 11 comments


Extremely well written article. I loved the last section on avoiding antialiasing.

I saw a talk about four years ago on using one ray from the light source to a point (through a complicated scene) to efficiently find lots of nearby paths. The idea was to use 'fireflies' to find other rays and so light the whole area accurately. This allowed them to efficiently render scenes where the light source was very indirect, light the light in another room lights your dark room through the open doorway but most of the light from the source never makes it anywhere close to our scene. It was all a clever application of the inverse function theorem, in a sense.

I'm reminded of it mostly because they had a wonderful demonstration in 2D where you could drag a light path through a scene of a bunch of dielectric lenses, etc and have it find a nearby path matching how you dragged it. Was very fun to see the paths so clearly.


Ah, you're most likely talking about Wenzel Jakob's wonderful 2D tool for demonstrating Manifold Walks.

Wenzel was actually one of my thesis advisors, and his tool was the inspiration behind this project. :) I was writing an implementation of Manifold Walks out of personal interest and reproduced his 2D tool for debugging purposes. Eventually I realized that caustics in 2D actually look kinda neat, so I spent some time doing research and then fleshed it out into this article + demo.


Yes, it was definitely Wenzel Jakob's work. Do you know if he has that demo available online? I couldn't find it on his webpage.


I don't think he ever released it. It would definitely be very cool to play around with though.


This is great stuff, easy to follow along even for a dabbling novice like myself. I've always been interested in simulating light, and wrote a paper (and shader) in high school about simulating sub-surface light scattering effects. I remember when I had saved up enough money to buy H. W. Jensen's book on photon mapping, and spending countless nights trying to decipher what it said. It's actually a very good book, but the maths was way above my head in high school – still is, actually.

Any way, great work, and beautiful demo! I've spent more time playing with it now than I should have, and work is suffering for it. I regret nothing! :o)


Jensen's Photon Mapping was also my very first exposure to light transport theory - I was in high school too and got the book as a Christmas gift. The math was way beyond me at the time, but it was the first time I realized computer graphics actually had some substance and wasn't just about making triangles fly around funny. Definitely a very influential book for me :)


Beautiful! the only thing I am missing is the ability to construct own setup online (e.g. adding a few lenses, with specified curvatures).


Unfortunately, that's not possible in the current version - originally I had a demo with larger scope in mind, but WebGL turned out to be a lot more limited than I expected.

I wasn't able to implement an acceleration structure in WebGL, so the amount of primitives it can trace in real-time are quite limited, and all scenes had to be hardcoded in GLSL. This makes modifying scenes a real pain, since adding a new primitive amounts to generating and compiling new shader code.

The original C++ version just constructs the scene from very small (~1px long) line segments and then builds a BVH acceleration structure over them, so you have practically unlimited freedom in the type and number of primitives. Unfortunately traversing a BVH inside a shader in WebGL is almost not doable, so I had to improvise.


(I assume you're Benedikt.)

This is beautiful work. Especially the write-up. I think we all understand the urge to code, but your desire to take the next step and describe what you've done is fantastic. Thanks for the gift.

This reminds me of those optics tables you see in museums, in the hands-on section for kids. Where they'll have a table with a rectangular inset, and in it will be light sources and prismatic pieces of Plexiglas that you can move around. You see the light tracing paths and scattering.

I've played with these setups and find them disappointing. If these museums instead had tables with touch displays, they could run software like yours. Of course they could also run other apps and anything that runs on a phone, so maybe that ruins the whole "this is special because it's in a museum" feel.


for a similar interactive demo here is an old hn post: https://news.ycombinator.com/item?id=8335581


Just re-rendered the Dark Side of The Moon cover with your prism mode in 4k. Thanks for the new desktop wallpaper. :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: