NDI Output From Unreal Engine to OBS. Now With More Clipping Planes!

Cutting Holes in Reality (Unreal Engine Clip Plane with NDI Transparency)

Hello friends.
Griff here.

Today we’re going to do something that feels a little bit like cheating the laws of physics: cutting holes in the world.
Check out the video below if you prefer that sort of thing. https://youtu.be/4r4rWeUph_k?si=-GGfcB_BOwN0VFr4

Specifically, we’re going to build a movable clip plane in Unreal Engine that outputs true transparency, which means it works perfectly with NDI broadcasting and tools like OBS.

The end result is that you can literally erase parts of your scene and let the real world, a video feed, or another layer show through.

It’s extremely useful for things like:

  • VTuber setups
  • Mixed reality streaming
  • Virtual stages
  • Portal effects
  • Or just confusing your coworkers.

Let’s get into it.


The Big Idea

What we want is this:

Scene → Clip Plane → Transparent Pixels → NDI → OBS

Instead of coloring clipped pixels black, we’re going to output actual alpha transparency.

That means OBS will see those pixels as holes.


Step 1 – Create the Post Process Material

Create a new material.

Set the material settings like this:

Material Domain = Post Process
Blendable Location = Before Tonemapping
Output Alpha = TRUE

That last one is important. If you forget it, Unreal will politely ignore your attempts at transparency.

ndi clipping post process material

Step 2 – The Plane Math

We’re going to determine which side of a plane each pixel lives on.

Add these nodes:

AbsoluteWorldPosition
ClipPlaneOrigin (Vector Parameter)
ClipPlaneNormal (Vector Parameter)
Subtract
Dot
Step

Wire them like this:

AbsoluteWorldPosition
        |
Subtract (ClipPlaneOrigin)
        |
DotProduct (ClipPlaneNormal)
        |
Step (0)

This produces a mask.

The mask means:

1 = pixel is in front of the plane
0 = pixel is behind the plane

Behind the plane is where things disappear.


What This Math Actually Means (In Human Language)

For every pixel on the screen Unreal asks:

“Where is this pixel in the world?”

Then:

“Is it in front of the plane or behind it?”

If it’s behind the plane, we erase it.

Simple. Brutal. Effective.


Step 3 – Get the Scene Color

Add this node:

SceneTexture : PostProcessInput0

Then mask the RGB channels.

SceneTexture → Mask RGB

This gives us the rendered scene color.


Step 4 – Add a Debug Color (Optional but Nice)

While debugging it’s helpful to see the clipped region.

Add a constant color:

Constant (1,0,1)

That’s magenta, the international color of “this is probably not supposed to be here”.

Now add a Lerp:

A = Scene Color
B = Debug Color
Alpha = Mask

Now the clipped region shows up as magenta so you can see the plane working.

Later you can remove this if you want.


Step 5 – Transparency

This is the important part.

Plug the mask into Opacity:

Opacity = Mask

So now:

1 = visible
0 = transparent

And that transparency is exactly what NDI will transmit.


Step 6 – Add an Enable / Disable Switch

Sometimes you want to turn the clipping off.

Maybe you’re debugging.
Maybe you want dramatic reveals.
Maybe you just enjoy toggles.

Add a Scalar Parameter:

Clipped
Default Value = 1

Now multiply it with the mask:

FinalMask = Step * Clipped

Use FinalMask everywhere.

Emissive Lerp Alpha = FinalMask
Opacity = FinalMask

Now:

Clipped = 1 → clipping on
Clipped = 0 → clipping off

Step 7 – Create the Camera Blueprint

Create a blueprint actor with:

SceneRoot
CineCamera
ClipPlane (optional helper mesh)

The blueprint will move the clipping plane and update the material parameters.

Unreal Engine camera blueprint outliner

Step 8 – Drive the Plane from Blueprint

Each frame (or whenever the camera moves) update the material parameters.

Clip Plane Origin

ClipPlaneOrigin = ClipPlane.WorldLocation

Clip Plane Normal

ClipPlaneNormal = ClipPlane.ForwardVector * -1

We multiply by -1 because otherwise the plane will politely clip the wrong side of reality.

Camera blueprint Event Graph

Step 9 – Position the Plane

If you want the clip plane to move with the camera:

PlanePosition = CameraLocation + (CameraForward * Offset)

Then:

SetWorldLocation(ClipPlane)
SetWorldRotation(CameraRotation)

Now the clip plane stays aligned with the camera.

Which is exactly what we want.

Construction Script
l Engine clipping plane position function

Step 10 – Toggle Clipping from Blueprint

When creating the material instance dynamic:

Set Scalar Parameter Value
Parameter = Clipped
Value = 0 or 1

Meaning:

1 = clip the world
0 = world remains intact

Use this for:

  • keyboard toggles
  • sequencer events
  • twitch chat commands
  • dramatic storytelling

Or all four at once.

amer BP in Unreal Engine Scene

The Final Result

You now have:

  • A world-space clipping plane
  • Real alpha transparency
  • Full compatibility with NDI broadcasting
  • Blueprint control

Which means you can literally cut holes in the universe and pipe that into OBS.

Not bad for an afternoon.

Final clipping plane result.  Unreal Engine to OBS

Bonus Ideas

Once this is working, you can take it further.

Soft edges

Replace the Step node with SmoothStep.

Now your clip edge becomes a fade instead of a hard cut.

Multiple planes

Duplicate the mask logic and combine them.

Now you can carve custom shapes out of your world.

Streaming tricks

Combine this with:

  • green screen feeds
  • NDI cameras
  • OBS scenes

…and you can do some pretty wild mixed-reality setups.


Closing Thoughts

Unreal Engine gives us all the tools to do ridiculous things like delete parts of reality on demand.

And with NDI we can stream those results directly into broadcast pipelines.

If you build something fun with this, let me know. I love seeing what people do when the rules of the world suddenly become optional.

Until next time.

— Griff

Share