In some compositing softwares like aftereffects, it is possible to change the alpha blending of an image (like .png) to “premultiplied”. This sometimes help remove black lines around the transparent elements in the image.
Is there a way to achieve the same thing with transparent materials/textures in Babylon ?
I think the “alphamode” is there for that, but I’m not sure how to use it.
Thank you for your help!
But you’re right, it doesn’t seem to remove the black lines…
(at least the other blending modes like ALPHA_ADD works now)
I guess this is not a feature available in Babylon ?
Otherwise, I’ve also tried the the alphaCutOff parameter, but the result is not very good… Any other ideas ?
Well I’m guessing it’s the wrong alpha values in the textures. (yes it’s a .png)
I’m not an expert in this (sorry if I use the wrong terms), I know some rendering software (vray, maya) let you enable “premultiplied” or not when saving the image, but unfortunately the one I’m using (Unreal Engine) doesn’t have that setting.
I know that in the compositing software Nuke, the merge method to use to get rid of the black lines is “plus” instead of “over”. Is there something similar in Babylon ?
Also, when I open the image in google chrome, I don’t see the black lines (but maybe it’s because of the white background):
I may have found a solution, but it’s not the most optimized and It’s not perfect…
Using 3 planes instead of 2, with the second one set to “Alpha_ADD”, reduces the black lines: https://playground.babylonjs.com/#9WXT4M#8