Answers.Body: <p>The problem is that my alpha Mask has a feather. Which results in greeen peaking through the Mask. So the only solutions are export an alpha mask with no feather or export the original image with a black or desaturated background.</p>
  
  <p><img src="https://i.sstatic.net/iLSod.png" alt="Feather"></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-01-31T12:45:34.423Z
Answers.Text: I'm still wondering though, why it does not have that problem when it is still in After Effects. I guess Keylight automatically desaturates the green on the semitransparent areas of the Alpha.
Answers.UserDisplayName: Benedikt
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-01-31T15:20:48.133Z
Answers.Text: If the feather is properly positioned it shouldn't matter, but if the feather is too far out it would be. You could try upping the edge growth or whatever the equivalent setting is to move the feather in to keep a soft edge.
Answers.UserDisplayName: AJ Henderson
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-01-31T19:12:25.950Z
Answers.Text: What I'm wondering though is why it looks ok in After Effects though.
Answers.UserDisplayName: Benedikt
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-02-03T21:38:31.140Z
Answers.Text: I'm not an expert at this, but you might be running into a problem because of working in a non-linear colorspace.  IDK if that's even the right term, but I've seen ffmpeg docs or something say something about color spaces being linear or not.  I assume that means something like alpha blending will suffer from color shifts if done naively (new = alpha-weighted sum of all inputs) in a non-linear colorspace.  So that's what you should google if you want to maybe figure out what Keylight did.
Answers.UserDisplayName: Peter Cordes
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-01-31T12:43:14.727Z
Answers.LastActivityDate: 2015-01-31T12:43:14.727Z
Answers.UserDisplayName: Benedikt
Answers.Body: <p>Part of it may be the fact you are using JPEG sequences.  JPEG isn't a pixel accurate format and you are going to have some differences in block quantization that could potentially result in mismatches.</p>
  
  <p>I don't think that is the only issue since it is a bit too regular for it to be the only issue, but I'd try to use an intermediate format that is a bit more lossless for doing things that need to be pixel accurate match up.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-01-31T12:46:23.540Z
Answers.Text: It has the same problem with a multichannel exr. So the jpeg shouldn't be the issue.
Answers.UserDisplayName: Benedikt
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-01-30T23:55:59.993Z
Answers.LastActivityDate: 2015-01-30T23:55:59.993Z
Answers.UserDisplayName: AJ Henderson
Body: <p>I have two (rgb) jpeg sequences one with the alpha information (black and white) the other one with the green screen footage. I keyed them with Keylight and they look perfect in AE before exporting.</p>
  
  <p><img src="https://i.sstatic.net/VMFA8.png" alt="key"></p>
  
  <p>When I import the jpeg sequences back in AE and apply the alpha, I get a green hallow.</p>
  
  <p><img src="https://i.sstatic.net/Wwa89.png" alt="premult"></p>
  
  <p>It seems to be some premultiplication issue. What did I do wrong exporting / importing the jpeg sequences?</p>
  
  <p><img src="https://i.sstatic.net/tRnCV.jpg" alt="greenscreen">
  <img src="https://i.sstatic.net/Vi6eM.jpg" alt="alpha"></p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-01-29T12:01:35.377Z
