Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] Bug Reporting => [Max] Resolved Bugs => Topic started by: ous_gt on 2013-06-11, 12:15:03

Title: Noise on black
Post by: ous_gt on 2013-06-11, 12:15:03
Hello. I've been testing corona with this scene. In this bathroom, everything seems ok in 10 mins, but the black part. The black material doesnt seem to get rid of noise or it takes too long. Is there a problem or is this how it works? By the way, i've tried the material color as 0-0-0 (black), or a little lighter (2-2-2). Doesn't seem to solve the problem.
Title: Re: Noise on black
Post by: ous_gt on 2013-06-11, 12:16:11
here's the scene if you wanna check it out yourself. (3ds max 2014)
Title: Re: Noise on black
Post by: ous_gt on 2013-06-11, 19:53:22
And this is 7 hours 10 mins, and still not totally smooth. Please help!
Title: Re: Noise on black
Post by: ous_gt on 2013-06-11, 20:18:25
i looked at some other posts, it's because of reflection isn't it?
Title: Re: Noise on black
Post by: maru on 2013-06-11, 20:20:00
upload your scene in max 2013 or 12 version please
Title: Re: Noise on black
Post by: ous_gt on 2013-06-11, 20:24:00
but i'm using 14. is there anyway to convert it to older versions?
Title: Re: Noise on black
Post by: maru on 2013-06-11, 20:24:53
file > save as > roll down "save as type" and chose 2013
Title: Re: Noise on black
Post by: hglr123 on 2013-06-11, 20:25:15
Deleted.

Maru was fastest :)
Title: Re: Noise on black
Post by: Polymax on 2013-06-11, 20:26:03
Why you use CoronaLight in the windows?
Title: Re: Noise on black
Post by: ous_gt on 2013-06-11, 20:30:43
Here you go. 3ds max 2012.

I didn't really like the environment light. Shadows and colors are better with corona light i think.
Title: Re: Noise on black
Post by: maru on 2013-06-11, 20:49:11
Is it made with A4? I don't know if it's because of 2014>2012 conversion but some really strange things happen when I open this scene.
Title: Re: Noise on black
Post by: ous_gt on 2013-06-11, 20:51:09
What is A4?

BTW :on second thought, just corona sky is pretty good, too. But my main problem is the black material.
Title: Re: Noise on black
Post by: maru on 2013-06-11, 20:56:33
A4 is Corona Alpha V4. Your scene is made with this version, right?
Title: Re: Noise on black
Post by: Polymax on 2013-06-11, 20:57:21
Is it made with A4? I don't know if it's because of 2014>2012 conversion but some really strange things happen when I open this scene.
+1 for me too! Even after reset renderer.
Title: Re: Noise on black
Post by: ous_gt on 2013-06-11, 20:59:50
Yes it is alpha v4. try this scene. it should be fine. max 2013
Title: Re: Noise on black
Post by: maru on 2013-06-11, 21:00:19
When I render this scene it takes AGES to compute initial pass and when I press cancel it freezes and blinks a few times until "passes 12/12" are complete. Looks like it's corrupt? I'll try merging.
Title: Re: Noise on black
Post by: hglr123 on 2013-06-11, 21:03:32
The same is here. I can't stop render in a while :D

And why you switch Gamma off?
Title: Re: Noise on black
Post by: ous_gt on 2013-06-11, 21:06:40
same thing happens to me, too. What's the reason?

