Render too bright?

I added this line in the write_probes.py in the setup_envmap_render() function.
It is just a first step as it works well with simple color background but it doesn’t work with .jpeg environment texture yet. And the Background Strength Node doesn’t work fully either, but I’ll work on it.

Environment textures are handled in nodes_texture.py, but they aren’t rendered again and thus the display setting would probably make no differece here. But…

Note : I found that setting the “Gamma” value to 0.45 in Blender gives the same results as changing the “Display Device” to “None”…

…this is because 0.45 roughly equals 1/2.2, which is the same gamma correction that needs to be applied to jpg’s. However there are still slight visible differences because sRGB is not converted to linear with just a gamma correction as far as I know. For now this should be sufficient though.

If you want I can share a link to my commits later and then you can have a look whether you want to change something?

Edit: here it is: https://github.com/MoritzBrueckner/armory/tree/fix-environment-gamma. Note that the color is still slightly off in many cases. The real sRGB transform can be found here, but cmft only allows for basic gamma correction.

2 Likes

I’ve opened a pull request that should hopefully improve the situation: https://github.com/armory3d/armory/pull/2385. It’s not perfect yet but it seems that the remaining differences are caused by how cmft calculates the coefficients vs. how Blender handles irradiance.

2 Likes

Sorry for the late reply, I couldn’t play much with armory lately…

I just saw the merged. Thanks a lot :slight_smile:
I will try it as soon as possible.

2 Likes