Previous topicNext topic

Weird alpha channel results using Spout to NDI in OBS.

Questions, comments, feedback, etc.
Post Reply
ToxMox
Posts: 20
Joined: Mon Jul 31, 2017 6:43 pm

Weird alpha channel results using Spout to NDI in OBS.

Post 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?
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: Weird alpha channel results using Spout to NDI in OBS.

Post 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?
ToxMox
Posts: 20
Joined: Mon Jul 31, 2017 6:43 pm

Re: Weird alpha channel results using Spout to NDI in OBS.

Post 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.
ToxMox
Posts: 20
Joined: Mon Jul 31, 2017 6:43 pm

Re: Weird alpha channel results using Spout to NDI in OBS.

Post 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.
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: Weird alpha channel results using Spout to NDI in OBS.

Post 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.
ToxMox
Posts: 20
Joined: Mon Jul 31, 2017 6:43 pm

Re: Weird alpha channel results using Spout to NDI in OBS.

Post 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
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: Weird alpha channel results using Spout to NDI in OBS.

Post 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.
ToxMox
Posts: 20
Joined: Mon Jul 31, 2017 6:43 pm

Re: Weird alpha channel results using Spout to NDI in OBS.

Post 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.
damstraversaz
Posts: 176
Joined: Tue Aug 26, 2014 11:22 am

Re: Weird alpha channel results using Spout to NDI in OBS.

Post by damstraversaz »

I'm agree , a native Ndi input and output could be a nice feature.
Terry Payman
Posts: 711
Joined: Sun Sep 14, 2014 8:15 am
Location: UK
Contact:

Re: Weird alpha channel results using Spout to NDI in OBS.

Post by Terry Payman »

+1 for NDI in/out.

It would indeed be an awesome feature.
Post Reply