Page MenuHome

Improvements and fixes to Cycles metadata
ClosedPublic

Authored by Sergey Sharybin (sergey) on Wed, Feb 6, 11:57 AM.

Details

Summary

Improvements and fixes to Cycles metadata

This is a request by the studio here to make it possible to see how many samples were used to render a specific shot or a frame. It is a bit more tricky than simply stamping number of samples from a scene since rendering is happening in multiple ranges of samples.

This change makes it so Cycles saves configured number of samples for the specific view layer, and also stores start sample and number of samples when rendering only a subrange of all samples.

The format used is "cycles.<view_layer_name>.><field>", which allows to have information about all layers in a multi-layer EXR file. Ideally we can store simplified "cycles.<field>" if we know that there is only one render layer in the file, but detecting this is somewhat tricky since Cycles operates on an evaluated scene which always have single view layer.

The metadata is shown in the Metadata panels for clip, image and sequencer spaces.

Example screenshot which shows the metadata:

Diff Detail

Repository
rB Blender

Event Timeline

Brecht Van Lommel (brecht) requested changes to this revision.Wed, Feb 6, 12:24 PM

I think this information should be in a panel, which can be implemented in C too.

It'll be less code and more generally useful.

This revision now requires changes to proceed.Wed, Feb 6, 12:24 PM

which can be implemented in C too.

Panel MUST be in C, since there is no easy way to access currently visible frame in the editor. Also, current python API to access metadata is more like a joke -- only works for movie clip if that points to a movie file,

Move metadata to panel.

Benefit: we can display all the metadata fields.

Disadvantage: requires way wider panel, which is especially
annoying in clip editor which doesn't have region overlap
by default, which forces image to be tiny.

There is also some improvements possible to ensure that
metadata is listed for an exact image which is currently
visible in the editors.

Still weak part of copying metadata from ImBuf to render
result: we (probably) don't want some internal EXR fields
to be copied as a metadata (which includes things like
scanline configuration).

Sergey Sharybin (sergey) edited the summary of this revision. (Show Details)Wed, Feb 6, 1:48 PM

Copy all custom metadata fields to RenderResult for multilayer images.

Matches behavior of non-multilayer images, where we will show all the
available metadata, without ignoring any of it.

Sergey Sharybin (sergey) edited the summary of this revision. (Show Details)Wed, Feb 6, 1:55 PM

Other point of doing it in the panel is that it is view/zoom independent.

This revision is now accepted and ready to land.Wed, Feb 6, 2:03 PM
This revision was automatically updated to reflect the committed changes.

This panel is included in VSE preview.
If ibuf->metadata is NULL it crashes Blender.