I'm rendering an explosion and adding glow in Blender compositor.
I want to use it in a video editor later to composit the explosion on top of other footage. The premultiplied alpha should let me have the non-transparent parts (thick flames, smoke) cover the backdrop, while having the transparent parts (glow, soft flames) be added onto the backdrop.
I know how the math of alpha blending works, but Blender seems to be somehow always producing broken results, no matter how hard I try to work this around.
This is what I get every time when I export pre-multiplied alpha from Blender and composit on top of other footage in a video editor:
The fire is there, the glow is tehre, but there's a horrible white border around the fireball. Why is Blender doing this? It's clearly miscalculating RGB values when dealing with associated alpha, and I found absolutely no way to work this around.
Is there no way to export anything from Blender having premultiplied alpha working? It seems to be inherently broken. It's hard to believe, but that's what it looks like. If it's an error on my part - I'd be happy to learn the solution.
If I preview my render with added Glow without alpha used it looks like this:
Which is fine.
The alpha channel looks like this:
Which is also what I'd expect.
Somehow Blender takes the two and when I just apply the alpha to above RGB content I get this monstrosity, no matter how I do it (Set Alpha node, Separate/Combine RGBA nodes, routing Alpha directly into Viewer node...):
I am pretty sure I'm doing everything correctly, but somehow Blender compositor seems to be incapable of handling associated alpha material and breaks the RGB values at every step when fed such input. Which sucks, because I won't be able to get the visual results I want out of it.
Now - to get the Glare node work correctly I had to do this:
If I just give it the RGBA output from RenderLayer it obviously breaks:
How is this possible? is that a recently introduced bug of what? I've heard Troy Sobotka complaining about Blender's compositor not understanding associated alpha, but I've never experienced this first hand before.
What is going on? How do I get a nice glow without a hideous white border?





