Author Topic: Render Adaptive sampling?  (Read 14848 times)

2013-07-01, 11:24:38

Richy

  • Active Users
  • **
  • Posts: 43
    • View Profile
I think render adaptive sampling could cut render times significantly.

2013-07-01, 12:10:40
Reply #1

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
Yes, I'm constantly bugging keymaster with that and he told me this would come - but it may take some time though ;) .
Any sufficiently advanced bug is indistinguishable from a feature.

2013-07-01, 12:13:45
Reply #2

Richy

  • Active Users
  • **
  • Posts: 43
    • View Profile
Awesome! :D

2013-07-01, 12:19:17
Reply #3

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
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.
Any sufficiently advanced bug is indistinguishable from a feature.

2013-07-01, 13:46:14
Reply #4

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12768
  • Marcin
    • View Profile
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.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2013-09-13, 21:29:19
Reply #5

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 9048
  • Turning coffee to features since 2009
    • View Profile
Some basic version is now implemented in both progressive and bucket renderers
Rendering is magic.How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)

2013-09-16, 15:43:38
Reply #6

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12768
  • Marcin
    • View Profile
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? :)
« Last Edit: 2013-09-16, 15:49:18 by maru »
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2013-09-16, 16:23:49
Reply #7

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 9048
  • Turning coffee to features since 2009
    • View Profile
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.
Rendering is magic.How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)

2013-09-16, 16:32:11
Reply #8

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12768
  • Marcin
    • View Profile
Thanks, I think I get it now.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2013-09-16, 16:42:42
Reply #9

ecximer

  • Active Users
  • **
  • Posts: 286
  • Scriptobot
    • View Profile
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?
sorry for my english

2013-09-16, 16:52:18
Reply #10

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12768
  • Marcin
    • View Profile
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. :)
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2013-09-16, 17:00:08
Reply #11

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12768
  • Marcin
    • View Profile
bucket: first pass is rendered with [initial samples] samples. Then adaptivity is computed

How is adaptivity computed after only one pass?
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2013-09-16, 22:03:46
Reply #12

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 9048
  • Turning coffee to features since 2009
    • View Profile
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
Rendering is magic.How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)

2013-09-16, 22:54:08
Reply #13

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
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).
Any sufficiently advanced bug is indistinguishable from a feature.

2013-09-17, 10:54:43
Reply #14

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12768
  • Marcin
    • View Profile
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.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us