Thin black line on edes of objects rendered with transparent background.


#1

Hello all, I have an issue I was hoping someone could help me with. When I render out objects in Softimage (rendered out to a file source that supports an alph… i.e. .PNG), and there is no background/environment applied I tend to always get a thin black line on the edges of the object. Anyone know how to get rid of this? or change the black default background in Softimage to use a non-existant/transparent background to do its anti-aliasing with instead of the black, which is what I believe is causing the issue.

Here is a quick test. Make a sphere and give it a material - light in color - I used a constant white, and I also tried it with a lambert with a rim light to give it a little lighting on the edges. It is more obvious with the constant white though. I rendered it out as a .PNG with the alpha embedded. I opened the rendered image in Photoshop, and it shows it with the transparency…so far so good. Make a new Layer and paint this new layer white. Take the new layer and place it below the image layer. You will now see a thin black line around the object that you rendered. This has been an issue for me for sometime… 3Ds Max does this scenario perfectly - no issues. So, it led me to believe it might be the way Softimage handles its anti-aliasing with a non-existant/transparent backround. Then again…maybe I am doing something wrong.

-Thanks in advance for any help-


#2

Hi,
This is kinda photoshop problem with premultipled images.

Possible solutions are:

-remove matte in photoshop using layer-matte-remove black matte or defringe if your AA was set to blurring filter like gauss.

-render to EXRs to avoid all problems

-turn off premultiply with alpha in color control If you must use photoshop

-do your compositing in AE/Fusion/Nuke/other that handle premultipled images well

-if you must render to tga/png other 8bit format, be sure to turn on apply gamma correction in pass ppg


#3

Thanks for the information. I will look into those options. Your help is much appreciated.


#4

It actually does seem to have something to do with the image format. Either how the format is written from Softimage or interpreted by Photoshop.

If you render out as PNG from Softimage you should deactivate “Premultiply with Alpha” in Renderer Options > Framebuffer > Color Control (as PiotrekM already mentioned). Then it perfectly imports into Photoshop.

If you render out as TIF it doesn’t matter if the premultiply option is on or off - it always imports perfectly into Photoshop.

So it seems like Photoshop doesn’t like premultiplied PNGs - maybe it always treats PNGs as unpremultiplied and screws it when it is already premultiplied …


#5

The PNG format is terrible for that and color management, you never know what you’re going to get, depending on the viewer.

Normally CG renders are premultiplied, i.e. the RGB has been multipled by the alpha

The PNG standard is to have the alpha not premultiplied. So when photoshop or other apps that follow the standard read PNG in, they multiply the alpha and the RGB a second time again and so the edges are darkneded.

So you should render unumpremultiplied. But then the edges will look harsh in other apps that do not try to follow the PNG standard, including the preview window.


#6

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.