EXR Header Metadata

Format

MoonRay outputs internal Checkpoint and Resume render information as metadata of the EXR header. The metadata information is added to the output image file when at least one of the following settings is true.

  • checkpoint_rendering = true
  • resume_rendering = true
  • resumable_output = true

The metadata information can be retrieved by the command-line

oiiotool -info -v filename.exr

The following is a description of the available metadata information:

Meta data Description
progressCheckpointTileSamples: N The final tile sample totals for this file in checkpoint mode
adaptiveSamplingV1: min max err The adaptive sampling values for this render result
AovFilterMinAdaptiveSamples: N The minimum adaptive sample number for AOV filter
resumeHistory: All resume history of this image in JSON format. Each resume render history info is stored as a JSON object inside the "history" JSON array. One resumeHistory consists of four different sections: "sampling", "execEnv", "timingSummary" and "timingDetail".
  • The "sampling" section includes sampling related information
  • The "execEnv" section includes environment related information, such as hostname and timezone
  • The "timingSummary" section includes summary timing information
  • The "timingDetail" records all detailed timing information
sampling section:
Key Type Description
adaptiveTargetError float The adaptive sampling target error (which only exists for Adaptive sampling mode)
minSamples int The minimum samples per pixel
maxSamples int The maximum samples per pixel
samplingType string "ADAPTIVE" or "UNIFORM". Indicates the sampling type
sampleResult Detailed sampling information about the internal sampling count. This is useful to compare image quality by a sampling number.
sample result:
Key Type Description
bsdfSamples int The total number of BSDF samples
bssrdfSamples int The total number of BSSRDF samples
lightSamples int The total number of LIGHT samples
PixelSamples int The total number of PIXEL samples
totalSamples int The total of the above samples
execEnv section:
Key Type Description
hostname string The hostname which generated this file
numberOfThreads int The number of threads used by renderer
UTCOffsetHours float The UTC offset, in hours, for timezone calculation
DWA_HOST_RU string The "DWA_HOST_RU" environment value
DWA_FULL_ID string The "DWA_FULL_ID" environment value
Note that DWA_HOST_RU and DWA_FULL_ID info only exists when they are specified as environment variables
timingSummary section:
Key Type Description
checkpointAverageSec float Average time in seconds spent during the checkpoint data output operation, but not including the background thread writing cost
checkpointTotalSecExcludeLast float The total time in seconds spent during the checkpoint data output operation but not including the last checkpoint output cost, nor the background thread writing cost
checkpointTotal int The total count of output checkpoint data writtent to the disk
mcrtSec float The time in seconds spent in the MCRT computation stage
renderPrepSec float The time in seconds spent in the RenderPrep stage
timingDetail section:
Key Type Description
startTileSamplesId unsigned int start tileSamples id
procStartTime time format Process start time (start time of this render process)
frameStartTime time format Frame computation start time (the renderPrep start time for this frame)
MCRT MCRT info format The detailed MCRT phase information consists of multiple checkpoint stint information
Note that calculating the (frameStartTime - procStartTime) is useful to determine the spend for process boot time, including initializing dso's and related activities.
time format:
Key Type Description
date string Human readable time display
sec unsigned long Seconds since the Epoch (1970-01-01 00:00:00 -0000 (UTC))
usec unsigned long Microseconds since the Epoch (1970-01-01 00:00:00 -0000 (UTC))
MCRT info format:
detailed MCRT phase timing information. This info consists of multiple checkpoint stint information.

Each checkpoint stint info:
Key Type Description
stint int ID of the checkpoint stint. Start from id = 0
MCRTStartTime time format Timing of when the MCRT computation started
MCRTEndTime time format Timing of when the MCRT computation ended
endTileSamplesId unsigned int The end tileSamples ID
Note: Calculating the first (MCRTStartTime - frameStartTime) would equal renderPrep time span.
Calculating the second (MCRTStartTime - 1stMCRTEndTime) would equal the first checkpoint output time span.
...
Calculating the (Nth MCRTStartTime - (N-1 )th MCRTEndTime) would equal the (N-1 )th checkpoint output time span

Example Metadata Output

In this example, checkpoint0.exr was constructed in two different Resume render runs. The first run created a checkpoint file twice and the second run also created a checkpoint file twice.

