Start typing to search...

How to use Aximmetry as external keyer with Unity



This document describes how to send a keyed NDI output from Aximmetry to the Unity Real-Time Development Platform.

The tutorial uses the KlankNDI package to process the NDI protocol in Unity.

Setting Up Aximmetry

Before you go to Unity you have to start Aximmetry Composer.

On the Startup Configuration screen go to Device Mapper / Manage Devices. Add a new NDI output. We call it "AximmetryStream".

Now in your Video outputs, you find the AximmetryStream as an NDI connection. Set it to Index #2 and Sync to make it your main output.

Set the mode to your desired resolution which is supported by the NDI standard, and make sure your format is RGBA.

Create a simple flow for Chroma Keying.

Set up the keyer as per said in the Using the Advanced B Keyer. And use a Video Input module to get the video of your camera device. Don't forget to set the Device and Mode values in the module.

NOTE: You can use any video or compound for testing purposes as long you make sure that there is a video output at index #2.

Installing KlankNDI for your Unity Project

KlankNDI is a package created by Keijiro Takahashi and it is a package that you can download internally in Unity through the package manager. However as this is an external package using "scoped registry", you need to do some extra steps to edit your Unity's Package manager manifest file. You can find a detailed explanation of how to install it on Keijiros GitHub.

Setting Up your Unity Project

Once you installed the KlankNDI and have also added it to your Unity Project. Go to your Assets folder and create a "Render Texture". (In our example it's called simply NDI.)

We suggest setting the Size of this Texture to 2048x2048 if you are sending FullHD video. As Unity rescales every nonsquare texture to a square texture of 2^ (256..1024..2048). In this way, you can get a bit better output as the system only rescales the texture once.

Create a Material. We name it simply Aximmetry.

Set it to Unlit/Transparent Cutout or Unlit/Transparent.

Select the previously created Render Texture as texture.

Create a Plane in the Scene.

Apply the material to it. (Drag and Drop material on the Plane.)

Create an empty GameObject. (Shortcut: CTRL + SHIFT + N)

Add a Component "NDI Receiver".

Choose the NDI stream you created in Aximmetry.

Apply your new "NDI" Render Texture as the Target Texture.

You should see the Aximmetry NDI output on your Plane. 

If you start your Chroma Keyed Aximmetry Project now. You will get the keyed output.

If you place this plane anywhere in your scene, this is your Billboard. 

You can use this method with HDRP Shaders as well. Please refer to Unity documentation for HDRP, URP, or SRP setup.

Article content

Loading spinner icon