2
$\begingroup$

I render rgb images and depth maps for a series of frames in blender. For depth, I actually need to store the float values as such, so that I can read them off directly in a python file later. For that, I wish to use the exr format ( tried png earlier, but the normalization messed up the depth values) However, I would like to store the rgb images as png.
I have noticed that the output format that is set in output properties is maintained for storing the Z-pass and images as well.
Is there anyway I can have different formats for the two? A solution involving blender's python API is also fine.

$\endgroup$
3
  • $\begingroup$ By default blender will not apply any color transforms on the images saved as EXR, to keep the information linear, in scene referred values. To generate images in other formats simultaneously, use a file output node in the compositor, those images will be saved using the color transforms set in the color management section. $\endgroup$
    – susu
    Sep 15, 2020 at 14:06
  • $\begingroup$ But looks like the color transforms property set will be common for both depth and image. 'Raw' may work for depth, but for the images? $\endgroup$ Sep 16, 2020 at 17:35
  • $\begingroup$ when you export as EXR you are bypassing the color transforms. Whatever other format you set the image as will use the color management settings. $\endgroup$
    – susu
    Sep 16, 2020 at 17:36

1 Answer 1

1
$\begingroup$

The Composite output node in the compositor will use the File Format and Color Management set in the properties window.

If you add a file output node it will allow you to save the image as an additional file with a different format or in a different path.

Set the file type to OpenEXR multilayer. Whenever you save as EXR the file will bypass the color management transforms, and remain linear float. You can add inputs/layers using the + Add Input button for depth or whatever other passes you need.

enter image description here

$\endgroup$
1
  • $\begingroup$ This worked perfectly and your explanation of the pipeline is very clear. I would like to add something I tried on top of this. After creating the File output node, in the properties section I renamed the existing layer 'Image' to 'depth' and chose openEXR (not multilayer) as file type to save depth maps. I connected 'Image' to composite node, so it gets saved as png itself. On rendering, I had to read exr file only for the depth values. $\endgroup$ Sep 17, 2020 at 13:04

You must log in to answer this question.

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