Gamma was 2.2, it makes black become kinda grey. 1.0 is fine, than i can change it in photoshop if i want to.
Title: Re: Noise on black
Post by: maru on 2013-06-11, 21:30:44
Deleting the active camera and creating it again fixes the 12 passes issue. That's a progress.
Title: Re: Noise on black
Post by: Ondra on 2013-06-11, 21:33:20
probably some multipass effect on the camera?
Title: Re: Noise on black
Post by: ous_gt on 2013-06-11, 21:35:46
Yes, depth of field was on. But just on the camera, not in render settings. Thought it wouldn't calculate. Yes that's a progress, thanks.
Title: Re: Noise on black
Post by: maru on 2013-06-11, 21:44:59
But still it renders extremely slow. When I override all materials with a gray-ish CoronaMtl everything is 100x faster. If it's converted from Vray maybe you left some things that shouldn't be there?
Title: Re: Noise on black
Post by: ous_gt on 2013-06-11, 21:47:15
may be. it was converted from vray, yes. I will double check to see if something remains.
Title: Re: Noise on black
Post by: maru on 2013-06-11, 21:53:18
Found who's guilty:

Box01

When you change its material to matte grey - everything works fine. When you enable reflections - it renders much much slower. Now why? This is crazy.

update: now it doesn't work, I give up. The only thing that comes to my mind is to re-do all the materials in the scene.

update2: or maybe not, it looks like it slows down when you use a reflective material even when there are NO light sources in the scene.
Title: Re: Noise on black
Post by: ous_gt on 2013-06-11, 21:59:48
I'm really excited to see how hard you're trying to solve this. Thanks so much for your interest.
Title: Re: Noise on black
Post by: ous_gt on 2013-06-11, 22:01:38
It's easy to redo all the materials. But, when you enable reflections, it slows down again right? So there's no point of doing that actually.
Title: Re: Noise on black
Post by: maru on 2013-06-11, 22:22:28
Ok. Here is what I've found. This happens in A4 and in A5 Jun 10 2013 23:54:27.

1. Create a box.

2. Place your camera (or just view) inside the box so that you can view it from the inside, like in a room.

3. Create a new CoronaMtl and without changing any values assign it to the box.

4. Render.

5. Create a new CoronaMtl, change its reflection level to higher, like 0,8.

6. Render.

7. Change diffuse colour to some very light grey or white.

8. Render.

Now I bet it's related to the way Corona works but it means that lighter and more reflective things will render MUCH MUCH MUCH slower than dark and matte things. This is strange because it happens even when there are no light sources so the image renders black but it looks like Corona calculates lots of light bounces (?) anyway. Can anyone check if it also happens on other hardware?
Title: Re: Noise on black
Post by: Ondra on 2013-06-11, 23:03:45
ok, I took a look, here is a couple of notes:
1. Don't put CoronaLights into the windows. They are blocking the environment/sun which is then sampled for nothing. To get the lighting from environment it is enough to leave the windows free, or put a geometry there with CoronaPortalMtl for additional speed boost (but the same visual result).
2. The weird multiple rendering was due to multipass effect turned on on the camera
3. Do NOT use gamma 1.0, it is simply wrong. If you like the look of gamma 1.0, then render it with gamma 2.2 and darken it in postproduction. Corona assumes in some places max is set up for linear workflow (rendering without it is really just a thing of the past, it does not make sense to support it in a modern renderer like Corona). Not using LWF could result in some unexpected bugs. Although it looks like the scene works fine.
3a. BTW: Corona overrides 3dsmax gamma settings for output by default, so you are using 2.2 anyways ;)). But with the risk of some bugs.
4. It is possible the reflections from the black material stopped converging at all because Alpha4 is using an obsolete random number generator that had this problem. This will be fixed in the next release, you can also try to change it in A4. I dont remember the exact names of other RNGs in A4, but something like "5D + PRNG" should work better.
5. The most important: the slowness of the black material is not actually due to the material, but due to the slowness of the entire scene. Your renders have extremely low number of passes for the time elapsed. There are usually 2 reasons for that:
a) low rays/s number - this is usually due to some really crazy texmaps/geometry. This is not your case, milions rays/s are fine
b) high rays/sample (you need to press stats button in VFB to see it). This is usually because of too bright materials/too complicated geometry with opacity, and this is indeed your case. Most materials in your scene have albedo (sum of all its colors) near 1. It is generally not possible to render scenes with albedo = 1 in an unbiased way. Scenes with albedo close to 1 can be rendered, but with extreme render times, such as yours.

