Activity › Forums › Adobe After Effects › comping 3d images with gamma 1.0 results in alphas with black borders.
-
comping 3d images with gamma 1.0 results in alphas with black borders.
Daniel Tegeland replied 12 years, 4 months ago 2 Members · 16 Replies
-
Daniel Tegeland
January 8, 2014 at 9:05 amHi!
I have attached my comp in v6 format. If you make a snapshot you notice there is a slight difference when you switch between the two. May seems like a minor detail but this can cause bigger issues. I had my colleague make a test comp in Nuke and there it is dead on.
I think the issue is that every layer need to be unpremultiplied before any comping is made. The last step is to premultiply again (this being the stencil alpha). Do you know how to make a proper unpremultiply in ae? In Nuke there is a unpremultiply and premult node.
Thanks for looking at this.
6969_testedgefixedconvertedcopycs6.aep.zip
-
Darby Edelen
January 9, 2014 at 5:03 amHere’s a file that follows the Nuke pipeline. It works only on unpremultiplied RGB until the Stencil Alpha at the top of the comp.
6978_unpremultpremultedgecomposite.aep.zip
Turns out that unpremultiplying the RGB in AE is a bit obtuse. I thought I knew how to approach it but I quickly learned that I needed to adjust my expectations 🙂
The Remove Color Matting effect (with Clip HDR Results disabled) results in an unpremultiplied RGB but not the RGB values we want. AE divides the RGB value by the Alpha value which gives us a very large RGB value; the result looks correct because it’s still being alpha blended. However, problems quickly arise if you try to blend more than one of these unpremultiplied layers together. The alpha values are blended together and the extra high RGB values start showing (you get a bright line around the composite).
The solution is to use the Solid Composite effect set to Black after the Remove Color Matting effect. This removes alpha blending from the RGB values and takes the alpha out of the composite entirely. If you apply the unmodified alpha (the Stencil Alpha step) at the end of all of the RGB compositing (all your passes unpremultiplied using Remove Color Matting + Solid Composite) you should end up with the same result as following the unpremult -> merge -> premult workflow in Nuke.
Darby Edelen
-
Daniel Tegeland
January 9, 2014 at 8:43 amWow! This actually seems to work. You don’t know how long I have been looking for a solution to this. I will test this further later today but for now I’d like to extend my hand and give you a big thank you.
-
Daniel Tegeland
January 9, 2014 at 2:06 pmI also noticed that for this to work 32-bits depth must be enabled. This not a problem but do you know why that is? Thanks once again!
-
Darby Edelen
January 9, 2014 at 8:25 pmIn order to properly unpremultiply an image this way in AE the operations must take place in floating point. Premultiplication takes the RGB values and multiplies it by the Alpha. To unpremultiply the RGB the software must divide by the alpha value, since alpha ranges from 0-1 you can end up with very very very large values (divide by 0). Those values need to be preserved instead of clipped so that they can be limited by the Solid Composite and then composited properly.
That’s the first thing I can think of, there may be other reasons as well 🙂
Darby Edelen
-
Daniel Tegeland
January 9, 2014 at 9:41 pmYou are a ninja, or at least an AE kungfu master. Respect! I will do run some test to try to understand how everything works. This has been very helpful.
Reply to this Discussion! Login or Sign Up