Page 1 of 1
Weird alpha channel results using Spout to NDI in OBS.
Posted: Mon Jul 31, 2017 6:47 pm
by ToxMox
I just purchased Magic the other day and I have to say it is pretty awesome so far. I am running into an issue where anything that should have some alpha transparency has a shadow / darkening effect instead of what it should really look like so on light backgrounds it looks pretty bad. I'm trying to figure out if it is Magic itself or something in my chain of steps causing the issue. I'm using Spout to NDI then have the NDI plugin in OBS as a source.
Anyone have any thoughts on how I can troubleshoot this?
Re: Weird alpha channel results using Spout to NDI in OBS.
Posted: Mon Jul 31, 2017 7:18 pm
by Magic
I think the issue here is premultiplied alpha. I believe that newer versions of OBS support it, and I know Spout does, but I'm not sure about NDI. Do you see any kind of alpha channel setting anywhere?
Re: Weird alpha channel results using Spout to NDI in OBS.
Posted: Mon Jul 31, 2017 7:28 pm
by ToxMox
Indeed it seems like a premultiplied alpha thing. I will post in the OBS forum for the NDI plugin now that I have a technical term for it as there are no settings.
Re: Weird alpha channel results using Spout to NDI in OBS.
Posted: Tue Aug 01, 2017 1:25 pm
by ToxMox
I just wanted to add a screenshot example for reference and to confirm my issue:
http://i.imgur.com/zLYA2p5.png
The top one is the Magic -> Spout -> Spout to NDI -> NDI source in OBS
The bottom one is a PNG export from Magic added manually to OBS as an image source.
So if indeed this is pre-multiplied alpha. What would I want to tell the dev of the NDI plugin? To enable pre-multiplied alpha? To disable it? Add support for it somehow? Not sure of the technicalities here. There's also a change it is the Spout to NDI converter causing it.
Re: Weird alpha channel results using Spout to NDI in OBS.
Posted: Wed Aug 02, 2017 12:49 am
by Magic
I definitely see what you are saying. That problem is the exact indication of applying the wrong type of alpha blending (straight vs pre-multiplied). Here's a bit more information:
https://www.cgdirector.com/premultiplie ... ght-alpha/
Is the OBS NDI plugin a separate download? If so, can you point me towards it? I'm happy to take a look and/or contact the dev if necessary. But overall what you would need is some kind of toggle option to interpret the NDI source as either straight or pre-multiplied.
Re: Weird alpha channel results using Spout to NDI in OBS.
Posted: Wed Aug 02, 2017 12:58 am
by ToxMox
Eric wrote:I definitely see what you are saying. That problem is the exact indication of applying the wrong type of alpha blending (straight vs pre-multiplied). Here's a bit more information:
https://www.cgdirector.com/premultiplie ... ght-alpha/
Is the OBS NDI plugin a separate download? If so, can you point me towards it? I'm happy to take a look and/or contact the dev if necessary. But overall what you would need is some kind of toggle option to interpret the NDI source as either straight or pre-multiplied.
I am on mobile. I think I may have sent a pm by accident sorry. Here is my reply again:
That would be awesome! Yeah it's a separate plugin. I'll link you right to the issue i posted on the github
https://github.com/Palakis/obs-ndi/issues/30
Re: Weird alpha channel results using Spout to NDI in OBS.
Posted: Wed Aug 02, 2017 4:31 pm
by Magic
Hmm actually it seems like you pointed him in the right direction. I think the solution would be the same as where you directed him on the OBS forums. But lemme see if there's any alternative solutions I can think of.
Re: Weird alpha channel results using Spout to NDI in OBS.
Posted: Wed Aug 02, 2017 4:34 pm
by ToxMox
Eric wrote:Hmm actually it seems like you pointed him in the right direction. I think the solution would be the same as where you directed him on the OBS forums. But lemme see if there's any alternative solutions I can think of.
Great! Thanks for looking into this
On a side note it would be awesome to have NDI as an output option in addition to Spout. The Spout to NDI converter app is using about 10% of my cpu so it would be pretty sweet to take that out of the loop. I expect more people to start using NDI now that there is a good plugin for OBS and also support in things like Xsplit and Vmix etc. which all support NDI now.
Re: Weird alpha channel results using Spout to NDI in OBS.
Posted: Thu Aug 03, 2017 2:47 pm
by damstraversaz
I'm agree , a native Ndi input and output could be a nice feature.
Re: Weird alpha channel results using Spout to NDI in OBS.
Posted: Thu Aug 03, 2017 3:36 pm
by Terry Payman
+1 for NDI in/out.
It would indeed be an awesome feature.