Unreal Engine Optimization: Using Multiple Cameras in Unreal Engine is killing your game performance

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys and welcome back to this new in engine tutorial and today we are going to talk about cameras and rendering so guys you can see that I am holding a sniper rifle with with a scope okay guys and uh on the top right of the screen you have my FPS so guys uh let's see what happened when I aim on my scope on my right click you can see that I have a drop FPS why because my scope is using 2D render component which is this one I will show you 2D the SC capter component 2D sorry and uh it's using it to display the the view of the camera the the syn component 2D on the scope the scope is uh spawned on the G play okay guys uh so guys this is why uh sorry uh this occur why because when you are playing okay here you are seeing only through the camera of your character okay which is the TPS camera or FPS camera in this case but when I aim you are you you are you are viewing you are seeing through the ads camera and uh the ads camera is rendering the scope which is rendering the 2D scene component on its reticle okay guys uh this is why we have this drop of FPS because we are rendering we are uh viewing through two cameras and each camera is rendering the world around okay guys so make sure in your games to always disable the cameras that you are not using uh and especially if it is the the syn cap component 2D because it's very government in performance and uh uh it will slow down your game you can see that you can see this issue uh often when you use the scope or uh security cameras on computers or screens in your game especially if it is a steed game or Spy game okay guys also you can see it when you are using uh mini map sorry because we we often use the we often use the capture SC component uh for displaying the the minium map on the top like this okay uh for example in this case you can uh you can use an UI uh which uh get visible and hide uh when you need it okay don't uh use it in in Perman also guys so you have the AIS in my case I am using the same character for the player and the AI so for example here when I click play you can see that the character this character is this character is the same character of uh the same blueprint of my player character and uh I I have uh said it uh before in my previous series about uh how to make FPS game so here since it is the player character and the AI player character it will have the cameras okay of the TPS the TPS of uh and the FPS so make sure that when it is an AI controlled you can in my case if you have followed the previous series if you remember we have used it here okay if it is a play controlled so through and we we will go on with the logic but if it is false we will need to let me see actually I have not set uh I have not deactivated the cameras when it is AI controlled so I will do it with you I will drag my two cameras here and they activate them one by one like this so when it's after even begin play uh we will check if it is play controlled false we are going to deactivate the two Comm okay also guys you need in order to properly deactivate the cameras and especially in the case of the SC capter components 2D we will need to use the set hidden in game because in the case of the S capter component it will not work and this is exactly what I have done for the ads and see here I am hiding the syn after component of my uh weapon blueprint here because they activated the the activating the activating get sorry uh alone will will not uh work so here after the begin play I will set hien in game through camera new hide new hidden and use accessory deactivate nodes okay guys so guys it was pretty much everything for this video I hope you enjoy stay tuned uh for this new optimizing series and see you next video
Info
Channel: Unreal Dystopia
Views: 108
Rating: undefined out of 5
Keywords: Unreal Engine Optimization: Using Multiple Cameras in Unreal Engine is killing your game performance, unreal engine performance optimization, unreal engine 4, ue4, tutorial, performance, optimization, gpu, optimisation, fps, increase, lag, unreal engine 5 game optimization, unreal engine mobile optimization, how to make unreal engine not lag, unreal engine camera optimization, rendering optimization in unreal engine, unreal engine 5, scene capture component 2d, ue5
Id: ekxRz7nmmTs
Channel Id: undefined
Length: 5min 37sec (337 seconds)
Published: Thu Feb 08 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.