---
title: 'The Algorithm That Made Me Cry'
source: 'https://youtube.com/watch?v=XL5bq8DRn64'
video_id: 'XL5bq8DRn64'
date: 2026-07-24
duration_sec: 470
channel: 'Two Minute Papers'
---

# The Algorithm That Made Me Cry

> Source: [The Algorithm That Made Me Cry](https://youtube.com/watch?v=XL5bq8DRn64)

## Summary

The speaker shares a personal and emotional journey with ray tracing, a light transport simulation technique that can produce photorealistic images. He explains that even with a perfect system, the initial results are noisy and require many samples to converge to a clear image, teaching a valuable life lesson about persistence.

### Key Points

- **Ray Tracing Superpower** [00:00] — Ray tracing can simulate reality by tracing light paths, producing realistic images without AI.
- **Initial Failure** [00:43] — With only one sample per pixel, the image is extremely noisy and looks terrible.
- **Convergence to Beauty** [01:09] — After many samples (e.g., 10,000), the image becomes clean and photorealistic.
- **Life Lesson** [01:24] — Even with a perfect system, initial results may seem broken, but persistence pays off.
- **Free Course** [06:48] — The speaker offers a free master-level course on ray tracing from scratch, including physics and coding.

### Conclusion

Ray tracing demonstrates that perfection requires patience and many iterations. The speaker provides a free course to help others experience the joy of creating such simulations.

## Transcript

I learned a really important life lesson&nbsp; during my research. You see, I do this kind of&nbsp;&nbsp; thing. This is ray tracing, or a light transport&nbsp; simulation as we call it. And it has a superpower:&nbsp;&nbsp;
what is that? Well, it can simulate reality! Yes.&nbsp; This is really possible - no AI needed at all. You can give it a scene, and it will simulate&nbsp; the path of light rays bouncing around,&nbsp;&nbsp;
and give you an image of what that&nbsp; scene would look like in reality.&nbsp; It is absolutely insane that&nbsp; we can do that. I love it. But wait, not so fast. Even if you do it&nbsp; perfectly, at first, this is what it looks like.&nbsp;
Oh my, this is terrible. What is going&nbsp; on? Well, that is the life lesson.&nbsp;&nbsp; This was just simulating one ray going&nbsp; through each of these pixels. That is what&nbsp;&nbsp;
we call one sample. One sample is not enough. If you do two samples, you get something like&nbsp;&nbsp; this. Better? Maybe a bit. A hundred samples?&nbsp; Getting better, but still, a long way off.&nbsp;
we get the beautiful final image. When you&nbsp; first do it, it is a very emotional moment.&nbsp; When we started, I thought this would&nbsp; be impossible, and yet here it is.
So here is two things I’d like to share with you:&nbsp; one is a life lesson that I learned. Even if you&nbsp;&nbsp; have the perfect system, at first, it might&nbsp; seem that it does not work at all. But you&nbsp;&nbsp;
have to keep at it. And it may take a long time. And two, I’d love to share this feeling with you,&nbsp;&nbsp; but it’s impossible, because when you&nbsp; first succeed, it is beyond words.
But wait, I think I found a way to actually share&nbsp; this feeling with you. Through a song. A popular&nbsp;&nbsp; request from you Fellow Scholars, so here it&nbsp; is. And if you watch until the end of the video,&nbsp;&nbsp;
I’ll give you something so you can also create&nbsp; a simulation like this yourself for free. Alright, with that said, this&nbsp; is Károly and The Papers.
That was so much fun, I hope you enjoyed&nbsp; it as much as we did. I am not sure if I&nbsp;&nbsp; ever heard a song written about ray tracing.&nbsp; Alright, I promised you something. And it is&nbsp;&nbsp;
for free. I taught this master level course&nbsp; at the Technical University of Vienna, and I&nbsp;&nbsp; think knowledge should be for free for everyone.&nbsp; So it’s not like the courses you see elsewhere,&nbsp;&nbsp;
it is completely free, in fact you can’t even pay&nbsp; for it even if you wanted. Although this Fellow&nbsp;&nbsp; Scholar was hilarious. Alright, so in this one,&nbsp; I try my best to teach you the physics of light,&nbsp;&nbsp;
and then we code up a simulation&nbsp; program together, from scratch. Enjoy!
