Skip navigation
Home/Support/

Forums

1 2 3 ... 6 Previous Next 27228 Views 254 Replies Latest reply: Oct 15, 2009 8:24 AM by Tommy L2 RSS
Calculating status... 153 posts since
Aug 11, 2002
Currently Being Moderated

Nov 18, 2008 3:42 AM

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

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?
  • Buko. Contributor 9,034 posts since
    Jul 30, 2006
    start CS3 in Rosetta and the plugin should work.
  • Chris Cox Adobe Employee 8,986 posts since
    May 20, 2006
    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?".
  • Calculating status... 1 posts since
    Jan 17, 2006
    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
  • Calculating status... 10 posts since
    Nov 20, 2008
    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
  • User 613 posts since
    Aug 11, 2002
    Great read. Thank you.
  • Chris Cox Adobe Employee 8,986 posts since
    May 20, 2006
    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).
  • Chris Cox Adobe Employee 8,986 posts since
    May 20, 2006
    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.
  • Chris Cox Adobe Employee 8,986 posts since
    May 20, 2006
    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.
  • Chris Cox Adobe Employee 8,986 posts since
    May 20, 2006
    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.
  • User 10 posts since
    Nov 20, 2008
    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?
  • Chris Cox Adobe Employee 8,986 posts since
    May 20, 2006
    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.
  • User 10 posts since
    Nov 20, 2008
    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.
  • Chris Cox Adobe Employee 8,986 posts since
    May 20, 2006
    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.
  • Chris Cox Adobe Employee 8,986 posts since
    May 20, 2006
    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).
  • Chris Cox Adobe Employee 8,986 posts since
    May 20, 2006
    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.
  • Chris Cox Adobe Employee 8,986 posts since
    May 20, 2006
    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.
  • User 10 posts since
    Nov 20, 2008
    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?
  • Chris Cox Adobe Employee 8,986 posts since
    May 20, 2006
    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.
  • User 10 posts since
    Nov 20, 2008
    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.
  • Chris Cox Adobe Employee 8,986 posts since
    May 20, 2006
    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.
  • Calculating status... 2 posts since
    Dec 10, 2008
    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?
  • Chris Cox Adobe Employee 8,986 posts since
    May 20, 2006
    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.
  • User 10 posts since
    Nov 20, 2008
    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.
  • User 10 posts since
    Nov 20, 2008
    Progress and Krille, this Photoshop plugin may be just what you need: http://www.fnordware.com/ProEXR/
  • Chris Cox Adobe Employee 8,986 posts since
    May 20, 2006
    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).
  • Chris Cox Adobe Employee 8,986 posts since
    May 20, 2006
    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".
  • Chris Cox Adobe Employee 8,986 posts since
    May 20, 2006
    In OpenEXR "A" is defined as transparency/opacity. And OpenEXR is premultiplied - so anywhere you had "A" set to zero -- the matching color data is gone.
  • Chris Cox Adobe Employee 8,986 posts since
    May 20, 2006
    Premultiplied color/alpha/transparency means file_color = color * opacity
    Where the opacity was zero, the information is *gone* after it gets written into the file, not recoverable, pining for the fjords... (er, wrong sketch, sorry).

    The problem is that you are trying to use a file format that doesn't support what you're trying to do, plus you're trying to edit transparency/opacity - which Photoshop doesn't let you do easily.
  • Calculating status... 8 posts since
    Jan 21, 2009
    Just to chime in here and back up what progress is saying. CS3 and CS4 have ruined EXR Alpha functionality. We had to buy ProEXR from Fnord in order to keep the RGB values of the black Alpha pixels.

    In the ProEXR installation instructions they have you rename the Adobe OpenEXR.8bi to OpenEXR.WTF

    I think that says it all.

    If this discussion were a tech support call, this is the point where I would give up and ask to speak to the manager.
  • Calculating status... 4 posts since
    Aug 11, 2002
    Ditto to what progress and jonah have said...openEXR simply does not work in it's current implementation in CS3 (& CS4) for most workflows. I've read through the EXR description on ILM's site and I don't see anywhere that it requires the RGB to be made transparent due to the alpha. Yes, they do describe the pixel as being transparent, but this is in relation to performing any compositing actions, not opening it for editing.

    Regardless, can you just add a tickbox option somewhere to allow photoshop to open OpenEXR's as RGBA rather than a transparent RGB?
  • User 8 posts since
    Jan 21, 2009
    Chris,

    Please open an EXR in CS2, to see what we are talking about.

    or After Effects, any version. go to Interpret Footage and choose ignore alpha.

    In a 3d app like 3ds Max or any other, it is common to render an object against an environment or background image. By default the 3d geometry has a value of 1.0 in the Alpha channel and the environment 0.0. But this does not mean we ALWAYS want the environment to be transparent. Often we want to see the sky or keep the background color whatever it may be. Many other file formats retain the Alpha RGB values. As did EXR in Photoshop CS2. I'm sure you're aware of the Alpha present in Targa, Tiff, RLA, PNG, etc.

    All we want is the option to keep the RGB of the Alpha. Just like it was in CS2 and is in After Effects, Combustion, Fusion, Nuke.... etc.

    Small change to your plugin has a huge impact on our workflow.
  • Chris Cox Adobe Employee 8,986 posts since
    May 20, 2006
    SIgh - just when I got the original folks to understand....

    Please, go read the rest of the thread.

    Here is the summary:
    RGBA *is* RGB+transparency in the case of OpenEXR - the file format says that it must be that way. The file format does not allow you to use the A channel for anything other than transparency. And the file format says that the RGB values are premultiplied (that happens when you write the file) -- so if you have zero in the A channel, you must also have zero in the RGB channels.

    Most likely you misunderstand something about the concepts involved, or you are just using the wrong file format for your work. But, as far as anyone has been able to determine, Photoshop CS3 and CS4 are working perfectly correctly for the OpenEXR file format.
  • Chris Cox Adobe Employee 8,986 posts since
    May 20, 2006
    David - you're so unclear on the concepts I don't even know where to start.
    That entire post is a non-starter.
  • Chris Cox Adobe Employee 8,986 posts since
    May 20, 2006
    jonah - I have. I've also discussed it with the folks who wrote OpenEXR (the spec. and the code). Photoshop has it right.
1 2 3 ... 6 Previous Next

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)