finitesingularity / obs-advanced-masks Goto Github PK
View Code? Open in Web Editor NEWAdvanced Masking Plugin for OBS
License: GNU General Public License v2.0
Advanced Masking Plugin for OBS
License: GNU General Public License v2.0
Is your feature request related to a problem? Please describe.
Rather than limit the plugin to just alpha masks, allow the user to use the same masking to apply various color corrections. I propose the following masked adjustments:
Potentially we could also add a color multiply and a color add.
Is your feature request related to a problem? Please describe.
No
Describe the solution you'd like
Scale/Position Properties: Scale
It would be nice to have to option to go higher than 100%. Maybe up to 200%?
Describe alternatives you've considered
N/A
Additional context
For example, if you wanted to "zoom", such as a face closeup, you can't do it beyond 100% scale. Having the option to go up to 200% would open up another possibility.
Describe the bug
Shape masks are all 20% larger than the specified width/height input by the user.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The masked color source should be 100px x 100px.
Additional context
The issue and fix for this is simple. I made 2 errors in how I set things up:
To fix this, we simply need to have a check to see if scene view transformation is turned on, and if it is not, dont scale by the global scaling factor. Also, the default value for this should be 100% instead of 120%.
The elephant in the room
This fix is a breaking fix. After applying these changes all non-scene-view-transformation shape masks will instantly become 20% smaller. Additionally, any Move plugin, or 3rd party changes (e.g.- websockets) will now be incorrect.
So what can we do about it?
(Huge thanks to Exeldro for pointing this out). We can use the source version system that OBS provides, which can leave any existing plugins using the old, incorrect scaling, but any new plugins will use the correct sizing. This will cause a little inconsistency between pre-bugfix created masks, and post-bugfix created masks, but I can deal with those questions as they come (And possibly add a note to the pre-bugfix filter interface).
Describe the bug
Alpha masks do not get applied to image masks.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The mask should be applied.
Additional context
This is due to the whole pre-multiplied alpha issue described here: exeldro/obs-shaderfilter#39 (comment)
Nevermind, I was using it wrong /////w/////;
Describe the solution you'd like
Add a new mask type- linear gradient. The gradient applied as a mask should have parameters for size in px, angle, and location.
Describe the solution you'd like
Add ellipse to shape mask. This could potentially be added to the circle mask.
Describe the bug
If the ellipse height and width are equal, the ellipse mask vanishes.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Ellipse masks with an equal height and width should render as a circle.
Additional context
This is due to the SDF function used, which divides by the difference between the width squared and height squared. If width equals height, this causes a divide by zero. Easy fix is to check before calling the render function, and if width == height, call the circle shader instead, after setting the circle radius to the ellipse width/height value.
Describe the solution you'd like
Add a feathering option that feathers the edges of shape masks.
Describe the bug
When setting up an advanced mask filter on a source, there was strange behavior while HDR was enabled on my primary monitor. The initial scene, without the filter, looked like this:
The preview/filter settings window showed this:
When activating the filter to adjust the mask, the preview became brighter and the mask was not visible:
However the actual current scene did show the correct changes:
And moving the filter settings window to a non-HDR monitor corrected the behavior as well (note: filter size changed to better show effect):
In addition, turning off HDR on the HDR monitor showed the expected behavior
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Preview should show filters whether on an HDR or non-HDR monitor.
Screenshots
Screenshots included in description.
Environment
GPU
Additional context
I appreciate you
Describe the solution you'd like
Add a hexagon option to the list of shape masks.
Is your feature request related to a problem? Please describe.
It is nearly impossible to set up a video mask without significant re-rendering at a large enough scale to fit flexibly on the source being masked.
Describe the solution you'd like
When attempting to create a video mask for a source, it would be lovely to have control of the mask's position, scale, and more, similar to how the shape mask has "Scene View Transform" options.
Describe alternatives you've considered
An alternative option, may be to allow the user to "pin" the transforms of the source mask to the mask effect. So that when transforming the mask itself, from within the viewport of OBS, it would automatically affect the source being masked.
As an even more powerful option, being able to read / parse the transform of the mask, and live-applying its entire transform to the source being masked, would be very very useful.
Additional context
None that I can think of, I've linked the file I'm attempting to use as a source mask for a webcam; where I discovered I am having this issue.
https://drive.google.com/file/d/1mR8atbqleow0Trf6nUQ20Y3WvKhTN71b/view?usp=sharing
Describe the bug
Setting scale to less than 100% does not save on exit, reverts back to 100% on next load.
To Reproduce
Steps to reproduce the behavior:
Set shape to rectangle, set properties to your liking and then set the scale setting to 30% for example. Close OBS, wait a few seconds, then reload. The source should be back to 100% in scale.
Expected behavior
Scale setting should remain at what it was set on exit.
Screenshots
If applicable, add screenshots to help explain your problem.
Before close (source filter set at 30% scale):
After close and reload (source filter reverts back to 100% scale):
Environment
Describe the solution you'd like
Provide a rotation field for all shape masks (except circle) that allow the user to arbitrarily rotate the mask.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.