2
$\begingroup$

Good morning everybody! I'm here to understand how to save OpenEXR images using python in order to maintain settings from Color Management in Blender. I implemented a scene with a very low exposure, but when I save OpenEXR images the result is extremely over-exposed. I read about the save-as-render setting, but i cannot understand how to include it in my python blender file. Thanks in advance for your help.

$\endgroup$

1 Answer 1

3
$\begingroup$

Due to the nature of OpenEXR, all color management settings are ignored and the image is saved in linear color space, no matter what you do. If you want to maintain the view transforms (IE filmic), you have to store the image in another file format like jpg, tiff, or tga.

https://docs.blender.org/manual/en/latest/render/color_management.html#color-management

The color space of the image file on a drive. This depends on the file format, for example, PNG or JPEG images are often stored in sRGB, while OpenEXR images are stored in a linear color space.

import bpy

image_settings = bpy.context.scene.render.image_settings
image_settings.file_format = "OPEN_EXR"
image_settings.color_depth = '32'

JPG (Filmic View Transform + sRGB Display Transform)

enter image description here

EXR (Linear, no Display Transform)

enter image description here

EXR (Linear + sRGB Display Transform)

enter image description here

Worth reading:

Render with a wider dynamic range in cycles to produce photorealistic looking images

https://www.openexr.com/

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .