Author Topic: Alpha Channel Cutout Problems.  (Read 17323 times)

0 Members and 1 Guest are viewing this topic.

Offline ksall

  • Newbie
  • *
  • Posts: 5
Alpha Channel Cutout Problems.
« on: July 22, 2010, 05:28:25 pm »
I am trying to render a scene where I will replace the background in photoshop.
I go ahead and use a default backplate (or solid color) and render the scene as a .tiff with alpha.
Afterwards I open in PS and use the alpha as a selection, invert and delete to get my background transparent.  When I insert my new background, it becomes apparent that something is "off".

It seems that the alpha did not cut cleanly, and my rendered models are slightly "rimmed" with the backplate color (or solid color that I selected for background).

Has anyone else come across this?  Where it seems like the backplate has bled onto the edges of the models?  Is this a Keyshot issue or am I doin't something wrong in PS?

Please advise.

Online Speedster

  • Hero Member
  • *****
  • Posts: 2625
Re: Alpha Channel Cutout Problems.
« Reply #1 on: July 22, 2010, 05:38:21 pm »
I've run into this also, so I don't use alpha anymore.  Instead I always render a clown pass if I'm going to drop out the background.  Very neat and clean sharp cutouts.  Take just a bit longer, but worth it.  Also, instead of backing out of my materials after the clown, I make sure to save the hero shot bip, proceed with the clown, then close without saving.  Just reopen again and off to the races!
Bill G

Offline m2tts

  • Full Member
  • ***
  • Posts: 211
Re: Alpha Channel Cutout Problems.
« Reply #2 on: July 22, 2010, 06:18:24 pm »
By "clown" you mean assigning total black and total white to any parts you want to mask right? I do this all the time to make selecting individual parts easier in PhotoShop. I take the black and white image, after being changed from an rgb to grayscale, and drag the gray channel from it to the open render file. Instant alpha channels for individual parts in the final PhotoShop rendering. Making the black and white pass takes about ten seconds to render.

guest84672

  • Guest
Re: Alpha Channel Cutout Problems.
« Reply #3 on: July 23, 2010, 09:16:27 am »
I am trying to render a scene where I will replace the background in photoshop.
I go ahead and use a default backplate (or solid color) and render the scene as a .tiff with alpha.
Afterwards I open in PS and use the alpha as a selection, invert and delete to get my background transparent.  When I insert my new background, it becomes apparent that something is "off".

It seems that the alpha did not cut cleanly, and my rendered models are slightly "rimmed" with the backplate color (or solid color that I selected for background).

Has anyone else come across this?  Where it seems like the backplate has bled onto the edges of the models?  Is this a Keyshot issue or am I doin't something wrong in PS?

Please advise.

If the cutout is not "clean", then set "pixel filter size" to 1 in the render settings. PFS adds a blur to the image.

Thomas

Offline ksall

  • Newbie
  • *
  • Posts: 5
Re: Alpha Channel Cutout Problems.
« Reply #4 on: July 23, 2010, 01:31:06 pm »
Hi Thomas,

Setting the PFS to 1.00 still leave a bit of blurred residue.
Is there any way to omit this blur completely?  The slider does not allow an input below 1.00 for PFS, but what I would need (I guess) is a PFS of zero.

Using the "clown" render procedure doesn't seem to help either, as the blur is incident on the models and not the background.

Any help on this matter would be greatly appreciated.

Thanks.

guest84672

  • Guest
Re: Alpha Channel Cutout Problems.
« Reply #5 on: July 23, 2010, 05:32:20 pm »
Shouldn't be the case. Also, make sure that depth of field is not enabled.

Offline m2tts

  • Full Member
  • ***
  • Posts: 211
Re: Alpha Channel Cutout Problems.
« Reply #6 on: July 23, 2010, 07:10:32 pm »
How are you making the selection of the alpha channel in PS? Make sure you're making your selection using the selection menu "load selection", or pick it using the ctrl key right from the channel tab. This will ensure that the selection will get those edges transparent. Don't use the magic wand to do it as that will not select all the pixels you need it to.  Is the background you're rendering against black or white; or is it some color? Anti-aliasing is supposed to blend color of edges with the background to keep the edges looking smooth.
« Last Edit: July 23, 2010, 07:12:03 pm by m2tts »

Offline JohnG

  • Newbie
  • *
  • Posts: 44
Re: Alpha Channel Cutout Problems.
« Reply #7 on: July 25, 2010, 09:41:04 am »
It seems that the alpha did not cut cleanly, and my rendered models are slightly "rimmed" with the backplate color (or solid color that I selected for background).

This is a well known issue when trying to composite cg elements, particularly in photoshop. The reason it happens is a bit complex, basically renderers (including Keyshot) have to multiply the cg element by its alpha in order to get the correct edge transparency. These renders are said to be 'premultiplied'.
However this multiplication step is also part of the compositing process, the compositing software has to multiply the foreground (and background) by the alpha in order to make the composite. Unfortunately photoshop has no way of knowing that the cg image has already been multiplied by the alpha so this double multiplication results in artifacts including dark edge pixels.

Compositing software used in film and video such as Nuke or Digital Fusion have ways to handle this problem but photoshop doesn't as it was never designed for cgi compositing. There are some involved ways to alter photoshop's normal way of compositing to get around this problem, but probably the simplest way is to try and remove the edge pixels.

Try Layer/Matting to remove white or black edge pixels.

A levels adjustment on the layer mask is another common method to choke or contract the edge of the mask.

Another option would be the maximum filter which is designed for adjusting the edges of masks
Filter/Other/maximum

Offline jbeau

  • Full Member
  • ***
  • Posts: 148
    • RPA
Re: Alpha Channel Cutout Problems.
« Reply #8 on: November 09, 2010, 09:40:32 am »
Make sure your pixel filtering and AA does not change between passes. This will help with the premult, but there will still be issues with white colors on black backgrounds + Alpha.  I wish there was some alternate AA settings as even the highest has issues with thin geometry and transparent areas. Alphas + high AA in KS with premult are broken... You will almost always see AA fringe. You can use a simple chocker on your alpha with a .5 pixel and then roto areas that don't need it. A clown pass = more then 3 flat RGB colors; not recommended when flat colors are touching. Pure non-touching red, green, blue flat colors make a successful key.

Offline chippwalters

  • Full Member
  • ***
  • Posts: 121
Re: Alpha Channel Cutout Problems.
« Reply #9 on: November 29, 2010, 04:32:16 pm »

Offline JeffM

  • Sr. Member
  • ****
  • Posts: 281
Re: Alpha Channel Cutout Problems.
« Reply #10 on: December 09, 2010, 12:53:32 pm »
In Photoshop, Layer>Matting>Defringe is usually all it needs.

Offline BigBlack

  • Newbie
  • *
  • Posts: 1
Re: Alpha Channel Cutout Problems.
« Reply #11 on: September 04, 2013, 03:47:34 am »
Hi Guys,
I've the same issue. There'r some new solutions?