ImageReader : Default channels from "rgba_main", "rgba.main", and "depth_main" subimages
See original GitHub issueSummary
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 arergba.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:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Closing - this was done in #4617.
Dan and John, thanks very much! I’m looking forward to trying it out in the release.