Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] I need help! => Topic started by: lupaz on 2016-02-23, 15:40:38

Title: Fireflies case
Post by: lupaz on 2016-02-23, 15:40:38
Hi there.

I found that the 2 sinks made of glass were causing fireflies on several areas in the render.

Do you know why? I kind-of need those sinks made of glass...

Please see below the "before" with the glass sinks and the "after" without the sinks.

Thanks!

Title: Re: Fireflies case
Post by: maru on 2016-02-23, 16:57:01
It looks like a reflection, but I am not sure what I am looking at. Can you give us a better view of what is going on there?

You could try using rayswitch material. If the noise is caused by an object reflecting in glass, you can place the glass material in all slots of the rayswitch except for the reflections slot (or use a different material in that slot). Then apply this rayswitch material to the object which is visible in the reflection.
Title: Re: Fireflies case
Post by: lupaz on 2016-02-23, 17:45:33
Hi Maru, thanks.

The rendered region is marked up in red on the top right. I photoshoped an arrow and the rectangle. see it?


Quote
If the noise is caused by an object reflecting in glass, you can place the glass material in all slots of the rayswitch except for the reflections slot

Doing the rayswitch thing seems to be a time consuming workaround for a fairly common situation, no?
In production it wouldn't make sense to go around searching for a problematic object in my opinion. Is this a bug?
Title: Re: Fireflies case
Post by: DarcTheo on 2016-02-23, 17:49:51
I have experienced fireflies before because of glass in the scene, ticking the thin glass option in material stopped them from appearing, though mine were because of windows i dont know how this will affect your sink. It's been a while since it last happened though.
Title: Re: Fireflies case
Post by: maru on 2016-02-23, 17:55:42
I do not know how to fix the problem as I do not know how the scene is constructed. In fact, I am not even sure if those fireflies are reflection, or something else. It would be best if you could send the scene here: https://coronarenderer.freshdesk.com/support/tickets/new
Title: Re: Fireflies case
Post by: lupaz on 2016-02-24, 15:20:07
I reduced the scene to only 4 objects.
I still get a white pixel at pass 140 or so.
Of course 1 pixel wouldn't be a problem, but with the full scene, there are a whole bunch of those fireflies.

I even removed the reflection of the glass object. It's just pure refraction now.

Find the scene here

http://www.mediafire.com/download/kdo3wtb29xa5e5a/CoronaFireflies.zip

Just click render to render the region with the spot.
The attached is the region render.

Thank you.
Title: Re: Fireflies case
Post by: maru on 2016-02-24, 16:04:52
Here are two ways of fixing the fireflies:
1) set reflection glossiness of the window frame to 0,99 - this virtually won't change the appearance of the material, and the fireflies should not appear
2) use rayswitch material for the glass sink - see the attached scene (inspect the sink material) - this will make the sink completely invisible in reflections, so you may want to plug something into the reflection slot - for example a glass material in thin mode (this would require reflections back on).

Also, you are using Vray HDRI map in this scene. It usually works, but may sometimes cause troubles.
Title: Re: Fireflies case
Post by: lupaz on 2016-02-24, 16:22:02
Quote
1) set reflection glossiness of the window frame to 0,99 - this virtually won't change the appearance of the material, and the fireflies should not appear

Indeed. they aren't appearing. Is there any way to make this the default instead of a value of 1?
Is there any impact in render time?

Quote
2) use rayswitch material for the glass sink
I just can't imagine doing this in production. Especially because I wouldn't know what object I need to put in a rayswitch material in the first place. It took me hours to find that it was the sink.

Quote
Also, you are using Vray HDRI map in this scene. It usually works, but may sometimes cause troubles.
I tried with a CoronaBitmap. I got even more fireflies.

Do you know what the exact problem is and whether there's a quick solution for the overall scene, for when time is pressing during a deadline? (the question may sound harsh, but I'm really kindly asking)
Title: Re: Fireflies case
Post by: maru on 2016-02-24, 17:25:17
Quote
1) set reflection glossiness of the window frame to 0,99 - this virtually won't change the appearance of the material, and the fireflies should not appear

Indeed. they aren't appearing. Is there any way to make this the default instead of a value of 1?
Is there any impact in render time?
I believe this could by done using a script, but I have no max script experience. There should be no render time impact at all.

Quote
Do you know what the exact problem is and whether there's a quick solution for the overall scene, for when time is pressing during a deadline? (the question may sound harsh, but I'm really kindly asking)
I think it's either simply hard to sample reflection of a refraction, or maybe this: " Reflections of light seen through solid glass may appear dark" - https://coronarenderer.freshdesk.com/support/solutions/articles/5000516180
another example: https://forum.corona-renderer.com/index.php/topic,5628.msg38823.html#msg38823
Title: Re: Fireflies case
Post by: lupaz on 2016-02-25, 14:11:25
Quote
There should be no render time impact at all.

Are you sure about this? So, even when there's no scattering of rays on reflection the amount of rays is the same as if there was scattering?

Title: Re: Fireflies case
Post by: lupaz on 2016-02-25, 14:33:42
The image attached shows a basic scene, all defaults, except for glossiness at 0,99.
The light source is a corona sun with corona sky.

It seems that, with the defaults, the samples taken from reflections far away assign a white color to the pixel. Obviously the pixel is much bigger than the actual reflection and it shows as a "filefly".
Isn't there like a clamping for distance? Would rendering with more samples make this better? Other workflows?

Thanks.
Title: Re: Fireflies case
Post by: maru on 2016-02-26, 17:16:29
The longer you render this, the more balls will get the white "firefly" which is physically accurate - you would get the same thing in real life. See: https://coronarenderer.freshdesk.com/support/solutions/articles/5000529356

You can try softening the fireflies by setting internal resolution to 2 in "system" tab.

In this particular case, one "workaround" to get rid of this is to disable "visible in reflections" for the sun object.
Title: Re: Fireflies case
Post by: lupaz on 2016-02-27, 15:01:43
Got it.
Thanks