tl;dr: you have too bright materials in an enclosed space, that are slowing down the render. You should make your materials darker and compensate by increasing exposure.

Perceptually white material can be made both by setting diffuse color to 1 and using light with intensity 1, or by setting diffuse color to 0.5 and light to 2. The latter is much faster and usually also more physically correct. CG artists have a long tradition of using too high albedos. See this chart: http://en.wikipedia.org/wiki/File:Albedo-e_hg.svg - most real materials reflect less than 30% energy!

But, if you do not wish to change the scene, then just simply decrease maximum ray depth in the main renderer settings. Value about 7-10 will decrease the time to 1/3.
Title: Re: Noise on black
Post by: ous_gt on 2013-06-11, 23:26:37
Thanks Keymaster. You're the best. I wish every render engine had a developer like you. This helped a lot. The only thing i couldn't find is, how to change RNG.
Title: Re: Noise on black
Post by: kumodot on 2013-06-11, 23:37:09
Can someone COMPILE all Keymaster´s advises about Corona behavior on specific situations. There´s a lot of "Words of wisdom" from Ondra spreaded over this forum. :)
Title: Re: Noise on black
Post by: Ondra on 2013-06-11, 23:52:11
That would be great! (It would mean I wouldnt have to do it :D)


the RNG: I dont even know if it is in the menu somewhere ;) Search for "Alpha 3 emulation". Maybe it is in the debug/devel tab (activated in the about tab)
Title: Re: Noise on black
Post by: ous_gt on 2013-06-12, 02:38:10
well it's almost 200 hundred passes, and the black material started to get smooth i guess. Is this timing normal?
Title: Re: Noise on black
Post by: maru on 2013-06-12, 09:15:32
Would it be possible to force albedo to be lower so that it would be faster and more physically correct?
Title: Re: Noise on black
Post by: Ludvik Koutny on 2013-06-12, 09:38:56
To put it more simply...  don't ever create superwhite materials, and always use LWF.

Albedo of white paper or clean snow is about RGB 220 220 220. There is not many things whiter than that... so, for example white painted walls in interior would be RGB 200 200 200 ;)
Title: Re: Noise on black
Post by: Polymax on 2013-06-12, 10:56:52
Gamma 1.5 - more contrast of GI! Enviroment - only HDRI(no sun, no sky)
Title: Re: Noise on black
Post by: Ondra on 2013-06-12, 11:58:22
Would it be possible to force albedo to be lower so that it would be faster and more physically correct?
you need high albedo for some special materials. The problem is when the entire scene has too high albedo, not few selected objects
Title: Re: Noise on black
Post by: ous_gt on 2013-06-12, 13:29:47
Polymax, yours seems very very fast. Can you explain me how you made it faster?
Title: Re: Noise on black
Post by: Polymax on 2013-06-12, 18:32:11
Polymax, yours seems very very fast. Can you explain me how you made it faster?
I'm:
1.Use portals
2.Use pt=16 + HD(512)
3. Resolution 720p
4. Albedo down to 0.7-0.8 diffuse level
I have more faster CPU than yours (i7 980 - 4GHZ)
Title: Re: Noise on black
Post by: maru on 2013-06-12, 20:22:53
Ok, I've made some tests. The results are pretty obvious but maybe someone will find this useful. It illustrates how important it is to keep realistic physical scale (is this the right term here?) for optimal quality/render time.

I set material's diffuse colour to 255 white and then changed diffuse level like this: 0,5 0,25 0,125 0,0625 so basically I cut it in half. There was also one render (0.jpg) where diffuse level was set to 0,9.

I also changed light intensity and most important: gamma to make the images as similar as possible. I know they will never be identical but this proves how fast you can render something and then do some adjustments to make it look almost the same as something that took much much longer to render.

Check out the render times. Imagine rendering something more complex with such render time differences and almost no quality difference.

