I wonder if there is a way to make a Chroma Key in Synfig.
If not, is there any interest on having this layer (similar to Luma Key)?
I support this.
Additional ways of masking is always a good thing.
Will anyone be able to draw an icon for it? XD
Perhaps something similar to Luma keyâs icon? Since chroma key is very close to it in meaning. I am not good at designing stuff, but hereâs my entry:
Source:
layer_filter_chromakey_icon.sif (41.3 KB)
Color green is chosen because of green screen, the most popular usage of Chroma key. Hereâs how it looks in Layerâs menu (ignore that it says âLuma Keyâ):
Man, youâre quick.
I promise to test and report back some time this week.
Okay, I did some testing, hereâs what I found:
- Tip for âKey Colorâ is wrong. It reads: âWhen checked, the Ceiling value is usedâ. Obviously, a copy-paste error. Should be something along the lines of: âColor to be made transparentâ.
- âUpper Boundâ parameter works weird in cases when colors are very close to the mask. It produces a semi-transparency effect:
Which is an error I would guess, because âLower Boundâ doesnât produce the same effect.
Source:
ChromaKey.sif (10.8 KB)
You can see on the screenshot, that âChroma Keyâ doesnât work well with feathering (white region)/anti-aliasing but I suppose itâs a technical limitation (it would work the same way in a video editor).
About the boundaries: I compute how close a color chroma is different from that of key color.
If the value is below the lower bound, it becomes completely transparent. If above upper bound, it stays as it is. In the middle, its alpha channel is proportionally changed.
Do you think it is bad?
If you user doesnât want this in-between effect, just set lower bound equals to upper bound.
ouch.
Iâll investigate it.
Oh, I see. I didnât get the full idea how it works. Itâs good.
I donât think you can do anything about it. The feathering blends colors and the result obviously wonât correspond to the mask anymore. Luckily, you can uncheck anti-aliasing from regions and outlines and put a âSuper sampleâ layer on top of âChroma Keyâ. Feathering can be done after using âBlurâ layer.
And besides, Iâd say the main use of âChroma Keyâ is for raster graphics (sprites, pixel art, cut-out pieces).
Should I embed this feature on ChromaKey?
Embed? Without a choice? The âSuper sampleâ functionality - definitely not, because user may want sharp edges (think pixel art). For anti-aliasing, if itâs possible to introduce one additional bool type parameter, something like âDisable Anti-Aliasingâ that if checked will disable it for every single layer below âChroma keyâ, then I would go for this approach.
Well, there is always the option to make it (0,0) to disable it.
Iâm afraid it is not possible: a layer does not change parameters of other layers.
So youâre talking about an option, not embedding. I thought by âembedâ you meant hard-coded.
In short, you just want to add âSuper sampleâ functionality as an option, correct? If so - go for it, itâs a good idea.
Hm⌠I couldnât see any visual improvement by using SuperSample.
Because you forgot to change rendering mode from âPreviewâ to âFinalâ
Damn it!
Do we need to let both supersample width and height available? I guess just one is fine (force it square).
@Svarov Please take a look at my proposal again add new Chroma Key layer by rodolforg ¡ Pull Request #2553 ¡ synfig/synfig ¡ GitHub
Yeah, I think itâs fine.
Not sure about ice0âs idea though. Iâd say itâs not important right now, because Synfig isnât a video editor, we rarely work with real photos where light source is complicated but rather with sprites/cut-out that designed in a way to be properly cut by chroma mask. Maybe in the future, but itâs unnecessary in my eyes.
Not gonna lie, I always used it with the same height and width, but letâs keep it for now. Maybe itâs useful in some ways. And besides, âChroma key/Super Sampleâ layers donât have overwhelming amount of parameters to cause confusion.
I forgot about his suggestion XD