I started this project last year when I was looking for something fun to learn Rust with and I had Peter Shirley's excellent Ray Tracing in a Weekend series of books recommended to me. In the process I got interested in learning ray-tracing for its own sake so I decided to finish all three books and I am now considering continuing this further on my own.
I am sharing in case this is useful to others who are on a similar path to where I was.
Really beautiful results. It’s interesting to see Ray Tracing’s durability. In the 90s it was so prohibitively expensive (computationally), that a whole bunch of techniques were developed to achieve realism in somewhat... hackier ways. Now we’re seeing GPU support, etc.
It's a spectral path tracer written together with my friend as part of our master's thesis. It's implemented in Futhark, which is a new language for GPU programming. It's a purely functional array language, and it's very ML-like. It makes GPGPU programming quite easy, and as far as we can tell, the optimizations are really good!
The author is actually preferentially sending samples towards "attractors" [0] for lights and dielectrics. Doing so massively reduces variance. My favorite example is Figure 5 in this old paper [1] (I've never actually read Pete's ray tracing in a weekend, so I don't know if this is in there).
The most common variance reduction technique though would be to do direct lighting (aka "next event estimation" if you want to be overly pedantic). Your lighting in that image looks like it's just a "Hi, I happen to be emitting tons of energy" sphere in space, which will cause a lot of noise. Alternatively, if you are sampling it, you are likely not sampling the sphere as well as you could. You'll want to sample the sphere following the setup in Figure 2 in Pete's "Direct Lighting" paper [2] (which as a reminder, is currently accessible at the ACM during Covid-19).
Hey. At the moment what is implemented is exactly what you are going to find in the three books of the Ray Tracing in a Weekend series. If I can find the time to continue this project, I am going to make a git tag for the current version for people who just want to use this while going through the books and I will also add a changelog for any changes I make from that point onward.
[+] [-] Dalamar42|5 years ago|reply
I started this project last year when I was looking for something fun to learn Rust with and I had Peter Shirley's excellent Ray Tracing in a Weekend series of books recommended to me. In the process I got interested in learning ray-tracing for its own sake so I decided to finish all three books and I am now considering continuing this further on my own.
I am sharing in case this is useful to others who are on a similar path to where I was.
[+] [-] drran|5 years ago|reply
[+] [-] gdubs|5 years ago|reply
[+] [-] pvg|5 years ago|reply
[+] [-] ddevault|5 years ago|reply
[+] [-] bryal|5 years ago|reply
It's a spectral path tracer written together with my friend as part of our master's thesis. It's implemented in Futhark, which is a new language for GPU programming. It's a purely functional array language, and it's very ML-like. It makes GPGPU programming quite easy, and as far as we can tell, the optimizations are really good!
[+] [-] boulos|5 years ago|reply
http://www.pbr-book.org/3ed-2018/contents.html
[+] [-] dagmx|5 years ago|reply
You might be interested in checking out the implementations of pbrt in rust too
https://github.com/wahn/rs_pbrt
[+] [-] Dalamar42|5 years ago|reply
[+] [-] _bxg1|5 years ago|reply
Edit: I just zoomed way in and I can see ever so slight bits of speckling :) Maybe I'm just not turning the bounce-ray count up high enough...
[+] [-] boulos|5 years ago|reply
The most common variance reduction technique though would be to do direct lighting (aka "next event estimation" if you want to be overly pedantic). Your lighting in that image looks like it's just a "Hi, I happen to be emitting tons of energy" sphere in space, which will cause a lot of noise. Alternatively, if you are sampling it, you are likely not sampling the sphere as well as you could. You'll want to sample the sphere following the setup in Figure 2 in Pete's "Direct Lighting" paper [2] (which as a reminder, is currently accessible at the ACM during Covid-19).
[0] https://github.com/Dalamar42/rayt/blob/fc57fa4afc080a578e21e...
[1] http://graphics.stanford.edu/~boulos/papers/gi06.pdf
[2] https://dl.acm.org/doi/10.1145/226150.226151
[+] [-] peterbraden|5 years ago|reply
[+] [-] kidintech|5 years ago|reply
[+] [-] Dalamar42|5 years ago|reply