Problem with alpha (cycles)


I’ve got to do the halo of a spaceship. Everything is working fine when using a background, but once I apply Alpha, the glare effect and the noise texture I used don’t show up in the parts they touch the transparent image.

I’ve been trying to find a solution in both the composition nodes and the material, but I can’t fix it. Any idea on how could I get rid of the issue? Using Blender 2.79.


The reason why your glow dissapears is that it gets multiplied by alpha, but as alpha is zero outside your model, the resulting value in RGB channels is also zero. So there are two options: 1) fill the alpha also for glow; 2) make sure glow area is not multiplied by alpha, producing situation where alpha is zero, but rgb is not. This is in some cases preferable because it can produce proper additive glow which is not possible with simple alpha merging.

Solution 1) create proper alpha for glow area, you can use the luminance or one suitable channel for doing this. Extract alpha from original model and mix it with glow alpha using maximum operation in math node. Then inject it back into main comp using set alpha node.

Solution 2) do premult manually , merge the glow and write your image out without additional premult step. Now the problem is that I’m not 100% sure it is possible in Blender compositor because to achieve the second solution, you need full control over what is written to file (png for example). AFAIK, premultiplication is done in any case at writing, when premultiplication is expected by file format.