1
$\begingroup$

I believe that the OpenEXR files that are being output from Cycles (Blender 3.6) are not being recognized correctly by my video editor due to extra metadata that Cycles is including (and I see no UI option to remove).

I am rendering a sequence to OpenEXR and compositing it in Vegas Pro 20 (not the best NLE, but I haven't transitioned to Davinci Resolve yet and need to get this project out of the way first). To save a long narrative, here are the facts:

Vegas Pro will do the following:-

  • Import OpenEXR files from other sources, including very large files.
  • Import OpenEXR files rendered from Eevee
  • Recognize and read required metadata (resolution, bit depth, etc) from these OpenEXR files

It will not do the following:

  • Import OpenEXR files rendered from Cycles engine from my sequence (same frames as Eevee mentioned above)
  • Recognize and read required metadata from these files (just says "Unknown")

The above results are the same regardless of bit depth, +/- alpha channel, using CPU or GPU, or EXR compression scheme. After hours of research and analyzing the files, the only difference I can find is that the Cycles renderer adds metadata such as render time, etc:

EXR file settings from Cycles Render

On the other hand, Eevee's EXR output (which does import in Vegas) does not pass these metadata into the file. Since by all other metrics (resolution, bit depth, alpha, file size, etc) the Eevee EXR files are pretty much identical to the Cycles EXR files, I suspect that it is these metadata from Cycles that is tripping up my editor. Unfortunately I've tried a trial version of the newest Vegas release and it is similarly flawed. I'm also asking over on their forum, but I honestly expect to hear crickets from their tech support.

My million-dollar question is:

Is it possible to remove the extra metadata shown in the image above from OpenEXR files output from Cycles?

There is no option that I have found in the UI, and I'm not sure if there's some editable Python somewhere that controls how EXR files are written. Any help would be hugely appreciated.

It's worth noting that all of the above-mentioned files will import into Davinci Resolve. So I realize it's very likely a Vegas issue, I'm just looking for a workaround.

Edit for add'l information:

  1. Someone else has found that the non-working file will open in modern Photoshop but not open in Photoshop CS2, which is fairly old.
  2. Using ExifTool, I found there is an additional difference between the metadata of the two files. On the line for "flags:" the Cycles file has the value "long names" while the Eevee file has the value "(none)"
$\endgroup$
7
  • $\begingroup$ Have you tried unchecking all metadata under Output Properties > Metadata? I guess this won't help and you probably did this, but since you wrote you have found "no option" I am not sure. $\endgroup$ Sep 11, 2023 at 14:15
  • $\begingroup$ @GordonBrinkmann good hint, but will not work. I disabled all of them and Blender still writes the red marked ones into the metadata. $\endgroup$
    – taiyo
    Sep 11, 2023 at 15:14
  • $\begingroup$ @GordonBrinkmann yes I have, sorry I didn't make that clear. All metadata options have been unchecked. $\endgroup$
    – JSTG
    Sep 11, 2023 at 15:30
  • $\begingroup$ Ah okay I see, I couldn't test it myself. Apart from that being the only difference you have found, do you have a way to remove it manually and see if this really helps with the problem? $\endgroup$ Sep 11, 2023 at 18:06
  • $\begingroup$ Added new info at bottom of post. And I wish I knew how to do that @GordonBrinkmann, but even ExifTool only has read-only for EXR files. If you can think of a method, I would love to try it. $\endgroup$
    – JSTG
    Sep 11, 2023 at 18:59

1 Answer 1

0
$\begingroup$

I possibly found a workaround. First go to the Compositing tab, enable Use Nodes and create this setup. The Viewer node is important:

enter image description here

The Composite node must not be connected to the Render Layers node necessarily, but must be present or Blender will complain on rendering: No render output node in scene.

Now head over to the Scripting tab, adjust the output paths of the script and run it (this type of script is one you probably want to Text Editor > Text > Register for some better workflow, also have a look at the app handler API):

import bpy

renderpath = "<your path to>/renderresult.exr"
viewerpath = "<your path to>/viewernode.exr"

def render_post(dummy):
    bpy.data.images['Render Result'].save_render(renderpath)
    bpy.data.images['Viewer Node'].save_render(viewerpath)

bpy.app.handlers.render_post.append(render_post)

Again for some workflow, saving the render result image is not mandatory, but we want to compare the metadata. Hit Render > Render Image and you should automatically get two .exr files. The file sizes are almost equal. Comparing the metadata of them gives me this (I used this awesome script):

renderresult.exr

channels {'A': {'pixel_type': 2, 'pLinear': 0, 'reserved': [0, 0, 0], 'xSampling': 1, 'ySampling': 1}, 'B': {'pixel_type': 2, 'pLinear': 0, 'reserved': [0, 0, 0], 'xSampling': 1, 'ySampling': 1}, 'G': {'pixel_type': 2, 'pLinear': 0, 'reserved': [0, 0, 0], 'xSampling': 1, 'ySampling': 1}, 'R': {'pixel_type': 2, 'pLinear': 0, 'reserved': [0, 0, 0], 'xSampling': 1, 'ySampling': 1}}
compression ZIP_COMPRESSION
cycles.ViewLayer.render_time 00:00.35
cycles.ViewLayer.samples 4096
cycles.ViewLayer.synchronization_time 00:00.54
cycles.ViewLayer.total_time 00:00.90
dataWindow {'xMin': 0, 'yMin': 0, 'xMax': 199, 'yMax': 199}
displayWindow {'xMin': 0, 'yMin': 0, 'xMax': 199, 'yMax': 199}
lineOrder INCREASING_Y
pixelAspectRatio 1.0
screenWindowCenter [0.0, 0.0]
screenWindowWidth 1.0

viewernode.exr

channels {'A': {'pixel_type': 2, 'pLinear': 0, 'reserved': [0, 0, 0], 'xSampling': 1, 'ySampling': 1}, 'B': {'pixel_type': 2, 'pLinear': 0, 'reserved': [0, 0, 0], 'xSampling': 1, 'ySampling': 1}, 'G': {'pixel_type': 2, 'pLinear': 0, 'reserved': [0, 0, 0], 'xSampling': 1, 'ySampling': 1}, 'R': {'pixel_type': 2, 'pLinear': 0, 'reserved': [0, 0, 0], 'xSampling': 1, 'ySampling': 1}}
compression ZIP_COMPRESSION
dataWindow {'xMin': 0, 'yMin': 0, 'xMax': 199, 'yMax': 199}
displayWindow {'xMin': 0, 'yMin': 0, 'xMax': 199, 'yMax': 199}
lineOrder INCREASING_Y
pixelAspectRatio 1.0
screenWindowCenter [0.0, 0.0]
screenWindowWidth 1.0
xDensity 72.0

The only differences in the metadatas are that the viewernode.exr does not has these annoying cycles.ViewLayer. ... entries anymore but got a new entry xDensity. But this is a standard attribute so it should not cause new problems.

$\endgroup$
3
  • $\begingroup$ Brilliant, this actually works! It imports into Vegas Pro beautifully. Apparently it is those initial Cycles strings that are tripping up the import process. I'm going to put my little scripting knowledge to the test and see if I can modify your script for animation output. Thanks again, super helpful :). $\endgroup$
    – JSTG
    Sep 12, 2023 at 0:18
  • $\begingroup$ @JSTG Welcome. Maybe it's the dots in the string or the custom metadata itself, who knows. I find it pretty meh that Blender adds this metadata unasked. There should really be an option for that. $\endgroup$
    – taiyo
    Sep 12, 2023 at 8:28
  • $\begingroup$ Metadata isn't annoying, it is helpful and useful. What is annoying are incompetent devs not being able to read attributes in an EXR file, which isn't hard to do at all. Attributes should not ever cause problems, standard or not. $\endgroup$ Apr 15 at 21:06

You must log in to answer this question.

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