I wrote a Python script to automate my rendering workflow (run from command line with --background).
The problem is that the resulting colors are different from the desired colors that are rendered in the GUI. Python result appears washed-out. Same incorrect result when the script is executed in Blender GUI.
Files are saved as .png. Blender 2.91.2.
Relevant Python code (simplified):
scene.frame_set(0) bpy.ops.render.render(use_viewport=False, write_still=False) bpy.data.images["Render Result"].save_render('./example.png')
A similar but not identical result is reached by changing:
- Render Properties -> Color Management -> Display Device -> None
- Render Properties -> Color Management -> Gamma -> 1.2 instead of 1.0
then saving the file and running the script.
It seems that there is a difference between settings in GUI and in Python. I've played a lot with different configuration values inside the Python script prior to rendering but this brought me no closer to the desired result.
This is as far as my competence goes, but I would like to better understand the issue and achieve an identical result in my Python script.
Edit: the rendered model is imported from an .fbx file