NDI Broadcast from Unreal. Does alpha transparency work?

ToxMox

New member
So I've been testing the NDI SDK for Unreal and it's very nice but I can't seem to figure out how to get it to output with alpha transparency.

I'm just starting out with Unreal so I'm not sure if it's a limitation of the NDI plugin or I just don't know how to properly configure it for alpha support. Any guidance here would be greatly appreciated! :)
 

ToxMox

New member
Thanks for trying to help but that video doesn't cover anything having to do with alpha channel support in the NDI plugin and doesn't deal with output to NDI at all.
It's a tutorial where he brings in green screen footage via NDI and then chroma keys it in Unreal engine.

- - - Updated - - -

To be clear. My ultimate goal/desire here. Be able to output from Unreal engine to NDI with full alpha support. Meaning things like even bloom work.
 

Sim23_10

New member
Hi Tox,

Did you ever have any success here?

I am looking into the same thing and am stuck too.

I have managed to get the alpha transparency working on a incoming NDI feed to unreal, but am struggling with the output. See attatached image which has a NDI source with transparency working inside unreal

Has anyone from NDI confirmed that it is possible to include alpha from unreal?

My theories currently are
  • The render target knows it's alpha mask so if there is a way to broadcast that separately then key/fill would be possible
  • the composure tool seems to be the solution for those with hardware capture cards, it can also output to a render target
  • I'm just missing something that includes the render target's alpha in the ndi broadcast

I've posted in the Unreal developers group too to see if anyone has any sensible suggestions.
 

Attachments

  • alpha.png
    alpha.png
    1.3 MB · Views: 111
  • ndiout.png
    ndiout.png
    1.3 MB · Views: 128

ToxMox

New member
No I didn't. I ended up moving to Unity for my project as I found Unreal to be unnecessarily complex.
 

M-Pixel

New member
Find
Code:
NDI_video_frame.FourCC = NDIlib_FourCC_type_BGRX;
in the plugin source code and change it to
Code:
NDI_video_frame.FourCC = NDIlib_FourCC_type_BGRA;
. It's a wonder that they didn't set it that way in the first place.
 

AdrianTabacaru

New member
Hey @M-Pixel, I have changed the code in the plugin file but still, I get no alpha on the NDI Output.
What am I missing, can you please help?
I have changed to all RGBA Render target formats with no luck.
 

Attachments

  • Capture.PNG
    Capture.PNG
    336.4 KB · Views: 55

MrHurz

New member
@AdrianTabacaru you have to recompile the plugin to apply the changes made in the sourcecode. There are a few options to do this:
In the Unreal Project go to Window -> Developer Tools -> Plugins and search for NDIIO; there you should be able to click recompile.
Another option would be via the command line (which worked for me). For this to work you need to have visual studio 2017 with unreal package installed. Then open the command promt and type:
"C:\Program Files\Epic Games\UE_4.26\Engine\Build\BatchFiles\RunUAT.bat" BuildPlugin -plugin="C:\Program Files\NewTek\NDI SDK for Unreal Engine\PluginBuilds\UE_4.26\NDIIO\NDIIOPlugin.uplugin" -package="[TempFolder]" -TargetPlatforms=Win64
If the build is successfull, copy the recompiled plugin from [TempFolder] into your Project Folder / Plugins.

I hope i could help you a little bit and a big thanks to @M-Pixel for suggesting this!! Works very nice for me now :)
 

OAG

New member
Hi, please I did try all suggestions here and still end up with output with no alpha :-(

1. I did change (in the "NDIMediaSender.cpp") the line to BGRA
2. recompile with the command line
3. Copy the new complied plugin to plugins folder.

Should I change in any other file too?
Did I missed something?

Please, Please, Please any idea why it doesn't working for me?
 
Last edited:

OAG

New member
@AdrianTabacaru you have to recompile the plugin to apply the changes made in the sourcecode. There are a few options to do this:
In the Unreal Project go to Window -> Developer Tools -> Plugins and search for NDIIO; there you should be able to click recompile.
Another option would be via the command line (which worked for me). For this to work you need to have visual studio 2017 with unreal package installed. Then open the command promt and type:

If the build is successfull, copy the recompiled plugin from [TempFolder] into your Project Folder / Plugins.

I hope i could help you a little bit and a big thanks to @M-Pixel for suggesting this!! Works very nice for me now :)
Please, Please, Please any idea why it doesn't working for me?
 
Top Bottom