If I'm writing some utter bullshit here, then correct me please.
Title: Re: Noise on black
Post by: Polymax on 2013-06-12, 20:30:48
Very useful tests, thanx!
Title: Re: Noise on black
Post by: maru on 2013-06-12, 20:52:15
If you want I can make more tests with more things explained, fancy notes on renders, etc. ;)
Title: Re: Noise on black
Post by: Polymax on 2013-06-12, 20:59:59
If you want I can make more tests with more things explained, fancy notes on renders, etc. ;)
Yes, please!!!
Title: Re: Noise on black
Post by: racoonart on 2013-06-12, 21:17:19
If you want I can make more tests with more things explained, fancy notes on renders, etc. ;)

+ 1 would be great :)
Title: Re: Noise on black
Post by: maru on 2013-06-12, 21:50:30
Ok. Will do this tomorrow. Right now I'm using assert version and it's reeeealy slow and my internet connection is dying so it would be hard to download another one.
Title: Re: Noise on black
Post by: ous_gt on 2013-06-13, 02:07:11
Great tests maru. Based on your tests, i can say, the lower diffuse level is, the faster rendering. As i understand, reducing general diffuse level is basically the same thing to reduce ray depth, because models reflect less light to others. That's why it's getting faster and faster if you keep reducing diffuse level. Is that correct?
If that's so, is it okay to reduce ray depth and keep diffuse levels all 1? Is it the same thing?
Title: Re: Noise on black
Post by: ous_gt on 2013-06-13, 02:09:38
Polymax, yours seems very very fast. Can you explain me how you made it faster?
I'm:
1.Use portals
2.Use pt=16 + HD(512)
3. Resolution 720p
4. Albedo down to 0.7-0.8 diffuse level
I have more faster CPU than yours (i7 980 - 4GHZ)

Thanks very much. I should ask, i couldn't find portals. Where should i look?
Title: Re: Noise on black
Post by: Ondra on 2013-06-13, 02:42:35
Great tests maru. Based on your tests, i can say, the lower diffuse level is, the faster rendering. As i understand, reducing general diffuse level is basically the same thing to reduce ray depth, because models reflect less light to others. That's why it's getting faster and faster if you keep reducing diffuse level. Is that correct?
If that's so, is it okay to reduce ray depth and keep diffuse levels all 1? Is it the same thing?

it is not exactly the same. Lowering ray depth is incorrect, since it is biased, but lowering materials albedo is not (but you change the scene description). So in one case you get darker image because you render bright scene wrong, in the other you get darker image, because you render a different, darker scene correctly. I would suggest just experimenting and using the approach that gives you best results with respect to time, quality, and freedom.


Portals are done by assigning a CoronaPortalMtl to any geometry.
Title: Re: Noise on black
Post by: ous_gt on 2013-06-13, 02:45:07
Great tests maru. Based on your tests, i can say, the lower diffuse level is, the faster rendering. As i understand, reducing general diffuse level is basically the same thing to reduce ray depth, because models reflect less light to others. That's why it's getting faster and faster if you keep reducing diffuse level. Is that correct?
If that's so, is it okay to reduce ray depth and keep diffuse levels all 1? Is it the same thing?

it is not exactly the same. Lowering ray depth is incorrect, since it is biased, but lowering materials albedo is not (but you change the scene description). So in one case you get darker image because you render bright scene wrong, in the other you get darker image, because you render a different, darker scene correctly. I would suggest just experimenting and using the approach that gives you best results with respect to time, quality, and freedom.


Portals are done by assigning a CoronaPortalMtl to any geometry.

Thanks. It's really exciting to test this engine Keymaster. Good work.
Title: Re: Noise on black
Post by: ous_gt on 2013-06-13, 02:55:54
edit: something was wrong with 3ds max i guess, closing and opening again fixed it.
Title: Re: Noise on black
Post by: ous_gt on 2013-06-15, 02:09:20
Well, you should be sick of this scene but here are my last tests.
With portals and other advises, i've made some changes. It looks better and calculates faster.
There's one thing i noticed is that resolution makes a huge difference at render times. I've attached two images, both 125 passes. Check the difference at render times when you increase resolution from 720p to 1080p.
Title: Re: Noise on black
Post by: Ondra on 2013-06-15, 02:43:48
yes, double the resolution, double the render time. Unbiased methods work in this way, compared to irradiance caching, which is rather dependent on scene complexity.
Title: Re: Noise on black
Post by: ous_gt on 2013-06-15, 05:10:03
It makes sense.

