virtual-puppet-project / vpuppr

VTuber application made with Godot 4
Mozilla Public License 2.0
740 stars 61 forks source link

[FEATURE]: Allow setting the chroma key / color key color from OBS defaults #209

Open lhriley opened 1 year ago

lhriley commented 1 year ago

Description

The current chroma key color in vpuppr appears to be #00d150 (ref) which is very difficult to properly key out as it doesn't seem to relate to any standard color keys.

OBS allows chroma keying on any color, which may or may not be easy to implement in vpuppr. As a middle ground, vpuppr should support the pre-defined colors that OBS has:

Additionally, the OBS color key filter supports:

Why is this needed

Since this color is relatively non-standard it is very difficult to properly key out. This results in noisey edges around the object which look messy and reduce the quality of the resulting image.

Additional information

Chroma Key:

https://github.com/obsproject/obs-studio/blob/cdced774e88d4049ac9f3f3810c4c10f6eff43ac/plugins/obs-filters/chroma-key-filter.c#L154-L159

https://github.com/obsproject/obs-studio/blob/cdced774e88d4049ac9f3f3810c4c10f6eff43ac/plugins/obs-filters/chroma-key-filter.c#L188-L193

Color key:

https://github.com/obsproject/obs-studio/blob/cdced774e88d4049ac9f3f3810c4c10f6eff43ac/plugins/obs-filters/color-key-filter.c#L138-L145

https://github.com/obsproject/obs-studio/blob/cdced774e88d4049ac9f3f3810c4c10f6eff43ac/plugins/obs-filters/color-key-filter.c#L164-L171

For additional reference, this site shows the "official" green screen color and the closest safe colors for various processes: https://www.color-name.com/green-screen.color

you-win commented 1 year ago

For what it's worth, the current release version of vpuppr should be using #00b140 (or something close to it), which is one of the first search results for "chroma key green hex code" on Google.

The chroma key png file was only there for testing (or at least it should have been).

I will take into account the OBS defaults, since that's probably what most people are using to capture anyways.