Page 1 of 2

Alpha channel creates black border

Posted: Mon May 24, 2010 9:48 pm
by lsda
How to generate an alpha channel without the background of the rendering turning to black?
In our case the intended background (light dome) is a medium grey, but turning on the alpha channel not only creates the black and white alpha channel itself but also turns the background (sky) of the matte channel to black causing the antialiased borders of the rendered object turn black instead of turn towards the real background medium grey. Composing a new light background (light sky for example) behind the rendering+alpha in Photoshop reveals the dark border resulting from turning the border pixels to black.
How would we have to prevent this?

Re: Alpha channel creates black border

Posted: Mon May 24, 2010 10:34 pm
by zdeno
That's the way it has to be. Just use in photoshop . matte - remove black matte. and everything will be all right

Re: Alpha channel creates black border

Posted: Tue May 25, 2010 12:04 pm
by lsda
If this was the way it had to be, there would never be a way to put a light background afterwards behind a rendering rendered with alpha channel. I doubt I was able to make the issue clear, due to my non-native-spoken English apparently. I would very much like to upload a 100x100px screen shot that would clarify my point of view. How to do so?
(Unfortunately I do not understand "remove black matte" since when I open a rendering with an alpha channel I activate the channel as selection and apply this selection as mask channel leading to the discribed problem.)

Re: Alpha channel creates black border

Posted: Tue May 25, 2010 1:12 pm
by tom

Re: Alpha channel creates black border

Posted: Tue May 25, 2010 1:15 pm
by Fernando Tella
I think you should paste the alpha image into a new channel in the rendered image. Select by alpha, delete inverted selection + remove black matte (layer > matting > remove black matte)

Edit: Tom always explains it better and faster. :P :wink:

Re: Alpha channel creates black border

Posted: Tue May 25, 2010 1:27 pm
by tom

Re: Alpha channel creates black border

Posted: Tue May 25, 2010 6:17 pm
by lsda
Thank you very much.
The procedure's only difference is the "remove black" step that I can not reproduce by myself. Where is it originally in Photoshop, i.e. what is it called?
Regards.

Re: Alpha channel creates black border

Posted: Tue May 25, 2010 6:43 pm
by Fernando Tella
Fernando Tella wrote: layer menu > matting (at the bottom) > remove black matte

Re: Alpha channel creates black border

Posted: Tue May 25, 2010 8:59 pm
by lsda
Perfect. Thank you once again.

Re: Alpha channel creates black border

Posted: Tue May 25, 2010 9:18 pm
by lsda
STOP
When I watch carefully "remove black" results in a general reduction of the opaque area of the alpha mask. Now this is definitely much more complicated to explain than to show (I will try, but if there was a way to upload a small screen shot it would make things a lot easier): at mid grey borders the object becomes apparently smaller while at light grey borders the thick black border is not only removed but replaced (!) by a narrower white border.
That is, somehow the result is not at all perfect nor as good as rendering a matte channel with a light dome background that already matches the final background as close as possible and a separately rendered alpha only rendering (sampling level 8 is fortunately enough in our cases) and manipulating with this in Photoshop anyway.
What do you mean?
Regards.

Re: Alpha channel creates black border

Posted: Tue May 25, 2010 10:38 pm
by caryjames
To load a screen shot....


Create a photobucket or imageshack account
Upload your screen shot images
Click on "Image Link" and copy.. it will look like this

[img]http:/xxxxxxx/albums/s7/c.jpg[/img]

Then paste this line into your post.... hit preview to make sure you did it correctly and then you will have your image attached to your post

Re: Alpha channel creates black border

Posted: Wed May 26, 2010 3:25 pm
by tom
lsda, don't worry, there is no loss in any way. It's how every other engine and software do. The proof is, you can place the result on a black bkg and it will perfectly match with the initial premultiplied image. ;)

Re: Alpha channel creates black border

Posted: Mon May 31, 2010 11:54 am
by jfrancis
If 'remove black matte" is failing for any reason, you can divide the RGB by its own alpha in CS5 using the new DIVIDE blend mode
http://www.digitalartform.com/archives/ ... ps5_d.html

or you can multiply the background by the inverted alpha and linear dodge the foreground
http://www.digitalartform.com/archives/ ... g_pre.html

Re: Alpha channel creates black border

Posted: Sun May 01, 2011 9:35 pm
by lsda
Hello again,
we have used dark skies since but were not happy with it. Now we run into the same problem again and we still do now know how to solve the issue. This time we have prepared a set of 3 images that should show the problem clearly
Image
Image
Image
http://217.160.50.33/images/description110411.txt
Please notice the black line around the objects at the last image.
You can also download the whole scene
http://217.160.50.33/images/Alphachannel.zip
We are aware that we might not have understood the solutions but we would like to ask you to look at the example just to make sure that we could make clear what problem we use to run into.
Please be so patient to help us once again.
Best regards.

Re: Alpha channel creates black border

Posted: Sun May 01, 2011 10:09 pm
by jfrancis
1.

Put the alpha above the color and set the blend mode to DIVIDE (only in CS5)

Then flatten. Don't worry about the horrible edge, it will be clipped off.

Then turn the alpha into a layer mask and put the color (with weird edge) and its layer mask over your background