Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] Bug Reporting => [Max] Resolved Bugs => Topic started by: cecofuli on 2013-08-06, 14:29:46

Title: Noise in the DOF and Chrome object
Post by: cecofuli on 2013-08-06, 14:29:46
Hi,

I don't know if it's a bug or we have to wait some optimization.
But, this scene, believe me, it's very complex. Many spot lights (Meshlights, cause real Corona lights create a more noise) and strong indirect illumination from the skylight make me crazy.
By the way, I don't know why, there are a lot of noise, after 3 hours, only in DOF and chrome object. Like when I use sub-pixel mapping on in VRay...
I tried different setting (PTS = 4) but it doen't help me.
And, if I use  LSM= 1 ( Light  Samples multiplier)  I have a loooot of noise near the walls, where the lights emit "light"

(http://www.francescolegrenzi.com/Temp/Corona/0005_Noise.jpg)
Title: Re: Noise in the DOF and Chrome object
Post by: Ondra on 2013-08-06, 14:33:07
Out-of-focus higlights are very hard to render with the current version. You have to fake it (remove the higlights), and wait for adaptivity, which may *hopefully* help
Title: Re: Noise in the DOF and Chrome object
Post by: cecofuli on 2013-08-06, 14:33:33
This problem, remeber me my old project LINK (http://forum.corona-renderer.com/index.php/topic,722.msg5551.html#msg5551)
Title: Re: Noise in the DOF and Chrome object
Post by: cecofuli on 2013-08-06, 14:34:50
Out-of-focus higlights are very hard to render with the current version. You have to fake it (remove the higlights), and wait for adaptivity, which may *hopefully* help

Ahh, ok. So, we have to wait.. good to know =) Well, I don't spend more time on this problem.
Title: Re: Noise in the DOF and Chrome object
Post by: Captain Obvious on 2013-08-08, 22:13:05
I've found that bucket rendering is actually a lot more efficient for dealing with this type of noise. The bucket rendering in Corona does some adaptive sampling. It's not great, but it can help. The key thing to remember is that after a certain amount of time rendering, the total error (noise) in your image will be exactly the same regardless of whether you use adaptive sampling or not. The key thing about adaptive sampling is that you can focus the sampling on the noise that's more easily noticed. If an image is so clean that you can't spot any noise in it at all, except for one region of out-of-focus reflections, then Corona's progressive mode isn't going to do you any favours. While it is still technically reducing the error even in the "clean" pixels, you're not going to notice the difference. By using bucket mode, you can increase the noise in the less noisy region to instead reduce noise in the noisy regions. Basically evening out the noise profile.

Look at the two attached images. One is rendered in bucket mode, the other in progressive mode. Both images refined for five minutes. The bucket render has significantly less noise in the out of focus highlights, but is somewhat noisier in the flat regions of the image. Overall, I would say it's the more pleasing of the two. Look at them up close and decide for yourself.

The bucket render was done with 1:5 bucket steps, with a threshold of 0.05. Lowering the threshold will reduce noise in the less noisy regions, but increase noise in the noisier regions, because a lower threshold would catch more pixels for refinement, which means it will complete fewer passes.
Title: Re: Noise in the DOF and Chrome object
Post by: cecofuli on 2013-08-08, 22:19:54
Nice1 I have to try!
Ondra what do you think? =)
Captain Obvious, can you share your sipple scene. I prefer "to test" the same scene.
Did you try with very low PTS in progressive? Like 1 or 2?
Title: Re: Noise in the DOF and Chrome object
Post by: Ondra on 2013-08-08, 22:28:30
Ondra what do you think? =)

I think Captain Obvious obviously knows his shit, he is correct ;). There is some (very basic) adaptivity implemented for bucket rendering due to historical reasons (I had to do adaptivity to get some extra points for some school project ;)).
Title: Re: Noise in the DOF and Chrome object
Post by: cecofuli on 2013-08-08, 22:29:57
Very basic,  but it works! =) I have to try in my project ;-)
Title: Re: Noise in the DOF and Chrome object
Post by: Ludvik Koutny on 2013-08-08, 23:08:52
I've found that bucket rendering is actually a lot more efficient for dealing with this type of noise. The bucket rendering in Corona does some adaptive sampling. It's not great, but it can help. The key thing to remember is that after a certain amount of time rendering, the total error (noise) in your image will be exactly the same regardless of whether you use adaptive sampling or not. The key thing about adaptive sampling is that you can focus the sampling on the noise that's more easily noticed. If an image is so clean that you can't spot any noise in it at all, except for one region of out-of-focus reflections, then Corona's progressive mode isn't going to do you any favours. While it is still technically reducing the error even in the "clean" pixels, you're not going to notice the difference. By using bucket mode, you can increase the noise in the less noisy region to instead reduce noise in the noisy regions. Basically evening out the noise profile.

Look at the two attached images. One is rendered in bucket mode, the other in progressive mode. Both images refined for five minutes. The bucket render has significantly less noise in the out of focus highlights, but is somewhat noisier in the flat regions of the image. Overall, I would say it's the more pleasing of the two. Look at them up close and decide for yourself.

The bucket render was done with 1:5 bucket steps, with a threshold of 0.05. Lowering the threshold will reduce noise in the less noisy regions, but increase noise in the noisier regions, because a lower threshold would catch more pixels for refinement, which means it will complete fewer passes.

Didn't you have any problems figuring out bucket rendering? The control of bucket rendering sampling and how passes work is an illogical mess at the moment....
Title: Re: Noise in the DOF and Chrome object
Post by: cecofuli on 2013-08-09, 01:05:49
Mmm... I try in a simple scene. If I use Bucket mode (PT+HD) , with the last build, I see a green dots in the final render. If I use PT+PT everything is ok.
Title: Re: Noise in the DOF and Chrome object
Post by: Captain Obvious on 2013-08-09, 23:57:19
Didn't you have any problems figuring out bucket rendering? The control of bucket rendering sampling and how passes work is an illogical mess at the moment....
Yeah, it's not the best adaptive sampling I've seen. :-)

I'm not entirely sure what the "adaptive steps" does, but it seems that the total number of samples is base^2 * steps^2, so if you set the base to 1 and the steps to 5, you can get 25 primary samples per pixel, if they're noisy enough. It seems that Corona compares the pixels against the fully rendered image rather than just the pixels produced in the current pass, so when you use bucket rendering with adaptive sampling, each pass will take a little bit less time than the one before (because there are fewer noisy pixels).


Also, I had some problems with PT+HD, where you could see differences between the buckets. Not sure what was causing that. It was fine with PT+PT. I haven't tried the latest build though.


Edit: attached the scene.

Edit again: Sorry, I just realized I'd actually changed the bucket settings... The scene attached uses 1:3 with a threshold of 0.15. Those aren't good settings.
Title: Re: Noise in the DOF and Chrome object
Post by: Ludvik Koutny on 2013-08-12, 19:13:28
Well, buckets are a bit tricky now.

Basically you first set amount of AA subdivs, which defines how many samples are used for refinement per pixel.

Then you set an adaptive threshold which defines how big a difference needs to be for oversampling to occur.

Then you set adaptive steps. Each adaptive step re-renders bucket again refining it even further using the threshold you have set above. So if you have AA subdivs at 2, and adaptive steps at 2, then bucket will be initially rendered subdividing each pixel 2*2 times (4 subdivisions total), and then refined once more, but this time, only pixels pixels that fall above adaptive threshold will be refined using subdiv AA value.

So if you have subdiv AA at 4, and adaptive steps at 4, then you will render bucket initially using 16 samples per pixel, and then refine it adaptively 3 more times using same value.

But there are some big issues. In the current state, bucket rendering is also controlled by passes, which are hard to define in terms of bucket rendering and therefore do not make much sense. You can not exactly set when bucket rendering will stop, and it is just illogical overall.

Also, all adaptive steps are currently rendered during a first pass, so if you have steps at 4, then they will render 4 times and then it continues to the next bucket. Which is slow if you have some higher settings, and you have to wait really long to have some visual feedback.

My proposal is that bucket rendering will be totally disconnected from any pass limitations, so it will simply stop rendering once it is done, and also that adaptive steps will render progressively, so that entire image will be first rendered using initial step, and then subsequently refined adaptively by the amount of adaptive steps set up. This would make more sense and mainly give faster visual feedback.

I really think this is at least temporary way to go before adaptive sampling is implemented for progressive, but i am having quite a hard time convincing Keymaster so :)