CCTV effect costs me a drop of about 30 FPS... WHY?

Hello all.

In my game there’s these two doors that are connected. Basically I just have a trigger volume around them, so when the player walks into one, I teleport them to the location of the other.

But for the visual effect I followed a tutorial and did a little CCTV style effect on the door, so you can see the location you’ll be teleported to in this kinda nice pixelated way.


The problem is that this little effect drops my frame rate by 30 or more!

The blueprint is fairly simple.
It a mesh of a door, a mesh of a frame, and then I have a plane that I use to project on, and a camera.

I connect the two doors with this editable variable

Then the event graph is fairly straight forwards, I create a dynamic material and basically just use the resulted input from the camera as a material. (sorry, the wrong thing is highlighted in the screen shot. The top custom event is the important one).

It works great, but like I said, the price is simply too high. Anyone has any advice on how to make it more efficient?
Perhaps there’s an altogether different way of achieving something like that?

As usual - thank you very much for your knowledge and advice!

1 Like

The trouble with a render target, is that you’re basically rendering the world twice. Once for this side of the door, and once for the other side. So I’m assuming it probably roughly halves your frame rate?

It is possible to improve things by making the target low res, but it looks like crap.

I think the only way to really made a big difference is to only render the part you need, which means you’ll need to do it in C++, just because you get a lot more control over what’s going on.

https://www.reddit.com/r/unrealengine/comments/bvdlvl/portals_bp_update_recursion_performance/

2 Likes

I see what you mean.
Honestly? I think I may have overdone it. Since in my case, you can’t open a portal randomly like the player can in the game Portal. It’s just two pre-determined points that are connected. And there’s nothing moving in that room.
So I probably can get away with just having an image or a pre-rendered video looping, instead of a live render of the actual room. :thinking:

Anyway, once again, thanks for your reply!

1 Like

If nothing’s changing, then just a static picture :slight_smile: