White Outlines: The Unwanted Guests of My Masks 🎭

While working on the Palette Renderer add-on, I encountered another issue related to using masks in the Compositor: a white outline that becomes especially noticeable on darker colors.

The only solution I could find through my own research was to use the Dilate/Erode node followed by a Blur node. However, on lighter colors, this approach creates the opposite problem—a dark outline around the entire mask.🤨

Here’s an example of the results on darker colors before and after.

While it’s somewhat acceptable, it’s far from perfect.

For example, on Agness, there are significantly more color masks, and they can be quite small. That cursed outline is impossible to get rid of without blurring the intersection of the masks. In my case, the white stitching on her glove straps completely disappears!😭

So, I’m curious—are there any other ways to tackle this problem? I’d love to hear your suggestions! 😊