View topic - Experiments with noise detection and control

Experiments with noise detection and control

Users-contributed CVS development builds. Post here your questions about compiling the source code.

Experiments with noise detection and control

Post Thu Nov 19, 2015 6:13 am

Hello,

After a request from samo I have been experimenting new ways of detecting and controlling noise in YafaRay, as well as new ways of doing the progressive AA passes.

So, I've prepared a "prototype" with a proposal for new options for noise detection and control so you can evaluate the new options and give me feedback.

Windows 64bit build (added 2015-11-21):
https://github.com/DavidBluecame/YafaRa ... 064bit.zip

Linux 64bit build:
https://github.com/DavidBluecame/YafaRa ... 064bit.zip

This is NOT a "release", it's only for developer/advanced user testing. These options are optimized for Photon Mapping for the time being, possibly not working so well (or at all) in other integrators...

All the new options are in the AntiAliasing panel:

* Clamp samples: it clamps the RGB value for all the samples to the maximum value set in this parameter. Value 0 disables the clamping. I made a new clamp function that does not just clamp the RGB values. To preserve color information as much as possible, I'm clamping the maximum of the RGB values and proportionally scale the rest.

* Clamp indirect: it clamps only indirect light such as Final Gather or Caustics.

If more than 1 pass is selected, you will also have the next new/modified parameters:

* Resampled floor is now in % of the total pixels, so you don't need to calculate how many pixels you want to keep resampling as a minimum. This function allows you to set a certain AA threshold as usual, but if the amount of resampled pixels go below the Resampled Floor value, the AA threshold will automatically decrease before the next AA pass. This should help reducing noise in progressive AA.

* Color noise detection: if not checked, noise and edges are detected as before (by comparing brightness between a pixel and its neighbours). If checker, it will also compare the individual color RGB components. Checking it will be equivalent to lower the AA threshold a bit, and it will also be more sensitive to noise caused by pixels with similar brightness but different hue.

* Dark areas noise detection factor [0.0 - 0.8]. If this factor is 0.0, noise detection will work as usual. If you make it bigger ( up to 0.8 ) it will lower the AA threshold for the darker pixels proportionally to the pixel brightness. This should allow to reduce noise better in dark areas, but it will take more time to reduce the noise in bright areas.

Variance:

I've added a new experimental way of detecting noise by creating a window around each pixel, and evaluating how much color variance there is in that window. If there are more variancing pixels than a certain variance pixels amout, the entire window is marked for resampling for the next AA pass. You could setup this feature by setting:

* Variance Window: size of the edge of the variance detection window
* Variance pixels: amount of pixels with color variance that trigger the resampling of the entire variance window for the next pass. If set to "0" the variance function would be disabled.


Multipliers:

I've added three sample multipliers, one for the AA samples, another for Lights and another for indirect samples (like FG). The idea is that every AA pass will be done as follows:

- Effective AA Samples = AA samples set in the AA window * internal AA multiplier
- Effective Lights Samples = samples set in the Light definition * internal Light multiplier
- Effective Indirect Samples = samples set in the Final Gather for example * internal Internal multiplier

We cannot control directly the value of these multipliers, but we can set how do we want them to evolve from one AA pass to the next. For example if we setup:

- AA Sample multiplier factor = 2.0.

This will cause the multiplier to grow exponentially as:

PASS 1: AA multiplier = 1.0
PASS 2: AA multiplier = 2.0
PASS 3: AA multiplier = 4.0
PASS 4: AA multiplier = 8.0
etc

This would allow us to increase the number of samples automatically from one pass to the next, even exponentially (something that samo mentioned to me he would like to experiment with).

I've limited those multiplier factors to be in the range: 1.0 (multiplier does not change, normal behavior) to 2.0 (exponential). I didn't allow more than 2.0 because it would grow too quickly. I would try values around 1.01, 1.1, etc. They would allow a progressive increase of the samples but not too quickly...


I have to leave now and I have not time to provide examples, but I will try to provide examples over the next days. Please feel free to experiment with this "prototype" but do not use it for production work yet...

Please let me know how it goes.
Last edited by David Bluecame on Sat Nov 21, 2015 5:37 am, edited 1 time in total.
User avatar
David Bluecame
 
Posts: 460
Joined: Mon Jan 21, 2013 12:42 pm
Location: Spain

Re: Experiments with noise detection and control

Post Sat Nov 21, 2015 3:09 am

Amazing! Thank you David! :D

Looking forward to a Windows build and to the evolution of this branch.
User avatar
afecelis
 
Posts: 384
Joined: Fri Aug 19, 2005 1:17 am
Location: Colombia

Re: Experiments with noise detection and control

Post Sat Nov 21, 2015 5:36 am

Hello,

Windows 64bit build of this prototype here (editing first message to include this link as well):

https://github.com/DavidBluecame/YafaRa ... 064bit.zip

Please let me know what you think about the new features.
User avatar
David Bluecame
 
Posts: 460
Joined: Mon Jan 21, 2013 12:42 pm
Location: Spain

Re: Experiments with noise detection and control

Post Mon Nov 30, 2015 6:05 am

Hello David,
I see that post only now. I'll surely test it with my upcoming project.

I'm sure also that you could test with the file I sent you. It now takes at least 15 to 20 passes to get rid of the noises as the floor is glossy.

Thanks again.
flagus
 
Posts: 120
Joined: Tue Nov 03, 2009 6:45 am


Return to Testing Builds



Who is online

Users browsing this forum: No registered users and 4 guests

cron