Noisy & white dots rough glass

Component:YafaRay Core
Category:bug report
Assigned:David Bluecame


Rough glass has got many applications in architectural visualisation to simulate plexiglass and methacrylate in facades and roofs. The issue is that it is very noisy and prone to white dots. Huge amounts of adaptive sampling is needed to smooth noise but white dots remains and other appear as more eye ray samples are added. White dots also are more likely to appear the more raydepth is used. White dots happens at least either in Linux and Windows 64bits builds. Rendered with Yafaray 0.1.99 beta 3

Example file:

noisyroughglass.jpg42.62 KB



Assigned to:Anonymous» David Bluecame


Yes, there seems to be some problem indeed in the Rough Glass rendering. I will investigate this.



From my first tests, it looks like the rough glass is having issues in the recursive ray tracing. I suspect the amount of light calculated in the microfacets gets sometimes amplified in each recursive ray pass incorrectly.

For now as a workaround until this gets fixed (not easy as it woud need a full review of the rough glass material), perhaps you can try to reduce the "ray depth" parameter as much as the scene allows you. For example reducing ray depth from 4 to 3 almost removes all the fireflies and reducing to 2 removes all of them.

I understand it's not a good solution, just a temporary workaround for now, but I hope it helps you for now. I will keep this issue open until it gets fixed.


Status:active» ready to commit


I could not find/fix the root cause of this problem, but I suspect some issue in the pdf calculation of the material that causes amplification of certain pixel color values during the recursive raytracing stage.

I've sent a pull request with an attempt to minimize the problem:

With these changes I don't expect to fully solve the problem, but at least to mitigate it. The rough glass material will look slightly darker than before, but I hope it does not become a problem. I will include this change in the upcoming v0.1.99-beta5 experimental version.

I have attached two images, one before the fix and the other after the fix I suggest in the pull request.

roughglassbug before fix.png 391.96 KB
roughglassbug after fix.png 382.13 KB


Status:ready to commit» fixed

Fixed in YafaRay-E (Experimental) v1.0.0


For more information, see:


If you still have this issue with the new version please let us know.


Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.