FORUMS: list search recent posts

comping 3d images with gamma 1.0 results in alphas with black borders.

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
daniel tegeland
comping 3d images with gamma 1.0 results in alphas with black borders.
on Dec 29, 2013 at 11:15:33 pm

Hi!

I am a 3d artist that relays quite heavily on different render passes. Comping them together in after effects is usually not a problem. After all of my operations is done I simply put an alpha layer on top of my comp, that removes any sign of black borders and anti aliasing problems.

However when working with gamma 1.0 in my 3d package this method doesn't seem to work. I am left with a black border in my precomps anyway. Do I have to do anything to the alpha of my 3d images before I do any comp operations? Some Nuke guys I know told me there was a checkbox or something that did something to the alpha. Sorry if I am vague. I will post some images soon to illustrate my problems.

My basic question is. How do I remove black borders from my precomps when comping 3d images rendered with gamma 1.0 settings?


Return to posts index

daniel tegeland
Re: comping 3d images with gamma 1.0 results in alphas with black borders.
on Dec 30, 2013 at 1:42:57 pm

I might have found something that actually works. If you add a levels effect on the layers using some blending operations (add, mult...) then apply a value of 0.45 on the alpha. The black halo around the object is gone. I believe I have de-gamma the alpha. Not entirely confident on the linear workflow stuff. Just trying to find something that works.

I think Adobe should give the color space in AE some attention. This issue isn't one in the other compositing tools.


Return to posts index

Dave LaRonde
Re: comping 3d images with gamma 1.0 results in alphas with black borders.
on Dec 30, 2013 at 7:21:34 pm

It could also be that you mistakenly created a Premultiplied Alpha Channel when you intended to make a Straight Alpha channel in your 3D app.

Dave LaRonde
Promotion Producer
KGAN (CBS) & KFXA (Fox) Cedar Rapids, IA


Return to posts index


daniel tegeland
Re: comping 3d images with gamma 1.0 results in alphas with black borders.
on Jan 1, 2014 at 9:54:39 pm

I use V-Ray as my renderer of choice. It doesn't support straight alpha output. If it did I believe this wouldn't be a problem


Return to posts index

Darby Edelen
Re: comping 3d images with gamma 1.0 results in alphas with black borders.
on Jan 2, 2014 at 5:31:38 am

Did you let AE know that the footage was premultiplied? Unless V-Ray was applying different gamma to the alpha than the RGB (which would show up as a problem in any compositing pipeline) I can't see why the standard un-premultiply wouldn't work.

If you're using the EXtractoR plug-in you should note that the color and alpha settings you choose for the footage items in AE's project panel will be ignored on instances of the footage with EXtractoR applied. The plug-in reads the data as-is from the file. If you want to un-premultiply an image using EXtractoR you check the "Unmult" box in "Process" section of the effect.

Darby Edelen


Return to posts index

Darby Edelen
Re: comping 3d images with gamma 1.0 results in alphas with black borders.
on Jan 2, 2014 at 7:40:46 am

