Hi
I am in the process of creating a CCTV system for my game. That players can look at this system in a room and interact with (hitting buttons to change/cycle monitors to different cameras).
So far, after a few hours the prototype is functional, I have 8 small monitors, 1 main monitor, each of which can have the camera changed (granted, it has a limitation where 2 monitors can’t display the same thing, however a remedy is in the works for that).
My set up is that I have 2 blueprints, a monitor blueprint, and a surveillance camera blueprint.
The surveillance camera has a Scene Capture 2D Component inside of it, not to be confused with a standard Scene Capture 2D object placed inside of a level. Even though they both do the same thing, the Scene Capture 2D Component does not have any “Show Flags”, it only has the post processing menu to customize.
Capture source on the Scene Capture 2D Component is set to “Final Color(LDR with PostProcess)”, and I disable things such as reflections, bloom, and anything that could slow down performance massively.
I know that when I just used a Scene Capture 2D object inside of the level and I turn off dynamic shadowing, it improves performance dramatically, to the point where the impact on performance is not noticeable, even with multiple cameras. However this is a pretty major aesthetic to discard.
My scene capture render target’s are only 128x128, I have also tried 512x512 but noticed next to nothing in terms of performance difference.
I have turned off HDR on the scene capture render targets too.
As far as the rest of the Render Target properties, I’m not entirely sure what else I should/could change that would impact performance.
I haven’t looked into it too much, but I am presuming that a Scene Capture 2D class would be updating the capture every tick? Which means the camera feed would be updating very frequently, thus slowing performance. So I tried to work out a way to limit the update rate.
I tried a bunch of different methods, timer’s, time-line’s even, but I found the best method was this:
This gives me the best performance in terms of frame rate, but when all 9 camera’s are going at once, the game has unbearable stuttering due to the turning on and off of the frame capture. My guess is the stutter is due to the frequent fluctuation of frame rate (66-71).
I am honestly not really too sure what I can do to make it so this surveillance system runs smoothly.
Does anybody have any thoughts or suggestions. And if I have not been clear on anything, please tell me so that I can elaborate.