Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] Feature Requests => [Max] Resolved Feature Requests => Topic started by: cecofuli on 2013-09-01, 23:13:07

Title: DOF: VRay vs Corona and Corona DOF improvements
Post by: cecofuli on 2013-09-01, 23:13:07
Hello,
as we know, Corona doesn't have a good adaptive sampling method.
This can be seen in the scenes with strong and difficult DOF. I did two project with Corona and, in both, I had a problem, big problem, with DOF!
While the image is very clean, DOF in chrome surface with highlight is veeery noisily.  Look this image.
I used bucket mode cause, as you will learn at the end, Progressive isn't good with DOF.

3500px, BUCKET and 30 hours!!!  The image is clean, but the DOF.... =/

(http://www.francescolegrenzi.com/Temp/Corona/0015_DOF.jpg)

So, I create a simplified version, for Corona and VRay. Corona wins with hands down. If you want to play with these files, you can download.
In my test I forgot to change the VRay Max depth. So, in some situation the reflection is not good as Corona. But reflections are not the problem in this thread.

CORONA: 26 min [Bucket - Initial 16 and thresh: 0.02]

(http://www.francescolegrenzi.com/Temp/Corona/0016_Corona_DOF_Initial_16_thresh_0.02.png)

VRay: 21 min (BF+LC)

(http://www.francescolegrenzi.com/Temp/Corona/0017_VRay_DOF_01.png)

(http://www.francescolegrenzi.com/Temp/Corona/0018_Corona_VS_VRay.jpg)

I did some test with Progressive and Bucket and... look at the quality!

PROGRESSIVE: 46 min and bad DOF quality =(
BUCKET: 26 min with enough quality =|



(http://www.francescolegrenzi.com/Temp/Corona/0019_Corona_DOF_Progressive.png)

(http://www.francescolegrenzi.com/Temp/Corona/0020_Corona_DOF_Initial_16_thresh_0.02.png)

Here some crops:

(http://www.francescolegrenzi.com/Temp/Corona/0021_CORONA_DOF_CROP.jpg)



So, I ask to Ondra if he can improve the DOF. The best is to do a better DOF in both. But, you could make a progressive better, like bucket.
I know, we can use a DOF in post, but in some situation, like with mirror (my bathroom) and in this example (with glass or transparent object) ZDepth creates a wrong, incorrect DOF.

THANKS!
Title: Re: DOF: VRay vs Corona and Corona DOF improvements
Post by: rafpug on 2013-09-02, 14:35:19
Hello Francesco

I did a test by changing the value of the sensor by default!

But the bug which would it be?
pixelated the image on the reflection?

Sorry but I'm still a beginner with rendering

Greats
Raf
Title: Re: DOF: VRay vs Corona and Corona DOF improvements
Post by: cecofuli on 2013-09-02, 14:38:12
It's not a real bug. We can call it "improvement".
In Progressive mode the DOF where the lights are reflected is very noisily and Corona isn't able to obtain the same result as you can see with Bucket.
Title: Re: DOF: VRay vs Corona and Corona DOF improvements
Post by: rafpug on 2013-09-02, 14:59:10
The affected area have tried to render it

- With DOF
- Without DOF

with the material applied!

Title: Re: DOF: VRay vs Corona and Corona DOF improvements
Post by: maru on 2013-09-02, 18:45:31
It's probably a matter of proper render settings. Now when adaptivity is in development you have to choose between supersampling and gi quality pretty much like with vray's dmc sampler. And remember Corona is still in alpha stage. ;)

I'll try to experiment with your scene later today.
Title: Re: DOF: VRay vs Corona and Corona DOF improvements
Post by: cecofuli on 2013-09-02, 18:53:53
Maru, I tried everything, but this is hard scenario, and not only for Corona. Feel free to try my scene.
I know that it it in alpha, but I'm here, if Ondra wants, to make Corona better with my works.  =)
Title: Re: DOF: VRay vs Corona and Corona DOF improvements
Post by: rafpug on 2013-09-02, 20:54:03
Hello Francesco

Comparison setting CoronaLights
Title: Re: DOF: VRay vs Corona and Corona DOF improvements
Post by: maru on 2013-09-02, 20:59:51
This is what I get when I open the file. What is missing? Just downloaded latest build (02.09) so nothing should be missing.

When I hit render I get some random noise with no focus.

By the way, how do you make render region the only area visible in vfb?

I can point one thing that may affect the render and cause some errors: your materials have a reflection value of 1.0.
Title: Re: DOF: VRay vs Corona and Corona DOF improvements
Post by: cecofuli on 2013-09-02, 21:08:30
Maru, I used the Corona 20 August, not the last version. Because Ondrea still working with the new version, I use (now) the "old" version for my work.
The missing modifier is the old CoronaCameraMod. I didn't know Ondra removed this modifier. I hope to be able to render my old scene with the new Corona version... =/

I used CROP option in the "Area to render" (Common parameter rollout)
Title: Re: DOF: VRay vs Corona and Corona DOF improvements
Post by: maru on 2013-09-02, 21:23:09
Can you please modify and upload the scene so that it doesn't contain that camera modifier only a standard camera with fixed dof target? I'm really curious to experiment with this. :)
Title: Re: DOF: VRay vs Corona and Corona DOF improvements
Post by: rafpug on 2013-09-02, 21:31:59
Hi maru

what is the MISSING OSM?
Title: Re: DOF: VRay vs Corona and Corona DOF improvements
Post by: cecofuli on 2013-09-02, 21:33:29
Maru, I think the easy and fast way is to download the old Corona version from dropbox.
Title: Re: DOF: VRay vs Corona and Corona DOF improvements
Post by: Ondra on 2013-09-02, 22:07:51
it should not matter though, you only dont get camera clipping
Title: Re: DOF: VRay vs Corona and Corona DOF improvements
Post by: maru on 2013-09-02, 22:15:53
For some reason camera target was at a different position and I didn't know the original target distance. I just downloaded that previous build.
Title: Re: DOF: VRay vs Corona and Corona DOF improvements
Post by: maru on 2013-09-03, 11:53:33
Ok, here is my theory. You are welcome to disagree with it. :)

With bucket rendering you have a choice like this:

1. better GI (more path tracing samples, less initial bucket samples)
For scenes with heavy, noisy gi and no visible hard edges, no tiny geometry like grass, no detailed textures, no motion blur or DOF.


2. better supersampling (less path tracing samples, more initial samples)
For scenes with no detailed gi but with small edges, detailed textures, DOF and motion blur.


3. similar GI/supersampling ratio (averaged pts and initial samples)
For scenes with mix of detailed GI and DOF. Then you're basically fucked. ;)

And we only have 10 passes available. I think it this case it would be better to have more.

In this scenario, shooting lots of pts without many pixel subdivisions doesn't make much sense, because shooting rays "half of a pixel" in a different direction can produce completely different results. So we need little pts and lots of initial passes.

Here is my workflow:

First I set pts to a low value like 1 or 2 and changed only initial samples to see how much is required for a nice smooth background in one pass. Which is more than 200. Why in one pass? Because then in the second or third adaptive pass, those pixels in the background won't be rendered at all because of adaptive threshold reached and this will let me save time without pointless subdividing of those pixels. In each new pass only areas with heavy DOF will be subdivided further. I'm not quite sure what each new pass does, but I guess it just subdivides each previous "sub pixel" by 4. This is why we don't want lots of pts because with lots of subdivisions like this it would literally take ages to render.

Now, this seems to work fine but I only have a laptop with i3@2,4GHz so it's not very fast with stuff like this.

I'd like to see Keymaster's response to this. And I'm still experimenting so stay tuned. ;)

tl;dr I wanted to achieve similar results to Cecofuli using only one bucket pass and then with each new pass improve only areas with heavy dof.

So Cecofuli, if you have time, you can try my scene and post your results.
Title: Re: DOF: VRay vs Corona and Corona DOF improvements
Post by: Ondra on 2013-09-03, 12:14:42
maru: you can set initial samples in bucket rendering to higher value to get nice AA and nice GI both in the first pass.

10 passes are more than enough, because each one is 4 times more detailed than the one before (so 10th pass is 1 million times more detailed (but only run for pixels with high variance))
Title: Re: DOF: VRay vs Corona and Corona DOF improvements
Post by: maru on 2013-09-03, 12:50:03
maru: you can set initial samples in bucket rendering to higher value to get nice AA and nice GI both in the first pass.
That's what I did here. :)

Quote
10 passes are more than enough, because each one is 4 times more detailed than the one before (so 10th pass is 1 million times more detailed (but only run for pixels with high variance))
This sounds sensible.
Title: Re: DOF: VRay vs Corona and Corona DOF improvements
Post by: Ondra on 2013-11-13, 17:48:30
Duplicate thread
Title: Re: DOF: VRay vs Corona and Corona DOF improvements
Post by: indrazulfi on 2013-11-28, 16:20:22
i agree with you..

Bucket More Better and More Fast than Progresive..

But the Bucket System not like the Vray Bucket Render ?