Render target problems with multiple UMGs

I have several different cameras. A main camera that stays with my Pawn. There’s also an Overhead camera and a Sideview camera. I want to have a picture in picture. Each of the views are further away and looking down at the map or at the side of the map. I have the overhead and side cameras eash using a RenderTarget to create a Material.

In my UMG display, I have some standard stuff on the screen and the Overhead View by using an image button with the Material for the Overhead View as the image input. When I run the game, I can see this overhead view and see my Pawn running around. If I add the Sideview to this UMG, I can also see it, but I’d like to be able to turn the Sideveiw on and off.

I created another UMG for just the Side view (created the same way with the Material for that camera as the image for an image button). I can add this UMG to the viewport and remove it as needed, and it works fine for text or a static image. The problem is that the Image that’s tied to the Sideview camera is white…no video.

The problem doesn’t seem to be dsiplaying multiple cameras in the view, it seems to be doing that with overlying UMGs. Is there a way to either tell the top UMG to “allow other materials to render” below it? Can you turn an image on and off in one UMG? Should I make several UMGs with different layouts and turn those on and off while destroying all the others each time?

Thanks,

Gotta say upfront, no, I don’t have a solution to this, but it sounds like you’re basically there already.

The only other things I can think of off the top of my head are:

  1. Keep the two screen UMG working, and just make the button with side view not visible ( is that possible? )

  2. Keep your main UMG and then make the side view UMG only big enough to fit the button in, so you don’t have problems with overlay

3 ) Messing around with scaling of the target / UMG, like making it so small it can’t be seen, I saw something like that here:

https://forums.unrealengine.com/development-discussion/rendering/1603327-umg-widget-render-target-for-material

It seems like the UMG doesn’t like handling more than one (or at times one) picture in picture (i.e. render target). It probably has to do with having to do realtime overlay of a realtime stream of images, and doing this from multiple cameras may just be too much for it or too much for the graphics card I’m running. I’m not sure if the GPUs are the main handler of that task or not…probably, but I’m not 100% sure.

After reading through the link you sent, I’m going to look at placing a delay in the rendering of the render target images that are being streamed. I just have to figure out how to do that.

I do have a work around. I can place a couple of planes in the camera view under the hierarchy of the main camera. I then use the render target texture materials as the materials on the planes. UE4 has no issues with this so far and it solved all my crashing issues, but it no longer is an overlay, so the planes can get clipped by other object geometry in the scene, but at least I now have picture in picture that makes UE4 or my graphics card happy.