Need to cycle through cameras and display their views on a render target.

This should be simple. But I’ve been spending way too much time trying to figure it out. Everything I’ve seen just focuses on one camera and one target, which yes. That’s simple. But I have multiple cameras set up throughout my level. The player can click on the cameras to enter into a system where they can switch between all the cameras in a forwards/backwards cycle. (Easily accomplished here since it’s a simple “Set View Target with Blend” call from one camera to the other to set the player’s view to that camera.)

What I need to do now is: I have a monitor set up in a security room where I want the view, every few seconds, to swap between the mounted cameras. It seems like it should be simple enough. Just cycle through the camera BPs, grab the camera component, and send it’s view to a render target. But I can’t figure this out.

About the only thing that I’m able to do is have a scene capture component in the monitor BP and then I’m just grabbing the world transforms from the security cameras’ locations and moving my scene capture component temporarily to that location/rotation. This is obviously not the way it’s supposed to work, and is just my temporary workaround. It doesn’t show the actual camera view, obviously, it just shows a view that’s pointing in the same direction, but not at all with the exact camera view.

So: How do I grab a camera view (any camera I choose) and send its individual view to a Render Target?

Thanks!

-Marc

i think i saw some free cctv. you can check them out in the fab. search for : FREE Realistic Security Camera System.

it have monitor, it can cycle through all camera by clicking. but for you, maybe make a set timer by event to cycle.

The thing is, I have a fully functional camera system set up in my map already. I can click into it, and cycle through all the cameras with a Set View Target with Blend. But what I’m trying to do is grab those same camera views to a texture. Using the Scene Capture 2D isn’t an option which is what most all of the things I’m seeing out there are doing. I need to grab the actual “camera” component view.

I’m looking into seeing if there’s a way I can copy each camera’s information into the Scene Capture component, and maybe just use what I have (moving the Scene Capture component to each camera’s Location/Rotation) for cycling through the system on my monitor. But I’m really surprised at the difficulty I’m having just trying to find a way to just grab the view from a Camera Component and direct it directly to a Render Target. In my mind, this should be something very simple.

But thanks for your response! I appreciate it!

-Marc

You could add the scene capture comp to each camera with the exact same FOV / Transform. Have them all draw to the same render target and Just make sure to toggle capture every frame on and off when you need it. If they all point to the same target that is fine it will update with whatever camera happens to be active. To render a view to a texture unreal needs a special render pass so just using a camera you cant draw to a target. Hope this helps.

1 Like

What I had decided to do is to just create an array of all the cameras that are in the active player zone and just cycle through them and set the world position/rotation of the scene capture component to match the camera component, and then grab each camera’s FOV and set it to the scene capture component. I need to make a couple adjustments to the world transform when copying it over, but since this isn’t a main feature of the game, this really works good enough.

It’s pretty much the same basic premise, but I’m just using the one SCC2D and moving it around instead of attaching one to each camera. To account for all of the post-processing that’s on the actual cameras, I just decided to take my Scene Capture material and add a desaturation node to make it black and white. For the minor purpose of what it’s being used for, this works just fine.

Thanks!

-Marc

1 Like