Wild pixels in IBL sampling

Component:YafaRay Core
Category:feature request
Assigned:David Bluecame

Some hdri backgrounds produce "wild" pixels which are very difficult to smooth out and increase a lot sampling requirements for backgrounds. This usually happens with background images with very strong highlights I believe. This issue is also reported here. I would be good if we can find a good and phisically correct solution about this.

HDRI is downloaded from here (Port Syros low res) :


You can also download it from https://drive.google.com/file/d/0B9Xy9o3kawnQMmhxbV9sbTBRQnM/view?usp=sh...

Blender example below. Greetings.

wildpixels.jpg66.21 KB
test.zip72.44 KB



Assigned to:Anonymous» David Bluecame
Status:active» needs review


This is caused by the montecarlo sampling of the HDRI lighting. When a very bright part of the HDRI is picked, it causes the sample to be very bright (firefly).

There are several possible solutions/workarounds for this:

* (currently available) select a Clamp value, for example, 4.0. This would limit each sample to have a max.brightness of 4, reducing the fireflies. This can also reduce a bit the realism of the scene, but if chosen carefully it will keep the scene realism while greatly reducing the noise and render times.

* Implementing a SmartIBL system, where we can select a low-res blurred version of the HDRI for lighting and a high-res for reflections.

* Perhaps investigate importance sampling. Not sure if this is already implemented in YafaRay or not, I have to investigate.


Please try the clamp workaround for now and let me know if it helps.


Hi David

Thanks for looking into this. As per my notes, importance sampling is implemented in background lighting, as noted here. Thanks for the clamping trick.


Status:needs review» ready to commit


The new "SmartIBL" functionality will be available in the upcoming YafaRay v3.0.0

More details here:



Status:ready to commit» fixed

Fixed in v3.0.0-beta: http://www.yafaray.org/community/forum/viewtopic.php?f=15&t=5173


Status:fixed» ready to commit


I think I found the fundamental reason for the wild pixels. This commit should fix most of them:


This will be available in the upcoming YafaRay v3.0.1-beta


Status:ready to commit» fixed

IBL sampling fixed in v3.0.1-beta: http://www.yafaray.org/community/forum/viewtopic.php?f=15&t=5173


Status:fixed» by design

Marked as "fixed" for more than 3 weeks without any further user comments. Closing.


Status:by design» closed

Selected mistakenly "by design" while trying to close. Setting it to Closed now.