-
-
Notifications
You must be signed in to change notification settings - Fork 518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: ✨ Add chroma key support; make passthrough settings real time #2662
Conversation
So, looking at the settings I've already got a few critiques:
Edit: Just realized the feathering is basically just my distance thing, but the distances being centered around 1.0 doesn't make a ton of sense, esp considering the visionOS defaults are [0.35, 0.7], so both very low |
alvr/session/src/settings.rs
Outdated
#[schema(strings(display_name = "Hue range"), suffix = "°")] | ||
#[schema(flag = "real-time")] | ||
#[schema(gui(slider(min = 0.0, max = 360.0, step = 1.0)))] | ||
pub hue_range_deg: f32, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tbh this being in degrees doesn't make a ton of sense? I can see the logic of weighting each of the components in a distance function mayyybe, but the default should be 1.0 weight and should be conveyed as a 0~2 weighting, everything made way more sense when I set this value to 180deg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quickly glanced over your implementation out of interest, since I was looking to do something similar.
Found a typo.
I think the current iteration is extremely servicsble for sims/VRChat where the expectation is like, 'key out my neon Other downside is I feel like the min/max stuff is still a bit hostile to the possibility of color pickers (I don't know anyone that can do RGB->HSV conversions off the top of their head), but again maybe a super basic keying option separate from this one would be the better way to handle that. |
I agree that a simpler chroma keying option would work for many people that closely control the key color in their video content, so we offer a single RGB color as parameter. But then we would need to fix the color bleeding. I've come to terms that the color fix on the edges of the mask cannot be purely based on color but also on location of the mask pixels, the neared full 1.0 mask pixel color should bleed into the transition area. I can see that this might be not feasible unless we impose strong restrictions on the size of the transition area. |
tbh distance with min/max feathering and the key subtract does a good job on just edges, but it's just fundamentally reliant on ~some linear relationship between the mask and the key color. But yeah, different PR. This method is good for nuking entire color ranges, which min/max feathering can't really do. |
Can you please explain to me the start-end-min-max for the HSV variables? I'd like to passthrough a magenta colour but am struggling to fine tune it |
No description provided.