Final Gather uses non-IBL background in glass

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

In the photon mapping and path tracing integrators, the background texture is used in the Final Gather/Path calculation even if IBL is not active, when there are refractive materials (as Glass).

For example, in this scene I have set a lamp with extremely low brightness (like 0.0001) and a background with IBL disabled.

However, in both Photon mapping and Path tracing, you can see the effect of the background in the Final Gather/Path:

yafaray ibl fgyafaray ibl fg

















Sometimes using the background for the FG can be necessary for some scenes, but sometimes the user may want to avoid the extra noise caused by it.

So, I'm working to create a new parameter to control if you want to use or not the background texture in the Final Gather calculation. I will send a Pull Request when I have it finished.



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

I think this should not work this way and should be fixed, but perhaps there is a reason for it? Please I need some comments here.


Status:needs review» ready to commit


I have made some changes that I will include in the upcoming v0.1.99-beta4. The changes are:

* Put the "power" parameter in a more correct place in the Background settings panel.

* Changed the core code, so if IBL is disabled, Final Gather will not use it for Caustics to avoid unnecessary and undesired noise. In the background types that have parameters to enable/disable caustics, Final Gather will only use the Background for Caustics if IBL is enabled *and* Caustics is enabled in the background.

Pull requests with more information:


You can see the effects of the changes with the next images. I have also attached the .blend file.


With IBL=off (original above, with fix below)

Background IBL off (original)Background IBL off (original)















Background IBL off (with fix)Background IBL off (with fix)
















With IBL=on, Caustics=off (original above, with fix below)

Background IBL on, caustics off (original)Background IBL on, caustics off (original)















Background IBL on, caustics off (with fix)Background IBL on, caustics off (with fix)

















With IBL=on and Caustics=on (original above, with fix below). In this case they should look the same.

Background IBL on, caustics on (original)Background IBL on, caustics on (original)

Background IBL on, caustics on (with fix)Background IBL on, caustics on (with fix)


Example blend attached

yafaray-back_fg.blend 1.49 MB


Status:ready to commit» fixed

Marked as Fixed, accepted pull request:


This change is now available 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.