11 Replies Latest reply on Oct 31, 2012 10:11 AM by fnordware

    Alpha channels




      when importing images or video with an embedded alpha channel, it's possible to select if the alpha is pre-multiplied with black. If so AE automatically corrects the alpha channel. However if the alpha channel is stored in a seperate image or video, I can't find a method for making After-Effects understand that the matte is pre-multiplied. Any help would be greatly appreciated.


      Best regards,


        • 1. Re: Alpha channels
          Rick Gerard Adobe Community Professional & MVP

          For most production work and unless there's a specific reason to pre-multiply with black you should be using straight alpha. It's the professional workflow every production house I've ever dealt with uses. Pre-multiplied alpha channels are just not used.


          Without an alpha channel embedded I know of no way to set footage to pre-multiply. The statement is nonsensical. If you purchased some stock footage with a black and white (non alpha) copy of the footage to use as a track matte then it is almost certainly a straight alpha. If the 'matte' copy has an alpha then it may or may not be a pre-multiplied alpha but odds are that it is straight.


          Just one more thing. AE, AVID, PPro, FCP and as far as I know Vegas all work internally with straight alphas. I'm not sure why AE defaults to render alphas premultiplied. I never do.

          • 2. Re: Alpha channels
            Mylenium Most Valuable Participant

            Agree with Rick. Separate mattes should never be premultiplied. It will degenerate transparent edges. Even if you unmultiply it, it may not represent the contours e.g. of an object buffer from a 3D program correcftly and you can get all sorts of fringing problems. And yes, editing suites want straight Alpha to begin with (as does Photoshop, too).



            • 3. Re: Alpha channels
              mikkel__ Level 1

              Okay, there are several reasons why one would use a pre-mulitplied alpha. In this scenario it's because of some set-extenions rendered in Maxwell (a higly professional tool btw.). Usually we use Nuke for compositing, but on this project I'm doing the comp by myself in AE.


              Here is Maxwells explaination on why they pre-multiply:



              However, I found the solution, and will be posting it shortly.

              • 4. Re: Alpha channels
                mikkel__ Level 1

                Here is an excellent explanation by Kevin Camp: http://forums.creativecow.net/thread/202/882134


                "one other thing, if your fill is 'shaped' (rendered on black, or another color) and is creating fringe or halo effect around the edges. you can remove that with the remove color matting effect.

                if you used the set matte method, you can just add the effect after the set matte effect then set it to the bg color on the fill.

                if you did it the track matte method you will need to pre-compose the matte and fill layer's together (jsut select them in the timeline and choose layer>pre-compose (move all attributes, you don't need to open it). then apply the remove color matting to the precomp in the main comp."

                • 5. Re: Alpha channels
                  Dave LaRonde Level 6

                  Why not just render out the alpha channel as an RBB file from Maxwell, then use it as a Luma Matte in AE?  Problem solved.

                  • 6. Re: Alpha channels
                    mikkel__ Level 1

                    Well, I guess I'm not interested in letting the render farm run for another week, but I've already linked to the explanation on how to do what I were looking for...


                    Anyhow, what are RBB-files, and how/why does Maxwell not pre-multiply them?

                    • 7. Re: Alpha channels
                      Dave LaRonde Level 6

                      That's a typo:  it should be RGB.  Sorry for the confusion.


                      It would be great if I had the time to read through all that documentation, but sadly, I don't.  Furthermore, I don't see why the application wouldn't be able to render two files simultaneously, one for the matte and one for the fill.  There wouldn't be much more render time involved, if any.


                      But everybody's right that Straight alpha channels are used a lot more than Premultiplied.

                      • 8. Re: Alpha channels
                        mikkel__ Level 1

                        I guess you ment RGBA file, if i'm going to have both alpha and RGB in the same file. And you are right, it does not take longer time to render, but the render had already been done (hundreds of hours on several server nodes).


                        Maxwell can render out both at the same time, no problem, but it don't use straight mattes, as explained in the link I gave you.


                        That straight mattes are the norm does not really help, as Maxwell renders pre-multiplied. BUT as mentioned I found the solution at another forum. Thank you.

                        • 9. Re: Alpha channels
                          Dave LaRonde Level 6

                          As I look over the Maxwell feature list, it simply appears that you may be using it the wrong way... if you have the entire package and not just the AE plugin, that is.  Apparently, Maxwell is best utilized as the final 3D compositing environment, which is how AE is often used.  The plugin for AE apparently makes Maxwell files available for use in AE, but no straight alpha channel is a definite liability.


                          It appears that you'd deliver Maxwell files for subsequent use in, say, an editing application for final delivery.

                          • 10. Re: Alpha channels
                            mikkel__ Level 1

                            Our worflow is based on EXR-files and alpha-bitmaps. But .MXI (Maxwell) files can be loaded directly in several compositing packages, it's however irrelevant for the problem I _had_. Thank you.

                            • 11. Re: Alpha channels
                              fnordware Level 3

                              I disagree that rendering premultiplied is a flaw in the program. Yes, After Effects uses straight alpha internally and it would be much better if the alpha was just included with the RGB, but in general there are things you can represent with premultipled images that can not be represented with straight, such as a glow or a reflection off a completely transparent piece of glass. So I don't blame Maxwell for redering premultipled.


                              Anyway, here's a hack you could use to un-premultiply your seperate image:


                              1. Get the alpha into the RGB layer's alpha channel. In CS6 you can use the Set Matte effect because it finally became 32-bit capable. In earlier versions, you could use track mattes in a pre-comp.


                              2. Import an EXR file and apply the EXtractoR effect. Set all channels to "(copy)" and check the UnMult box. This basically makes it stricly an un-premultiply effect.


                              3. Copy and paste that EXtractoR effect to the layer you made in step 1. If you do this a lot, might want to set up an animation preset.