Forgot to mention, part of the color settings that you have to worry about when using EXtractoR is the linear color. If your working space is not linearized then the extracted color will look dark. I doubt that's the issue as you would've noticed colors being off, but I thought I should mention it. If it is a problem then either linearize the working space (because: why wouldn't you?) or use a Utility > Color Profile Converter effect to convert to linear.

Darby Edelen


Return to posts index


daniel tegeland
Re: comping 3d images with gamma 1.0 results in alphas with black borders.
on Jan 4, 2014 at 5:40:27 pm

Hi Darby!

Thanks for the info. I do believe that my footage is linear. And I do get black borders. My footage is set to premultiply and my project settings are linear. I have some issues with real time playback when using linearize working space(RAM preview). That is why I prefer to leave it off and use "match colors using 1.0 gamma" instead.

If it's not to much trouble could I send over a ae file and maybe you can have a look at it. You seem to know what you are talking about.


Return to posts index

Darby Edelen
Re: comping 3d images with gamma 1.0 results in alphas with black borders.
on Jan 5, 2014 at 6:05:07 am

[daniel tegeland] "If it's not to much trouble could I send over a ae file and maybe you can have a look at it. You seem to know what you are talking about."

Sure, no guarantees there'll be a solution but I can take a look. If it's a relatively small file you can upload to the COW otherwise you can use dropbox or something like that.

Darby Edelen


Return to posts index

daniel tegeland
Re: comping 3d images with gamma 1.0 results in alphas with black borders.
on Jan 5, 2014 at 11:28:38 am

Thumbs up!

Here is a test scene I did to illustrate the problem. I did a comp of the render elements. Using them results in bad anti aliasing. The problem multiplies with the number of layers used. Maybe this isn't a gamma problem but the fact that I m using pre-multiplied images? Just want a workflow that doesn't produce this problem.

The zip contains an aftereffects scene, exr images and a max scene. I didn't include the hdri used in the scene.

It would be great to hear your input in the matter.

below is the link.

6958_testedgejaggedfolder.zip


Return to posts index


Darby Edelen
Re: comping 3d images with gamma 1.0 results in alphas with black borders.
on Jan 7, 2014 at 4:55:34 am

So it is definitely related to the premultiplied images and the way that AE handles compositing.

This may seem counter intuitive but what you'll want to do is composite all of your layers against black. Then use a copy of the footage at the top of the stack set to the Stencil Alpha blend mode to punch out the alpha from the lower layers.

You shouldn't need to do this if you're compositing onto a background directly, but if you need to render out again with alpha (or there's an intermediate step where you need good RGBA values) then you'll need to do the above.

Here's an example file using the assets you provided:

6964_testedgefixedfolder.zip

Darby Edelen


Return to posts index

daniel tegeland
Re: comping 3d images with gamma 1.0 results in alphas with black borders.
on Jan 7, 2014 at 8:26:55 pm

Hi Darby!

I does seems that this does the trick in this particular scene. I imported some more objects and change the lighting some and all of the sudden I have the same problem again, although I just replaced the images from your comp. Strange. If you can find it in your heart to look at the same setup once more with a different rendering I'd be appreciative. It's pretty close now though, but it would be nice to always know I'd be dead on.

6967_testedgefixedconvertedfolder.zip


Return to posts index

Darby Edelen
Re: comping 3d images with gamma 1.0 results in alphas with black borders.
on Jan 7, 2014 at 11:18:36 pm

I'm running CS6 so I can't see how your compositions are set up. I was able to get the same result with the new assets you uploaded though.

I did notice that the results look worse when using Blend Colors Using 1.0 Gamma only. I linearized the working space in the project files I'm working in and everything looks good.

Darby Edelen


Return to posts index


daniel tegeland
Re: comping 3d images with gamma 1.0 results in alphas with black borders.
on Jan 8, 2014 at 9:05:33 am

Hi!

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


Return to posts index

Darby Edelen
Re: comping 3d images with gamma 1.0 results in alphas with black borders.
on Jan 9, 2014 at 5:03:21 am

Here'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


Return to posts index

daniel tegeland
Re: comping 3d images with gamma 1.0 results in alphas with black borders.
on Jan 9, 2014 at 8:43:38 am

Wow! 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.


Return to posts index


daniel tegeland
Re: comping 3d images with gamma 1.0 results in alphas with black borders.
on Jan 9, 2014 at 2:06:36 pm

I 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!


Return to posts index

Darby Edelen
Re: comping 3d images with gamma 1.0 results in alphas with black borders.
on Jan 9, 2014 at 8:25:21 pm

In 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


Return to posts index

daniel tegeland
Re: comping 3d images with gamma 1.0 results in alphas with black borders.
on Jan 9, 2014 at 9:41:59 pm

You 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.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]