Issue with using alpha over multiple times

When I try to use alpha over to combine two transparent images, the resulting file output image when I hit render is ever so slightly different from the backdrop image (even though it should be the exact same output). When I take this file and try to use alpha over to combine it with a background, I get a very bright outline around the foreground object.

This doesn’t happen when I use an alpha over to combine the two transparent images and then immediately use another alpha over to combine the result with the background (without outputting to a file first). It seems like outputting to a file changes the image for some reason. I’m using a png format, so there shouldn’t be any loss of data.

I need the image file with transparency to be used as a game asset, but when it’s overlaid on a background, the outline appears. Anybody know if this is a bug or am I doing something wrong?

Maybe related to premultiplication. Can you show us an example? .blend or screenshot.

I was thinking the same thing, so I checked my alpha settings and it seems like everything is set to use straight alpha instead of premultiplication. The render is supposed to be of a stylized rock with a glowing aura. The aura is created with the smoke/fire simulation. The aura doesn’t show up when using premultiplication, so I have to use straight alpha. Here are some screen shots (sorry for the weird formatting, I can only upload three images)


Here is the node setup for the render without writing to a file first (all image nodes are set to straight alpha).


Another question I have is why is the alpha channel of the fire effect rendering completely black? Shouldn’t it at least have some sort of non-zero value? Strangely, it still shows up on a background.

When rendering a scene with the film set as transparent, is the resulting file using straight or premultiplied alpha? When rendering from the compositer, is the image straight or premultiplied? And is the viewer backdrop node showing straight or premultiplied? I’ve tried using the alpha converter node, but neither converting from straight to premultiplication or the other way around seems to work. It definitely seems like a premultiplication issue, but I’m not sure what exactly I have to do to fix it.




Also, here are the three image files I used (there’s a completely transparent one in the middle), just in case you want to see if you can get the image file output to match the backdrop image.