Skip navigation
Currently Being Moderated

Change in EXR open from CS2 to CS3 can this be fixed?

Nov 18, 2008 2:42 AM

It seems the monkeys have been at the file formats again...!

Open an exr with an alpha in CS2 and the image displays normally and the alpha is retained.

Open an exr with an alpha in CS3 and the alpha channel is applied to the transparency and then lost... which is really STUPID considering you might apply 0 alpha values to parts of the image you retain visually, as you might just want to use the alpha to drive an effect and not just be myopic and think it's just for transparency.

So, can this be fixed? I can't see any info on it?

Will CS2 non intel plugin work on an intel system in CS3

If not, effectively PS is useless for exr work for us.

Or is this fixed in CS4?
 
Replies 1 2 3 ... 7 Previous Next
  • Currently Being Moderated
    Nov 18, 2008 7:04 AM   in reply to (progress)
    start CS3 in Rosetta and the plugin should work.
     
    |
    Mark as:
  • Currently Being Moderated
    Nov 18, 2008 11:26 AM   in reply to (progress)
    CS2 did not support transparency in 32 bit/channel, thus could not show transparency in OpenEXR documents, and so opened the transparency channel into an alpha channel.

    CS3 does support transparency in 32 bit/channel, uses the transparency data from OpenEXR documents, and opens the transparency channel as transparency.

    This can only be fixed by adding UI to the OpenEXR plugin "Do you really understand that transparency is transparency?".
     
    |
    Mark as:
  • Currently Being Moderated
    Nov 20, 2008 6:39 AM   in reply to (progress)
    This is a huge deal for us (Pixar) as well. We are trying to integrate (finally) OpneEXR into our pipeline and when I load OpenEXR files with alpha computed by the renderman, it gets lost in Photoshop CS3/CS4.
    Now the option here is to either ask Adobe to fix this in CS4 and allow an option at the loader level or we have to write our own OpenEXR reader.
    To better understand since I don't get the difference between transparency and alpha (for us, we just deal with alpha) how the OpenERX file should be structured so that we can retain the alpha/transparency from the file ? Maybe we can modify the renderman driver.

    thanks,
    guido
     
    |
    Mark as:
  • Currently Being Moderated
    Nov 20, 2008 7:38 PM   in reply to (progress)
    Hi Chris,

    with OpenEXR it is standard practice to interpret the "A"
    channel as pre-multiplied alpha. Compositing a foreground
    layer over a background layer is correctly done like this
    (see http://www.openexr.com/TechnicalIntroduction.pdf, page 5):

    composite = foreground + (1-alpha) * background

    Programs that read and write OpenEXR files generally adhere
    to this convention. I don't know how transparency works in
    Photoshop; your message suggests that PS transparency is not
    the same as alpha. This would imply that PS should not treat
    OpenEXR's alpha channel as if it was transparency. Of course,
    PS could add transparency channels as needed when it writes
    OpenEXR files.

    Florian
     
    |
    Mark as:
  • Currently Being Moderated
    Nov 20, 2008 8:54 PM   in reply to (progress)
    Great read. Thank you.
     
    |
    Mark as:
  • Currently Being Moderated
    Nov 24, 2008 2:15 PM   in reply to (progress)
    Florian - you are confusing the terms alpha (any extra channel) with transparency (what you called alpha). Photoshop reads and writes OpenEXR files exactly as you stated - with premultiplied transparency.

    Apparently some users thought EXR supported general alpha channels and are now confused when those channels are treated as transparency (as the file format specifies).
     
    |
    Mark as:
  • Currently Being Moderated
    Nov 24, 2008 2:18 PM   in reply to (progress)
    Alpha Channel - any extra channel beyond the color channels. This has nothing to do with transparency (except as a historical footnote). Anything can be stored in an alpha channel, it does not have to be related to the color channels at all. You can have many alpha channels in an image.

    Transparency - a subset of extra channels, closely related to the color channels, with special meaning. Can also be called Opacity (transparency and opacity are the reverse of one another). You can only have one transparency channel in an image. This may be premultiplied with the color data, depending on the file format specification.
     
    |
    Mark as:
  • Currently Being Moderated
    Nov 24, 2008 2:25 PM   in reply to (progress)
    Guido - Photoshop DOES preserve the transparency/opacity data from EXR files, exactly as specified by the file format spec. The only exception was in CS2 when Photoshop did not support 32 bit transparency, in CS2 we just read the transparency channel in as an alpha channel.

    If you are trying to use the EXR "A" channel for something other than transparency - STOP. The file format does not allow that. You can add other named channels in EXR, but Photoshop doesn't yet support them.
     
    |
    Mark as:
  • Currently Being Moderated
    Nov 24, 2008 4:11 PM   in reply to (progress)
    Progress - read Florian's statement and the EXR spec. again. His "A" is defined as transparency. The explanation is just confused by referring to it as alpha (which could be any additional channel, not just transparency). But the math, and the requirement for premultiplication means it must be transparency. That is the only interpretation available, and the interpretation that Photoshop uses.

    Yes, premultiplied transparency does lose image data -- but that is the way the EXR format is defined. Your "nuking" happened when you saved the EXR file, because it has to be premultiplied (transparent areas go to zero in the color channels).

    The only change Photoshop makes is to un-multiply the data, because Photoshop does not work with premultiplied data. The data is re-multiplied when you save the file, resulting in no net change to the file data. Transparent EXR files round trip just fine through Photoshop, as far as I can test with files from ILM, or those that I have created.

    If you wish to have an arbitrary alpha channel (one not treated as transparency) in the EXR format, you will need a third party plugin. EXR does allow for extra channels, but the Photoshop EXR plugin does not support them yet.
     
    |
    Mark as:
  • Currently Being Moderated
    Nov 24, 2008 4:22 PM   in reply to (progress)
    Chris, and Progress,
    I guess I don't understand what Photoshop does with OpenEXR's A channel.
    When you open an EXR image with RGB and A channels in PS, and then
    immediately save the image, will the new file not be identical to the original?
     
    |
    Mark as:
  • Currently Being Moderated
    Nov 24, 2008 5:21 PM   in reply to (progress)
    The color channels may be altered slightly due to un-multiplying and re-multiplying (remember: Photoshop does not use premultiplication, so we have to un-multiply to use the image). So, the least significant bits may change.
     
    |
    Mark as:
  • Currently Being Moderated
    Nov 24, 2008 6:33 PM   in reply to (progress)
    Chris,

    In an EXR image it is legal to have pixels with non-zero RGB values
    and a zero or nearly zero A value. Such a pixel represents an object
    that emits light but is otherwise transparent, for example, a candle
    flame. (If you place a candle between a bright light source and a
    screen, the flame casts no shadow.) In this case un-premultiplying
    leads to infinite or very large RGB values.

    Chris, I agree with you, the A channel should be used for alpha (in
    the transparency sense). I don't see how PS could possibly guess that
    A is in some files really a depth channel. That's why EXR supports
    arbitrary channels, and why the specification recommends using Z for
    depth. On the other hand, this would be less of an issue if PS
    guaranteed that RGBA data pass through unaltered unless the user
    explicitly modifies the image.
     
    |
    Mark as:
  • Currently Being Moderated
    Nov 25, 2008 1:24 PM   in reply to (progress)
    Progress - yes, you can un-multiply (aka divide with appropriate handling for zeros)! You have to in order to bring a premultiplied image into an app that doesn't work with premultiplied data. We do it all the time with file format that specify premultiplied data (like TIFF). Premultiplication does not necessarily happen at the render stage - it may, depending on the renderer, but in many cases it is an explicit step since some file formats want premultiplied data and others do not.

    And your description of what Photoshop does with the transparency channel of EXR files is very, very wrong. The transparency is not lost in any way (assuming you are using CS3 or CS4 extended, since the standard version does not support 32 bit transparency/layers/compositing).

    Photoshop cannot "pass through unaltered" because the file format is premultiplied and Photoshop doesn't work with premultiplied data. We have to undo the multiplication. Then the file format requires that it be multiplied before saving.
     
    |
    Mark as:
  • Currently Being Moderated
    Nov 25, 2008 7:44 PM   in reply to (progress)
    And it looks like Guido's problem was some people using extended, and other people using standard (who could not see the transparency correctly, because standard does not support 32 bit/channel transparency).
     
    |
    Mark as:
  • Currently Being Moderated
    Nov 26, 2008 11:19 AM   in reply to (progress)
    Progress - no, it is not broken, it is working exactly as intended, exactly as the file format spec. says it should.

    In the openEXR file format, the "A" channel is defined as transparency/opacity, and the color data must be premultiplied with that transparency/opacity channel.

    If you render an image with transparency/opacity into OpenEXR, Photoshop will open that image with transparency/opacity - exactly as the file format spec. says it should.

    Many file formats include transparency/opacity and are premultiplied (like TIFF), and we have been handling them exactly the same way since Photoshop 3.0. There has been no change - we have to treat transparency/opacity as transparency/opacity.

    With CS2, it was broken - because 32 bit/channel did not support transparency or layers (they are connected). So, in CS2 (and Photoshop standard) you get the same result as if you'd opened a transparent TIFF back in Photoshop 2.5 -- the color data, with transparency stored in an alpha channel (because we had no way to display or use the transparency).

    Your description is very confused, so I'm not really sure what you are trying to accomplish. But the OpenEXR support is working exactly as it must work.
     
    |
    Mark as:
  • Currently Being Moderated
    Nov 26, 2008 12:13 PM   in reply to (progress)
    Progress - it really is that simple.

    If you open a TIFF with transparency, Photoshop shows transparency - otherwise the TIFF file was written incorrectly (something certain 3D apps mess up from time to time) or you wrote the extra channel as an arbitrary alpha channel. TIFF does support transparency/opacity and arbitrary alpha channels.

    TGA should support transparency, but we backed off because so many people were misusing the file format. We still have people who want to open it one way and save it another (meaning we should prompt for how to handle the fourth channel at open and save).

    JPEG does not support transparency at all.

    The transparency/opacity in an EXR file is not lost - it's right there as transparency/opacity. Where it is supposed to be. Nothing is removed. Nothing is deleted. Oother file formats that support transparency/opacity work the same way. Other file formats that are premultiplied work exactly the same way.

    CS2 was just broken with regard to 32 bit transparency. CS3 standard tries to follow the CS2 path because it also does not support 32 bit transparency. But CS3 (and CS4) extended are working exactly as they must work.

    Look: transparency/opacity is transparency/opacity and must stay transparency/opacity. If you want to use that extra channel for something other than transparency/opacity - use another file format that supports that concept. Right now you are either hopelessly confused about the concept, or just using the wrong file format to do what you are trying to do.
     
    |
    Mark as:
  • Currently Being Moderated
    Nov 26, 2008 2:45 PM   in reply to (progress)
    I find this discussion very confusing. Does anyone have an example,
    say, an EXR file with alpha straight from a renderer and the same file
    after it has gone through PS?
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 2, 2008 11:40 AM   in reply to (progress)
    alpha != transparency -- they are not the same and the terms have not meant the same thing in over 20 years.

    Progress - remember, alpha can have multiple meanings (arbitrary alpha channel, or transparency/opacity). Please be clear about which meaning you are using. If you mean transparency or opacity, say so. If you mean some extra channel that has no relation to the color channels (alpha channel), say so.

    TIFF can contain transparency/opacity AND/OR arbitrary alpha channels. If you have a TIFF with transparency/opacity, then the TIFF will open with transparency. Some 3D packages have bugs in their TIFF support where they fail to mark the transparency channel as transparency, so it opens as an alpha channel instead.

    OpenEXR does not support arbitrary alpha channels, only transparency/opacity.

    LOL! TGA was changed to follow the spec. Some users were using it incorrectly. So we changed it back to NOT following the spec. It's still maybe 60/40 on the usage of TGA, and we get complaints from both sides.

    OpenEXR is implemented correctly in Photoshop, exactly as the spec. says it has to be implemented.
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 4, 2008 1:55 PM   in reply to (progress)
    I loaded the Blobbies.exr file from the OpenEXR sample image collection
    into Photoshop CS3. The file has an A channel (the kind that PS calls
    "transparency" and most other people call "alpha").

    I used the paintbrush tool to paint onto both transparent and opaque
    areas of the image, and I used the eraser tool to create holes in the
    opaque areas. Then I saved the result in another EXR file and looked
    at the file's R, G, B and A channels with exrdisplay. The data in the
    file were what I expected: the paintbrush had moved the A values closer
    to 1.0 and the eraser had moved the A values closer to 0.0. The RGB
    values seemed to have been properly premultiplied with A. Compositing
    the painted-on image on top of another image in PS also produced the
    expected results.

    As far as I can tell Chris is right, PS handles OpenEXR's A channel
    correctly. What am I missing?

    The case where A is zero and R, G and B are not zero means something
    inherently different in PS and EXR. PS could probably do a pretty good
    approximation of the EXR semantics by clamping EXR's A to the range
    [1e-9, 1] before un-premultiplying. For all practical purposes an A
    value of 1e-9 is zero, but it would allow PS to preserve non-zero
    RGB values and to un-un-premultiply on save.
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 9, 2008 11:15 AM   in reply to (progress)
    I think what progress wants is for the "A" channel to open as an arbitrary alpha channel so he can edit it directly.

    But OpenEXR defines "A" as transparency/opacity - and you can't easily edit transparency/opacity data in Photoshop without editing the color data as well.

    And because OpenEXR is premultiplied, there may not be anything to work with in the transparent areas anyway.

    Again, he's using the wrong file format for what he's trying to do.
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 10, 2008 3:25 AM   in reply to (progress)
    Progress: I so agree with you. I sit on OpenEXR images that are currently useless right now. I don´t care if the alpha channel is transparency or not - I just want the possibility to edit that channel. Now I can´t!

    OpenEXR is the right file format for me as it supports high dynamic range and is (was) great for renderings. I could choose TIFF too but it´s the same problem there. The alpha is applied and the channel removed. My previous workflow was smooth when I could include the alpha directly into the file instead of render two files for every image.

    It worked in the previous Photoshop versions so why change the plugin now?
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 10, 2008 11:45 AM   in reply to (progress)
    Yes, if you specify transparency/opacity in the file, Photoshop will open that file with transparency/opacity. That's what it is supposed to do. The channel is not removed or applied - it is right there in front of you!

    The OpenEXR plugin was changed in CS3 because CS3 was the first version to support 32 bit/channel transparency. Photoshop CS2 supported OpenEXR and 32 bit images, but not transparency. That means that OpenEXR support was broken in CS2, and was fixed with CS3.

    In short - it did not work in previous versions, and your problem (wanting to edit transparency data directly) has little to do with the file format. You relied on a bug (or lack of a feature) to do something unnatural for that file format.
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 11, 2008 6:28 PM   in reply to (progress)
    Chris, I guess we have established that Photoshop does
    The Right Thing (TM) when opening an OpenEXR file with
    an A channel or an equivalent TIFF file. On the other
    hand, the request for an option to open the EXR A channel
    as a PS alpha channel for independent editing sounds
    entirely reasonable. I guess progress is requesting a
    new feature.

    Progress, if you use the OpenEXR A channel to store
    information other than how transparent a pixel is, then
    how is software such as Photoshop supposed to know when
    the A channel really is an A channel and when it is, say,
    depth by another name? If you are storing depth in the
    file, you should probably call the depth channel Z as the
    EXR documentation recommends.

    You can ask Renderman to split the output of a single
    render pass into multiple files if packing all the output
    channels into a single file is inconvenient. You can,
    for example, have Renderman write two EXR files, one
    with the R, G and B channels and one that contains only Z.
    This way you can edit the RGB image in Photoshop without
    altering or even loading the Z channel.
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 12, 2008 6:14 PM   in reply to (progress)
    Progress and Krille, this Photoshop plugin may be just what you need: http://www.fnordware.com/ProEXR/
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 13, 2008 1:06 PM   in reply to (progress)
    Progress - The extended and standard behavior is just a switch in the code, not different code. It just does slightly different assignments based on the host licensing.

    And again-- Photoshop is not deleting any data. Your only problem here is that you want to edit the transparency/opacity data directly, and Photoshop does not let you do that easily. Opening the transparency as a layer mask adds some serious problems with roundtripping and compatibility with other file formats (because most of them do not support layer masks).

    "A" in OpenEXR _is_ transparency. That is the way it is defined, that is what it must be. Using that channel for anything else breaks workflows (which is why I hate putting it in an alpha channel in standard).
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 13, 2008 1:07 PM   in reply to (progress)
    Note to self - go write a plugin to copy data out of transparency and into a layer mask. The reverse is already available with "apply layer mask".
     
    |
    Mark as:
1 2 3 ... 7 Previous Next
Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)