I am talking about "multi-layer" which is a single "part" with many channels that are logically grouped togheter in layers. Right now I'm interested in the EXR case, with its rules of naming layers -- which I think I understand. For simplicity, let's assume a single EXR view and the following channels:
R, G, B, A, shape1.R, shape1.G, shape1.B, shape1.A, shape2.R, shape2.G, shape2.B, shape2.A The layers would be: the (default) nameless layer and respectively the "shape1" and "shape2" layers. So, what I want to know is how to merge these 3 layers into 1 layer (containing only RGBA), for viewing the end result!? What layer is in front of another, or at the back? That's what I meant with "the order in which to merge [the layers]" -- determining which layer is more at the front or at the back. As I understand OpenEXR, the depth channels (Z & ZBack) correspond to the deep pixels (for all channels of a pixel), and don't reveal which layer is at the front or back. Am I missing something? Can the Z & ZBack channels apper on non-deep (/flat) EXRs and are they used to tell the depth of layer channels on a per pixel basis -- so my example would need Z, shape1.Z and shape2.Z? Radu Arjocu ________________________________ From: Oiio-dev <[email protected]> on behalf of Larry Gritz <[email protected]> Sent: Wednesday, September 16, 2020 20:23 To: OpenImageIO developers <[email protected]> Subject: Re: [Oiio-dev] How to merge layers of multi-layer EXRs? Are you talking about a "multi-part" exr (what OIIO calls multi-subimage), or are you talking about "multi-layer" which is a single "part" with many channels but that just follows a convention for how to name those channels so that they can be grouped easily by an application? If you just want a single RGBA image in the end, then are you just talking about simply extracting the RGBA channels for export to another format? "flatten" just composites the multiple depth samples within each pixel of a deep image to a single per-channel value. But it does not affect which channels are in which "part" of a multi-part image. On Sep 16, 2020, at 7:45 AM, Radu Arjocu <[email protected]<mailto:[email protected]>> wrote: Hello, Being relatively new to the OpenEXR format, I have a couple of questions regarding multi-layer EXR: 1) What is the (optimal) way to go if I want to merge/compose all the layers of an EXR (say flat image for simplicity) into a single layer (RGBA-only channels), so that I can convert it to another format and rescale it as needed for quick viewing ? -- just like viewing thumbnails, but probably at a higher resolution. I understand that I have to manually determine what the layers are and their respective channels, but I don't know (especially) the order in which to merge them. NOTE: I use the terminology "flat image" to refer to non-deep images (since "flattening" is used by OIIO to denote this operation) and "merge"/"compose" for rendering multi-layers into a single layer; but other SW use "flattening" to refer to the merge/compose operation. 2) How do I treat "special" channels like effects, vectors etc. in the scenario at point 1? 3) Does using the `flatten()` function for deep and multi-layer images (EXRs) also merge the layers or not? I assume not, but I cannot verify this, since I don't have an EXR sample. I would greatly appreciate if someone has a sample like this. Thank you, Radu Arjocu<https://protect2.fireeye.com/v1/url?k=c25e4a02-9cd1f486-c2592a0e-86801c117383-76c7f1f405a319a7&q=1&e=975968e2-8694-4935-af42-44e261a41663&u=http%3A%2F%2Fwww.masstech.com%2F> _______________________________________________ Oiio-dev mailing list [email protected]<mailto:[email protected]> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org<https://protect2.fireeye.com/v1/url?k=82a4ba62-dc2b04e6-82a3da6e-86801c117383-ba9b89b8c2796bf7&q=1&e=975968e2-8694-4935-af42-44e261a41663&u=http%3A%2F%2Flists.openimageio.org%2Flistinfo.cgi%2Foiio-dev-openimageio.org> -- Larry Gritz [email protected]<mailto:[email protected]>
_______________________________________________ Oiio-dev mailing list [email protected] http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
