Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] General Discussion => Topic started by: Ludvik Koutny on 2013-08-21, 10:28:20

Title: Bucket rendering testing needed
Post by: Ludvik Koutny on 2013-08-21, 10:28:20
Hi,

for those of you who have access to daily builds, functionality of bucket rendering has been partially fixed, and it is now very easy to use.

Basically:

Subdiv AA sets the base AA quality.

Adaptive threshold sets how significant difference in the pixel value needs to be for adaptive refinement to occur.

Adaptive steps set the amount of adaptive steps each of which will refine the bucket further.

So if you set subdiv AA to 4, adaptive steps to 4 and adaptive threshold to 0.02, then:

- initial adaptive step will be rendered constantly using 4 subdivs per pixel
- next adaptive step will sample any pixels with difference larger than 0.02 with additional 4 subdivs set in subdiv AA
- and two more adaptive steps will proceed looking for any pixels with difference larger than 0.02, and keep refining them using 4 more AA subdivs

This should be pretty easy to control. Bucket rendering is no more affected by any of the progressive rendering limits, and will stop once all of the adaptive steps finish.

Now i would like to ask you to test bucket rendering, and see if it performs better in some of the scenes. As bucket rendering has some basic adaptivity implemented, it could be beneficial for example in scenes with strong DoF :)

Thanks in advance :)
Title: Re: Bucket rendering testing needed
Post by: maru on 2013-08-21, 11:02:53
I am doing this now. Just started setting up some random flying objects when I saw the word "adaptivity". :)

And in Aug 20 2013 21:58:35 the names for parameters are:
-initial samples
-passes
-adaptive thresh.

Which is kind of self explanatory.
Title: Re: Bucket rendering testing needed
Post by: maru on 2013-08-21, 11:13:24
- next adaptive step will sample any pixels with difference larger than 0.02 with additional 4 subdivs set in subdiv AA
- and two more adaptive steps will proceed looking for any pixels with difference larger than 0.02, and keep refining them using 4 more AA subdivs

Wouldn't it be better if apart from "initial subdivs" there would be another value for MAX additional subdivs? So there would be initiall pass with 4 subdivs and in the next pass each pixel would be sampled with 2,3 or 4 subdivs (but not more), depending on how much is needed to reach the threshold. So some pixels that don't need to be subdivided 4 times would be sampled faster. Anyway, I know it's still probably a temporary solution and Keymaster will do his magic. :)
Title: Re: Bucket rendering testing needed
Post by: Ludvik Koutny on 2013-08-21, 11:36:14
I am doing this now. Just started setting up some random flying objects when I saw the word "adaptivity". :)

And in Aug 20 2013 21:58:35 the names for parameters are:
-initial samples
-passes
-adaptive thresh.

Which is kind of self explanatory.

True, naming changed, i have not checked the very recent build yet. ;)

As for the max subdivs, i am not sure it would be so easy to determine actually how many samples is necessary to reach the threshold. Anyway, if you lower initial samples, and increase passes, it will be refining using less samples each pass so it will be distributing them more subtly.

I personally found the settings of 4 initial samples, 4 passes and adaptive threshold of 0.01 to be a very good starting point for getting a final quality output image.
Title: Re: Bucket rendering testing needed
Post by: maru on 2013-08-21, 11:56:57

True, naming changed, i have not checked the very recent build yet. ;)

As for the max subdivs, i am not sure it would be so easy to determine actually how many samples is necessary to reach the threshold. Anyway, if you lower initial samples, and increase passes, it will be refining using less samples each pass so it will be distributing them more subtly.


It would be nice to have more than max 10 passes available. :P

---

Here is a quick test:

BUCKET:
max ray depth: 5
primary: pt
secondary: none

pt samples: 1
MSI: 0
LSM: 2

image filter: tent
internal res: 2

renderer: bucket:
initial: 12
passes: 5
adaptive thresh: 0,03

---

PROGRESSIVE:
pt samples: 8
all other settings the same, stopped after 10:34

Buckets worked better here, but only slightly. I think it's a matter of proper settings. I have to try this later with a more complex scene, but now have some work to be done. :)
Title: Re: Bucket rendering testing needed
Post by: Ludvik Koutny on 2013-08-21, 13:34:47
When doing too little samples per pass, you will probably lose some efficiency, so i think as long as you have 2 or more initial samples set, there should not really be a scenario where 10 passes would not suffice.

I would also try to keep PT samples to at least 4, as they affect bucket rendering too, and value of 1 does not seem to work very well in most of the scenes. 4 - 32 is usually ideal range ;)
Title: Re: Bucket rendering testing needed
Post by: racoonart on 2013-08-21, 14:34:15
Nice!
I've just made a few simple tests so I cannot say anything about its usefulness but i seems to work.

One thing:
seeing the buckets (indicators like highlighted edges etc) would really help to see the difference before and after a bucket has finished. Right now I don't see where the buckets are currently working.
Title: Re: Bucket rendering testing needed
Post by: racoonart on 2013-08-21, 17:13:30
Ok, played around a bit and now I'm very interested in how the adaptivity is working. I hate it to try different values without knowing the tech behind it.
I'm a bit confused by the term "samples". As you were first using "subdivs" in the opening post I'm pretty sure it's working on a subdividing base (yeah... clever :D)

So initial samples value of 4 with 5 passes would mean:
1st pass: 4 "passes" 1 eye ray with x pt and y light samples
2nd pass: 4^2 "passes" which means 16* 1 eye ray with x pt and y light samples ... if the difference to 1st pass is greater than the treshold.
3rd pass: 4^3
4th pass: 4^4
5th pass: 4^5

