3 ms·
How do you get it so clean? My renders have artifacts no matter how high I crank up the fidelity: https://github.com/brundonsmith/raytracer https://github.com/b
by _bxg1 7y ago
How do you get it so clean? My renders have artifacts no matter how high I crank up the fidelity: https://github.com/brundonsmith/raytracer https://github.com/brundonsmith/raytracer
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 7y agoThe 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). [0] https://github.com/Dalamar42/rayt/blob/fc57fa4afc080a578e21ececb153e6d717c9459f/src/world/materials/mod.rs#L103 https://github.com/Dalamar42/rayt/blob/fc57fa4afc080a578e21e... [1] http://graphics.stanford.edu/~boulos/papers/gi06.pdf http://graphics.stanford.edu/~boulos/papers/gi06.pdf [2] https://dl.acm.org/doi/10.1145/226150.226151 https://dl.acm.org/doi/10.1145/226150.226151
- Dalamar42 7y agoThe 3rd book [0] is primarily about implementing an MC ray tracer and then adding the techniques in the second paper you linked. That's what I've used in my code as well. I just skimmed through the paper and I think the book covers most of the material from the paper with the exception of spatial subdivision. I will have a more careful read later to see exactly what my implementation is missing from this. [0] https://raytracing.github.io/books/RayTracingTheRestOfYourLife.html https://raytracing.github.io/books/RayTracingTheRestOfYourLi...