Hello, first time poster here. It seems like this is the only ray-tracer development community around!
In my spare time, I'm reading PBRT and developing a ray/path/hacktracer of my own. Using the book for a mathematical and technical foundation but then trying to apply my own ideas.
Recently I've implemented Multiple Importance Sampling for the sampling of surfaces. I do this by, on each intersection, sampling both a random direction from the BRDF and also sampling a random light, then combining both using the power heuristic.
When I have only a single light, the results are beautiful. Whereas previously I had this:
Now I have this, with the same amount (1024 per pixel) of samples:
So the algorithm seems to work well. The problem is when I add a second light source to the scene, the noise comes back! This is a render with a second light source. Even though it uses 4096 samples per pixel it is significantly noisier:
I am probably using the technique incorrectly. Perhaps I need to sample all light sources at once, instead of randomly picking one like I'm doing now? That doesn't seem like it would scale well as the number of lights go up, however. The implementation was loosely based on pbrt's DirectLightingIntegrator, and I suspect the reason why it doesn't work properly is that I also have multi-bounce indirect lighting. You can see my core integration function here: https://github.com/yuriks/NoiseRay/blob ... n.cpp#L174
2 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest