Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] Feature Requests => [Max] Resolved Feature Requests => Topic started by: Richy on 2013-07-01, 11:24:38

Title: Render Adaptive sampling?
Post by: Richy on 2013-07-01, 11:24:38
I think render adaptive sampling could cut render times significantly.
Title: Re: Render Adaptive sampling?
Post by: racoonart on 2013-07-01, 12:10:40
Yes, I'm constantly bugging keymaster with that and he told me this would come - but it may take some time though ;) .
Title: Re: Render Adaptive sampling?
Post by: Richy on 2013-07-01, 12:13:45
Awesome! :D
Title: Re: Render Adaptive sampling?
Post by: racoonart on 2013-07-01, 12:19:17
I'm btw more concerned about nasty noise in specific  (dark, hard-to-reach) areas which could be far better resolved if just rendering those and not "oversampling" each and every pixel in the image.
Title: Re: Render Adaptive sampling?
Post by: maru on 2013-07-01, 13:46:14
We are all waiting for this. With adaptive sampling Corona would be a real monster. I can imagine a huge speed up in interior renders where you have big flat surfaces like walls.
Title: Re: Render Adaptive sampling?
Post by: Ondra on 2013-09-13, 21:29:19
Some basic version is now implemented in both progressive and bucket renderers
Title: Re: Render Adaptive sampling?
Post by: maru on 2013-09-16, 15:43:38
I need some help on what happens when rendering with progressive renderer with adaptivity on.

For example:

I set path tracing samples to 8

and in adaptivity tab: recalculate every: 1, adaptivity amnt: 4, threshold: 0,03

This means:

1st pass - 8 samples per pixel
2nd pass - check pixel difference (with how many samples? 8?), if it's lower than 0,03 then don't refine, if it's higher than 0,03 then 8*4=32 samples per pixel
3rd pass - same as 2nd or this time 32*4=128 samples per pixel?

Another example:
PTS: 8
recalculate every: 4, adaptiv amnt: 4, thr: 0,03

1st pass - 8 samples/pixel
2nd pass - 8 samples/pixel
3rd pass - 8 samples/pixel
4th pass - 8 samples/pixel
5th pass -  check pixel difference, if it's lower than 0,03 then don't refine, if it's higher than 0,03 then 8*4=32 samples per pixel
6th pass - 8 or 32 samples/pixel?

In bucket mode you have "initial samples" option which is like rendering the image with X passes before going adaptive. Is there any equivalent for this in adaptive progressive mode?

Wouldn't it make sense to sample pixels in each new pass with actually LOWER amount of samples? Or given amount? This would make each pass faster.

btw, what happens if I set adaptivity amount to lower than 1? :)
Title: Re: Render Adaptive sampling?
Post by: Ondra on 2013-09-16, 16:23:49
progressive renderer: [recalculate every] passes are rendered with 1 sample. Then adaptivity is computed, that for each pixel gives yes or no. Then next [recalculate every] passes run with 1 sample for non-adaptive pixels and [1+adaptivity amount] samples for adaptive pixels.

bucket: first pass is rendered with [initial samples] samples. Then adaptivity is computed, and adaptive pixels are rendered with [4*intial samples], and nonadaptive pixels are not rendered at all. Then adaptivity is computed, and adaptive pixels are rendered with [4*4*initial samples] and nonadaptive pixels are not rendered at all, etc., for [passes count] iterations.
Title: Re: Render Adaptive sampling?
Post by: maru on 2013-09-16, 16:32:11
Thanks, I think I get it now.
Title: Re: Render Adaptive sampling?
Post by: ecximer on 2013-09-16, 16:42:42
Thanks, I too understood now, but it would be desirable still specification how the threshold works? 0,03 value it that? any difference between the adaptive pixels and non-adaptive? that is 1,0 it is a black and white pixel?
Title: Re: Render Adaptive sampling?
Post by: maru on 2013-09-16, 16:52:18
Thanks, I too understood now, but it would be desirable still specification how the threshold works? 0,03 value it that? any difference between the adaptive pixels and non-adaptive? that is 1,0 it is a black and white pixel?
Yeah, I think it's colour value difference like in any other renderer.
1 = 100% difference meaning the condition is never (or always ;) ) fulfilled.

One more question: will adaptivity work if I use "resume rendering" option. So for example I want to "cook" the rendering a bit without adaptivity until some areas get clean and then turn on adaptivity to clean only noisy areas. :)
Title: Re: Render Adaptive sampling?
Post by: maru on 2013-09-16, 17:00:08
bucket: first pass is rendered with [initial samples] samples. Then adaptivity is computed

How is adaptivity computed after only one pass?
Title: Re: Render Adaptive sampling?
Post by: Ondra on 2013-09-16, 22:03:46
bucket: first pass is rendered with [initial samples] samples. Then adaptivity is computed

How is adaptivity computed after only one pass?

why not? You are comparing neighbour pixels from one image. Open photoshop, do filter->other->custom, and put
Code: [Select]
0 -1 0
-1 4 -1
0 -1 0
in it. Corona does basically that.

it should work with resume rendering
Title: Re: Render Adaptive sampling?
Post by: racoonart on 2013-09-16, 22:54:08
I think people don't even consider this idea at first since it's a pretty bad (yes it is) method to detect pixels for oversampling. Personally I don't use adaptivity at the moment because it's not helping at all (yes, some extremely bright dof highlight spots work better but that's it).
Title: Re: Render Adaptive sampling?
Post by: maru on 2013-09-17, 10:54:43
So it's more like noise recognition, right? Doesn't it get crazy if you have areas of your scene that are intentionally noisy - for example a noisy texture or a glowing lamp with tiny holes in it? I understand it's just for testing purposes and proves adaptivity is possible with Corona.
Title: Re: Render Adaptive sampling?
Post by: racoonart on 2013-09-17, 11:02:56
So it's more like noise recognition, right?
Yes, it's comparing the neighboring pixels for high contrast (which is not necessarily noise!)

Quote
Doesn't it get crazy if you have areas of your scene that are intentionally noisy - for example a noisy texture or a glowing lamp with tiny holes in it?
Yes, it increases sampling on contrasty edges, no matter if it's clean already or not - and that's why it's not really useful. A better adaptive algorithm will have to recognize changes in noise (over a couple of passes), not the presence of noise in one single pass.