Which would pretty much explain why there (likely) is no need for more than 10 passes ever.
Title: Re: Bucket rendering testing needed
Post by: Ludvik Koutny on 2013-08-21, 17:18:42
Removed, please ignore.
Title: Re: Bucket rendering testing needed
Post by: Ondra on 2013-08-21, 17:27:22
No, no, nothing like that :) Not nearly as complicated.

The passes just refine bucket area further, but only pixels that fall above the adaptive threshold.

So, if we have 4 samples set, then each pixel will be sampled using 4*4=16 samples.

nope, 4 initial samples mean only 4 samples initially... Each subsequent pass currently multiplies this number by 4
Title: Re: Bucket rendering testing needed
Post by: Ludvik Koutny on 2013-08-21, 17:31:03
Ah, so yeah, i was wrong...  interesting, this changes the way i will have to think about setting it up...
Title: Re: Bucket rendering testing needed
Post by: racoonart on 2013-08-21, 17:51:43
so.. my presumption was right then?
Title: Re: Bucket rendering testing needed
Post by: Ludvik Koutny on 2013-08-21, 19:18:51
so.. my presumption was right then?

Yes, you were right :) I found out something is not right with my idea as soon as i realized that ever subsequent pass renders longer than previous one, rather than shorter :)
Title: Re: Bucket rendering testing needed
Post by: maru on 2013-08-21, 19:29:43
nope, 4 initial samples mean only 4 samples initially... Each subsequent pass currently multiplies this number by 4

Multiplies this number by 4 because initial samples = 4 or always multiplies by 4 whatever the given number is?

I have discovered one thing: when bucket rendering, reducing LSM to 0,0001 improves speed. Not sure if in every scenario.

I thought this adaptivity would perform great against progressive rendering in a scene where there is a lot of flat areas (like a flat plane lit with one light) and some small complicated area (like caustics or glossy effects on a small object). So I placed a small glass teapot on a plane and lit it with one corona light but both methods (progressive vs buckets) performed pretty much the same (time vs quality). Here is a "developed" version of that scene. ;)

Title: Re: Bucket rendering testing needed
Post by: maru on 2013-08-22, 15:39:36
Spinning object with motion blur. Info included.

Conclusion for this test is that it's easy to make render time much longer without much difference in noise amount. ;)
Title: Re: Bucket rendering testing needed
Post by: cecofuli on 2013-08-23, 00:27:00
Ok, I did some strong test. I did these two test. Unfortunately, I had to change slightly the shader. But for this purpose isn't so important.
Resolution: A3 300 DPI = 5000 x 3500 px

Progressive = 24h
Bucket= 22h

 I don't remember exactly the Progressive parameter. I think: PTS: 8 or 4 and LSM 2 or 4 .
Bucket: Int samples 32 - Pass: 10 (5 reached in 22 hours)  -  Adaptive threshold: 0.05

As you can see, with bucket I have a little bit more noise in the wall and in the uniform area, but the DOF is much better, in less time.
I hope Ondra find the way to solve this problem (DOF) in progressive mode.

(http://www.francescolegrenzi.com/Temp/Corona/0009_Chrome+Marble.jpg)



Title: Re: Bucket rendering testing needed
Post by: maru on 2013-08-23, 10:09:30
I don't remember exactly the Progressive parameter. I think: PTS: 8 or 4 and LSM 2 or 4 .
Bucket: Int samples 32 - Pass: 10 (5 reached in 22 hours)  -  Adaptive threshold: 0.05

Isn't int samples 32 an overkill?
Title: Re: Bucket rendering testing needed
Post by: cecofuli on 2013-08-23, 10:12:28
I don't know, I haven't time to do more test =) But, for me, I want to obtain the best quality with the current Corona version.
Title: Re: Bucket rendering testing needed
Post by: maru on 2013-08-23, 11:08:47
Ok, but I think you could achieve same results in much shorter time, especially when rendering image at such high resolution. I'm not sure, because all these controls combined - pts, lsm, int samples - are becoming hard to comprehend.
Title: Re: Bucket rendering testing needed
Post by: maru on 2013-08-30, 18:53:33
Why does a scene rendered with exactly one pass in progressive mode look different than the same scene rendered with exactly one pass with 1 initial sample in bucket mode? What's the difference? Can someone explain this?
Ok, it was because of HD cache.
Title: Re: Bucket rendering testing needed
Post by: Stan_But on 2013-09-15, 01:19:10
i found when render with bucket mode that some bucket can run very slowly in very simple places without reflection with diffuse solid color. Even if override with default corona material.
Is it a bug?
Title: Re: Bucket rendering testing needed
Post by: rafpug on 2013-09-15, 10:29:04
Ok, I did some strong test. I did these two test. Unfortunately, I had to change slightly the shader. But for this purpose isn't so important.
Resolution: A3 300 DPI = 5000 x 3500 px

Progressive = 24h
Bucket= 22h

 I don't remember exactly the Progressive parameter. I think: PTS: 8 or 4 and LSM 2 or 4 .
Bucket: Int samples 32 - Pass: 10 (5 reached in 22 hours)  -  Adaptive threshold: 0.05

As you can see, with bucket I have a little bit more noise in the wall and in the uniform area, but the DOF is much better, in less time.
I hope Ondra find the way to solve this problem (DOF) in progressive mode.

(http://www.francescolegrenzi.com/Temp/Corona/0009_Chrome+Marble.jpg)

Good Morning

Progressive = 24h
Bucket= 22h


1 day in rendering?
All this time, but is it possible?

Greats
Raf