Comments.Text: Do you've tried another format like png/tga with alpha?
Comments.UserDisplayName: p2or
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-01-29T12:03:43.977Z
Comments.Text: I have tried exr with an alpha. Same problem in nuke! I need it as a jpeg format though.
Comments.UserDisplayName: Benedikt
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-01-29T12:05:58.423Z
Comments.Text: You need the jpg alpha's for creating an alpha channel in nuke, right? Unfortunately can't test it at the moment. Can you provide an image to test with?
Comments.UserDisplayName: p2or
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-01-29T12:33:47.750Z
Comments.Text: Added test footage. I need it for 3ds Max but it would be nice to know what to do in After Effects or Nuke.
Comments.UserDisplayName: Benedikt
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-01-29T17:05:55.353Z
Comments.Text: Same with nuke... For now you can add an Erode(Filter) and a Blur node (quadratic) after that to move the mask/shape inside.
Comments.UserDisplayName: p2or
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-01-29T17:52:22.227Z
Comments.Text: My solution for now is to render the keyed footage with a black background and not the original footage with green screen. I'm still wondering if could preserve the green screen in the footage and still not get the nasty halo.
Comments.UserDisplayName: Benedikt
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-01-30T02:34:59.873Z
Comments.Text: Looks like you need to use a spill suppresser to kill the green in the areas where the alpha channel is not 100%.
Comments.UserDisplayName: stib
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-02-03T10:40:03.190Z
Comments.Text: Lossless compression for the alpha channel would be better, if you can use something other than JPEG.  JPEG has ringing on sharp edges, and the only thing that matters for alpha is edges.  (because interiors are solid color, trivial for any codec).  Image formats like webm have the option of lossy compression for the RGB, and lossless alpha, for example.  If you're at high enough rez and high enough bitrate, there's probably no visible problem, though.
Comments.UserDisplayName: Peter Cordes
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-02-03T21:39:00.177Z
Comments.Text: (nvm, AJ already suggested that earlier)
Comments.UserDisplayName: Peter Cordes
Tags: <after-effects><greenscreen><chromakey>
Title: Premultiplication issue with two jpeg sequences
UserDisplayName: Benedikt
ThreadText: # Premultiplication issue with two jpeg sequences
  
  (Asked by: username_0 on 2015-01-29)
  
  I have two (rgb) jpeg sequences one with the alpha information (black and white) the other one with the green screen footage. I keyed them with Keylight and they look perfect in AE before exporting.
  
  ![key](https://i.sstatic.net/VMFA8.png)
  
  When I import the jpeg sequences back in AE and apply the alpha, I get a green hallow.
  
  ![premult](https://i.sstatic.net/Wwa89.png)
  
  It seems to be some premultiplication issue. What did I do wrong exporting / importing the jpeg sequences?
  
  ![greenscreen](https://i.sstatic.net/tRnCV.jpg)
  ![alpha](https://i.sstatic.net/Vi6eM.jpg)
  
  **Tags:** after-effects, greenscreen, chromakey
  
  > **Comments:**
  > **username_1**: Do you've tried another format like png/tga with alpha?  
  > **username_0**: I have tried exr with an alpha. Same problem in nuke! I need it as a jpeg format though.  
  > **username_1**: You need the jpg alpha's for creating an alpha channel in nuke, right? Unfortunately can't test it at the moment. Can you provide an image to test with?  
  > **username_0**: Added test footage. I need it for 3ds Max but it would be nice to know what to do in After Effects or Nuke.  
  > **username_1**: Same with nuke... For now you can add an Erode(Filter) and a Blur node (quadratic) after that to move the mask/shape inside.  
  > **username_0**: My solution for now is to render the keyed footage with a black background and not the original footage with green screen. I'm still wondering if could preserve the green screen in the footage and still not get the nasty halo.  
  > **username_2**: Looks like you need to use a spill suppresser to kill the green in the areas where the alpha channel is not 100%.  
  > **username_3**: Lossless compression for the alpha channel would be better, if you can use something other than JPEG.  JPEG has ringing on sharp edges, and the only thing that matters for alpha is edges.  (because interiors are solid color, trivial for any codec).  Image formats like webm have the option of lossy compression for the RGB, and lossless alpha, for example.  If you're at high enough rez and high enough bitrate, there's probably no visible problem, though.  
  > **username_3**: (nvm, AJ already suggested that earlier)  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2015-01-31. Score: 1
  
  The problem is that my alpha Mask has a feather. Which results in greeen peaking through the Mask. So the only solutions are export an alpha mask with no feather or export the original image with a black or desaturated background.
  
  ![Feather](https://i.sstatic.net/iLSod.png)
  
  > **Comments:**
  > **username_0**: I'm still wondering though, why it does not have that problem when it is still in After Effects. I guess Keylight automatically desaturates the green on the semitransparent areas of the Alpha.  
  > **username_4**: If the feather is properly positioned it shouldn't matter, but if the feather is too far out it would be. You could try upping the edge growth or whatever the equivalent setting is to move the feather in to keep a soft edge.  
  > **username_0**: What I'm wondering though is why it looks ok in After Effects though.  
  > **username_3**: I'm not an expert at this, but you might be running into a problem because of working in a non-linear colorspace.  IDK if that's even the right term, but I've seen ffmpeg docs or something say something about color spaces being linear or not.  I assume that means something like alpha blending will suffer from color shifts if done naively (new = alpha-weighted sum of all inputs) in a non-linear colorspace.  So that's what you should google if you want to maybe figure out what Keylight did.  
  
  ---
  
  ### Answer by username_4 on 2015-01-30. Score: 1
  
  Part of it may be the fact you are using JPEG sequences. JPEG isn't a pixel accurate format and you are going to have some differences in block quantization that could potentially result in mismatches.
  
  I don't think that is the only issue since it is a bit too regular for it to be the only issue, but I'd try to use an intermediate format that is a bit more lossless for doing things that need to be pixel accurate match up.
  
  > **Comments:**
  > **username_0**: It has the same problem with a multichannel exr. So the jpeg shouldn't be the issue.  
  
  ---
  
  