question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ImageReader : Default channels from "rgba_main", "rgba.main", and "depth_main" subimages

See original GitHub issue

Summary

It would be helpful if the ImageReader node recognized channels from rgba_main (or rgb_main) and depth_main subimages and loaded them into the primary image layer automatically. Another variation observed was rgba.main.

User story

What

Being able to process/view multipart EXRs without having to use a Shuffle node or manually picking the primary RGBA channels in the viewer, similar to Nuke. (Tested in Gaffer 0.61.)

Why

VFX vendors have been sending IE multipart EXRs as plates or intermediate precomps, for which we need to map to standard RGBA before dailying/writing:

  • rgba_main
  • rgb_main
  • depth_main
  • rgba.main (channels are rgba.main.RGBA)
  • rgb.main
  • depth.main

Implementation notes

Probably an extension to #4385. Alternatively, would it make sense to use part 0’s name as the primary layer to handle future cases more generally?

Example 1

Nuke channels: rgba.red, rgba.green, rgba.blue, depth.Z Gaffer channels: rgba_main.R, rgba_main.G, rbga_main.B, depth_main.depth.Z

Obtained by calling:

nuke.toNode("Read1").channels()
root["ImageReader"]["out"]["channelNames"].getValue()

Sample exrheader output:

file format version: 2, flags 0x1000


 part 0:
channels (type chlist):
    B, 32-bit floating-point, sampling 1 1
    G, 32-bit floating-point, sampling 1 1
    R, 32-bit floating-point, sampling 1 1
chunkCount (type int): 27
compression (type compression): piz
dataWindow (type box2i): (0 147) - (2047 1004)
displayWindow (type box2i): (0 0) - (2047 1151)
lineOrder (type lineOrder): increasing y
name (type string): "rgba_main"
pixelAspectRatio (type float): 1
screenWindowCenter (type v2f): (0 0)
screenWindowWidth (type float): 1
type (type string): "scanlineimage"


 part 1:
channels (type chlist):
    depth.Z, 32-bit floating-point, sampling 1 1
chunkCount (type int): 27
compression (type compression): piz
dataWindow (type box2i): (0 147) - (2047 1004)
displayWindow (type box2i): (0 0) - (2047 1151)
lineOrder (type lineOrder): increasing y
name (type string): "depth_main"
pixelAspectRatio (type float): 1
screenWindowCenter (type v2f): (0 0)
screenWindowWidth (type float): 1
type (type string): "scanlineimage"

Example 2

Nuke channels: rgba.red, rgba.green, rgba.blue, arbitrary.red, arbitrary.green, arbitrary.blue Gaffer channels: rgba.main.R, rgba.main.G, rbga.main.B, arbitrary.main.red, arbitrary.main.green, arbitrary.main.blue

This one uses a dot instead of underscore in the name.

file format version: 2, flags 0x1000


 part 0:
channels (type chlist):
    B, 16-bit floating-point, sampling 1 1
    G, 16-bit floating-point, sampling 1 1
    R, 16-bit floating-point, sampling 1 1
chunkCount (type int): 36
compression (type compression): piz
dataWindow (type box2i): (0 0) - (2047 1151)
displayWindow (type box2i): (0 0) - (2047 1151)
framesPerSecond (type rational): 24/1 (24)
lineOrder (type lineOrder): increasing y
name (type string): "rgba.main"
nuke/full_layer_names (type int): 0
pixelAspectRatio (type float): 1
screenWindowCenter (type v2f): (0 0)
screenWindowWidth (type float): 1
type (type string): "scanlineimage"
view (type string): "main"


 part 1:
channels (type chlist):
    blue, 16-bit floating-point, sampling 1 1
    green, 16-bit floating-point, sampling 1 1
    red, 16-bit floating-point, sampling 1 1
chunkCount (type int): 36
compression (type compression): piz
dataWindow (type box2i): (0 0) - (2047 1151)
displayWindow (type box2i): (0 0) - (2047 1151)
lineOrder (type lineOrder): increasing y
name (type string): "arbitrary.main"
pixelAspectRatio (type float): 1
screenWindowCenter (type v2f): (0 0)
screenWindowWidth (type float): 1
type (type string): "scanlineimage"
view (type string): "main"

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
johnhaddoncommented, Apr 19, 2022

Closing - this was done in #4617.

0reactions
brendanholtcommented, Apr 21, 2022

Dan and John, thanks very much! I’m looking forward to trying it out in the release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found