I was gonna leave this scene but, i think i have more things to learn from it. So i was rendering from this angle, it's been 200 passes but the black part is still noisy. 200 passes should be enough for a scene right?

I used portals. I reduced albedos. Using PT(25) + HD(512).

I just can't figure it out and that makes me crazy about this scene.

update: in this scene, even 300 passes doesn't make the reflective black material smooth. It gets smooth when it's too reflective, or not reflective. When i adjust it the way i want, it doesn't get smooth. I've tried to lower reflection amount by changing frensel IOR or reflection level. It didn't make any difference. 300 passes and it's still not smooth.
Title: Re: Noise on black
Post by: maru on 2013-06-15, 16:10:26
Looks like it's because of your strange material setup:

-reflection level: 1,0
-fresnel IOR: 1,1
-glossiness: 1,0

Changing ANY of these parameters to something more realistic like reflection level 0,9 OR fresnel 1,5 OR glossiness ,95 (or preferably all of them) makes it clean much faster.
Title: Re: Noise on black
Post by: ous_gt on 2013-06-15, 16:15:40
I've tried different settings too. That was my last hopeless try:) make frensel 1.5, reflection 0.1. That's kind of what i want from it. place a chamferbox at the center of the scene. when you have low reflection, it takes much more time if you compare it to a more reflective material. Like i said, it takes more than 300 passes to clear up.
Title: Re: Noise on black
Post by: maru on 2013-06-15, 16:30:37
Strange. I opened your scene, switched to pt+pt, changed material's params to something like:
refl: ,8
fresnel: 1,5
gloss: ,9
and after 25 passes it was less noisy than yours...
Title: Re: Noise on black
Post by: ous_gt on 2013-06-15, 16:32:48
Try;
refl: 0.1
fresnel: 1,5
gloss: 1

if this one works fine too, then i will merge my scene to another or try to find a problem with my pc.
Title: Re: Noise on black
Post by: maru on 2013-06-15, 18:24:59
Captain, looks like we have a bug here.
Title: Re: Noise on black
Post by: ous_gt on 2013-06-15, 18:28:23
So the glossiness amount is the reason huh. who knew. Good work maru. I'm using 0.95 and it seems fine.
Title: Re: Noise on black
Post by: ous_gt on 2013-06-16, 17:58:45
What could be the reason for the white dots both on the mirror and the glass? I thought it was the glossiness but i never used glossiness 1.0.
Title: Re: Noise on black
Post by: ous_gt on 2013-06-16, 18:01:01
This is how mirror looks at first and it never clears up. Here's the scene, too.
Title: Re: Noise on black
Post by: maru on 2013-06-17, 14:49:03
I managed to remove most of the noise from the mirror but I'm not quite sure what caused it because I have done lots of things:
-changed all materials with non-physical properties like reflection level or glossiness 1,0 to about 0,8
-lowered a bit intensity of sun and sky
-changed sampler from 5D deterministic to 5D High-D
-changed shower glass material from one-sided to solid as it is a two-sided mesh (with thickness)
-changed mirror's diffuse level to 0,0

Now in my scene there is only one thing that adds this ugly noise to the mirror:
-changing mirror's material's diffuse level to more than 0. If you change it even to 0,1 then the noise appears

So it looks like adding diffuse to mirror-like materials creates these fireflies when there is lots of contrast in the scene. I think it needs fixing if it's possible.
Title: Re: Noise on black
Post by: Ondra on 2014-01-02, 20:20:09
ok, this thread is definitely obsolete ;)