I recently updated BabylonJS from version 5.57.1 to 7.47.2 for my project to take advantage of new features. However, I noticed that the PBR Material behavior has changed significantly between these versions.
I am using the exact same model, identical environment map, and the same scene material image processing settings. The IBL intensity is also unchanged. Despite this, the metallic/roughness workflow produces different results.
To ensure the issue wasn’t related to my implementation, I also tested the materials in the BabylonJS Sandbox, and the behavior is exactly the same as in my project. This confirms that the difference is coming from the rendering engine itself rather than any custom settings in my scene.
To cross-check, I also tested a metallic/roughness workflow in Unity with the same env to get another reference, and it seems to me more similar to the Babylon 5 reference (ex. with metallic 1, roughness 1):
Have there been notable changes in the PBR Material rendering between BabylonJS 5.57.1 and 7.6.0? If so, is there any documentation or explanation for these differences?
@c.gianfrate, if I remember correctly between 5.5 and now, there was an update in the glTF spec because it was not handling energy conservation correctly, so we updated our implementation to correctly conserve energy. Basically, it means that under certain circumstances the energy reflected from the material surface was not equal to the amount of energy hitting it. I will try to track down the furnace test model we used to illustrate it, but the person who might know where the model lives is out of the office right now.
I don’t remember exactly when that update came into the engine, but I will say that the way we render now is more physically accurate. I don’t think there’s much in the way of documentation about the change because in essence it was a bug in the way we were rendering. However, @cx20 has a great resource for comparing the different renderers to see where there may be differences. If you look at the PBR models, you can see that we have all snapped to the correct energy conservation now. I hope this helps explain the difference.
In fact, it is this PR (available since 7.45.0) that modifies the way in which models with high roughness are rendered, to be better aligned with raytraced ground truths.
To go back to the previous version (less physically correct) in case you can not adapt your model, feel free to set DEFAULT_MIX_IBL_RADIANCE_WITH_IRRADIANCE to false in BABYLON.PBRBRDFConfiguration