$ oiiotool -info -v checkpoint0.exr
Reading checkpoint0.exr
result0.exr          :  640 x  360, 10 channel, half/float/half/float/float/float/float/float/float/float openexr
    channel list: alpha (half), alpha aux (float), heat (half), weight (float), beauty aux.R (float), beauty aux.G (float), beauty aux.B (float), beauty.R (float), beauty.G (float), beauty.B (float)
    adaptiveSamplingV1: 16, 4096, 0.002
    AovFilterMinAdaptiveSamples: 16
    compression: "zip"
    DateTime: "2020:02:28 12:03:51"
    PixelAspectRatio: 1
    progressCheckpointTileSamples: 262144
    resumeHistory: "{
"history":[
{
  "sampling":{
    "samplingType":"ADAPTIVE",
    "minsamples":16,
    "maxSamples":4096,
    "adaptiveTargetError":20.000000,
    "sampleResult":{
      "PixelSamples":2534400,
      "lightSamples":263001357,
      "bsdfSamples":253638901,
      "bssrdfSamples":0,
      "totalSamples":519174658
    }
  },
  "execEnv":{
    "hostname":"pearldiva.gld.dreamworks.net",
    "numberOfThreads":36,
    "UTCOffsetHours":-8.000000
  },
  "timingDetail":{
    "startTileSamplesId":0,
    "procStartTime":{"date":"2020/Feb/28 Fri 9:36:31:122","sec":1582911391,"usec":122668},
    "frameStartTime":{"date":"2020/Feb/28 Fri 9:36:31:239","sec":1582911391,"usec":239244},
    "MCRT":[
      {
        "stint":0,
        "MCRTStartTime":{"date":"2020/Feb/28 Fri 9:36:32:275","sec":1582911392,"usec":275429},
        "MCRTEndTime":{"date":"2020/Feb/28 Fri 9:36:34:544","sec":1582911394,"usec":544933},
        "endTileSamplesId":63
      },
      {
        "stint":1,
        "MCRTStartTime":{"date":"2020/Feb/28 Fri 9:36:34:724","sec":1582911394,"usec":724029},
        "MCRTEndTime":{"date":"2020/Feb/28 Fri 9:36:53:694","sec":1582911413,"usec":694280},
        "endTileSamplesId":703
      }
    ]
  },
  "timingSummary":{
    "renderPrepSec":1.036185,
    "mcrtSec":21.239756,
    "checkpointTotalSecExcludeLast":0.179096,
    "checkpointTotal":2,
    "checkpointAverageSec":0.089548
  }
}
,
{
  "sampling":{
    "samplingType":"ADAPTIVE",
    "minSamples":16,
    "maxSamples":4096,
    "adaptiveTargetError":20.000000,
    "sampleResult":{
      "PixelSamples":1651242,
      "lightSamples":171567352,
      "bsdfSamples":165628605,
      "bssrdfSamples":0,
      "totalSamples":338847199
    }
  },
  "execEnv":{
    "hostname":"pearldiva.gld.dreamworks.net",
    "numberOfThreads":36,
    "UTCOffsetHours":-8.000000,
    "DWA_HOST_RU":"1234.5678",
    "DWA_FULL_ID":"121126862.1.4.101.1"
  },
  "timingDetail":{
    "startTileSamplesId":704,
    "procStartTime":{"date":"2020/Feb/28 Fri 12:3:25:695","sec":1582920205,"usec":695025},
    "frameStartTime":{"date":"2020/Feb/28 Fri 12:3:26:95","sec":1582920206,"usec":95499},
    "MCRT":[
      {
        "stint":0,
        "MCRTStartTime":{"date":"2020/Feb/28 Fri 12:3:33:831","sec":1582920213,"usec":831233},
        "MCRTEndTime":{"date":"2020/Feb/28 Fri 12:3:34:749","sec":1582920214,"usec":749350},
        "endTileSamplesId":787
      },
      {
        "stint":1,
        "MCRTStartTime":{"date":"2020/Feb/28 Fri 12:3:34:996","sec":1582920214,"usec":996935},
        "MCRTEndTime":{"date":"2020/Feb/28 Fri 12:3:50:476","sec":1582920230,"usec":476337},
        "endTileSamplesId":262143
      }
    ]
  },
  "timingSummary":{
    "renderPrepSec":7.735734,
    "mcrtSec":16.397518,
    "checkpointTotalSecExcludeLast":0.247585,
    "checkpointTotal":2,
    "checkpointAverageSec":0.123793
  }
}
]
}"
    screenWindowCenter: 0, 0
    screenWindowWidth: 1
    oiio:ColorSpace: "Linear"
    oiio:subimages: 1
$