Optimization For Beginners In Unreal Engine 5

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey devs and designers how you doing today I'm going to give you some useful tips for optimization in Unreal Engine 5. if you're ready let's dive into it okay so the first tip I will give you is going to be about materials textures and meshes itself so for example I just downloaded this asset from the qixel Bridge star and as you can see this mesh has more than 14 000 triangle and 9000 vertical so what can you do about it you should always care about the triangles and vertices of the meshes if it is too high maybe you can think about using nanite so it is kind of working like a auto LOD system but it's more advanced than I think if you have so complex meshes with high triangles nanite is working pretty great but if you don't want to use nanite so what you can do if you model any mesh yourself you must sure that you have lods in here as you can see there's some LOD settings LOD picker from the static mesh and I can change the LRT to Auto 0 1 2 3 and 4. this is based on allergy means level of details so which means when you're getting far from the object it is changing the LOD of the meshes so when you get closer it is giving you more detailed edges textures and shape but when you're going far it is changing the object based on where the player camera is for example right now we have 14 000 triangle but when I go to lot 0 to loot 3 as you can see it's became 1800. you definitely think about using this because actually lots of performance problems is all about the light systems meshes textures and materials that you're using in your scene so let's move to the texture side as you can see I can see some textures belongs to this model so let's check the this texture for example and as you can see in Dimensions is 4096 to 4096 and disk size is 88 megabyte which is a pretty big size for texture so based on your game you don't have to use that much bigger Textures in everything so when you're importing any assets from the stores if you do it in blender or doesn't matter you need to always be sure that your texture sizes and wrangles and vertices of the mesh I'm moving back to the scene so what can we do else I put the statue in here in the LOD settings in here you can force LOD model to for example always working in zero which is the highest detail or I can just go to free it doesn't affect so much in this model because it's a standard mesh but if you made your own lods in blender or Maya you can just adjust how it will look from far or close so you can optimize your meshes a bit with this way but there's also one thing that I like so much which is a culling is a great tool that you can use in your scenes and as I said most of games are using this how does it works it is basically rendering objects based on how far a player from the object and also where is the camera looking at how we can set this how I'm going to do I'm just going to go to place actors in here and I'm just going to tip dual distance volume add this into the scene I'm not changing the scale I'm changing the brush settings I'm going to make 500 500 500. as you can see we have a cooling distance volume like that so what I'm going to do I'm just going to go to cool distance value mean here there's two index here so for the index 0 I'm just going to make it 1000 and 600 I'm coming here and pressing G look it is not rendering anymore after some distance most of games are using this because if player doesn't have to see something in the scene for example something in players back or or if player is far enough not to see that you don't have to render this anymore you can use LOD this cooling distance together so you can have better performance in your scene especially if you have so many things in your scene like so many objects you definitely will call distance volumes so with this way you don't have to render everything in every time even player not seeing it you can change this index actually you can add some index to for example let's make this 400 after some distance it is not rendering some things anymore but for example can I I can go to here and make it like a thousand I need to go so it is still rendering because this is based on the call distance you don't have to use exactly cool distance volume in here you can just call for example this object is not in the cool distance I'm just gonna press G again because it's the game mode this object not inside of this call distance volume I think so I'm just going to replace this in here so you can go to LOD settings again and in here there is minimum Drop Distance and desired Max drawing distance so let's make it like 700. I'm just going to press G again but as you can see even I'm not using cool distance volume it is still not rendering after some distance you always can use this LED settings uh you can change your LED models based on distance from the object and you can also use cool distance volume to not render some objects when player not sync so let's move to the next step don't use over post process volume but process is one of the main reasons that why your scene is slow and why it's not working so fast so it's okay of course you can use post process while in manure games but if you tweak some so much settings in the scene you're changing Bloom exposure some color grading settings it is can take a bit more performance than usual so if you're going to use post-process settings always make sure that is it necessary or not I'm not talking about the global elimination and lighting system right now yet which is I'm going to talk about in this video so make sure you following and watching until the end but for example if you're going to use post process and let's say you want to change something like it is too bright or it is too colorful or you want to change a color and stuff instead of using post process settings maybe you can use your directional lights Skylight or something for example if you want to change the temperature maybe it's better to use temperature in the directional light settings instead of just going to post process volume and going to color grading temperature or like those values I'm not suggesting to use post process all the time but of course sometimes it's necessary but always make sure that you is it necessary or not always check your engine scalability material quality and preview rendering level for example right now I'm using epic quality settings as an engine scalability but for example when I go to cinematic the FPS will withdrop until 50 but when I'm going back to Epic again as you see it is going more than 100. so actually you don't have to use everything in Max in a Matic level because for example there's some stuff in here that you don't have to using epic or cinematic settings for example paste on the player's computer you can change the wave distance and the analyzing post-processing shadows and other more so for example I'm not using foliage in here right now so I'm just going to flow shading I think high is okay textures medium is okay Reflections there's some Reflections in the chairs but still I'm going to go to High Global illumination epic is okay Shadows are I for example when I go low it is being so bad sometimes High is enough post processing high internalizing high and view distance far now it set itself to 120 which is because of the Visage but it is more similar and it's taking less performance than usual the next step is if you're going to use same meshes in multiple times in your scene you need to always be sure that you're using material instances is instead of materials why let me show you for example I have this model as I showed you before and I'm just going to copy the three times but I want to change their color a bit so what I'm going to do as I as you see it is using a material instance static mesh using material instance which is it is not the actual material there's also some master Matrix so let's find the master material I'm going to material instance and in here I'm just scrolling down and there's a parent which is the default material I'm just going to go here and create a material instance two folder change the base specular just five roughness one or maybe I'm going albeit The Tint and that I'm coming this I just changed the material but as a like drove call and general performance I'm not making another material and I'm just not doing copy paste of this material instead of that I'm creating instance from this master method and I'm using that it is a better way to keep your performance in your scene especially if you're working same objects same kind of objects in the same scene so always be sure you're using material instances instead of just multiple materials for the same meshes the other tip I will give you that if you're using some objects that it will they will never move if you're static maybe you can turn them into just one static mesh instead of little pieces so what I mean by that sometimes if you downloaded any asset from the web or if you made it yourself sometimes they're being like piece by piece and you need to uh collect them in a just one blueprint so what I'm talking about let me show you I'm just going to create a blueprint class say a real one get inside of that what I'm going to do I'm just a cube here on Mark Cube so I made something like that what we have in here we have five difference cube in the same blueprint when I put this into the scene here is enterocol behavior it will try to render all of those separately even they are the same object with using same material they are still using same material which is good but if this is not going to move and if we want to have a better performance for that what we can do we so what I'm going to do I'm just going to click this blueprint as you see it's a blueprint with a couple of Cubes inside I'm just go to actor and convert tutorial one to static mesh okay in the contents mesh or okay so we made it there's a new static machine here or we can replace that I'm just click this replace selected actors fit this as you see it is just in one static mesh the next tip I will give you is don't use animator or SQL answer for everything for example you want a little flickering in your light so what can you do you can just create a level sequencer and you can add your for example I add Spotlight in here and you can just animate it based on the time you want and you can make it Loop but instead of that what you can use you can create a light function for it I'm going to come here as you see there's a light function material you can just create a basically a normal like material from here just go here and create a material after that let's go I just created one for example what did I do I just go here and change the material domain is a light function and I just made a silly light animation like that like it's flickering save it going back to scene again and in here I'm just light function light function material in spotlight and as you can see it is working pretty good it is not a great ring animation function but still I think it's better than using animator and sequencer always in the scene so let's say you made a scene and it is not working so fast and you don't know what is the problem in your scene like what is the taking so much performance so what we can do about it we can just start off CPU visualizer so I'm just going to go to command console you and then here as you can see there is a visor and when I checked what is taking so much performance as you see I'm spending so much on post processing lights and diffuse indirect and bit occlusion I'm here let's see what is taking so much time lumensin gather there's also so much think that taking performance by scene so you can use this CPU visualizer to understand what is taking from your performance your scene lights for dark lightning for example let's check it when I delete this light save it and I'm just going to delay it my directional go and let's do again as you see now lumens in lightning taking so less performance of course I deleted all scenes all lights in the scene but for you to understand you can see what is taking so much performance your scene with using CPU visualize the texture streaming which is I'm highly recommend if you have so many things in your scene again you should use texture streaming for better performance so how you're going to do that go to file go to edit and project settings in here type texture streaming for example extra stream and it says One enable textures will stream in based on what is visible on the screen it is just kind of working like LED ish with textures so it is changing the textures resolution and stuff based on the distance I'm not exactly sure how it is working but I think it's a so great for performance and if you have so many objects in your scene and let's say you're making an open world game or a game that you're flying and stuff you always make sure that your texture streaming is enabled for my opinion I also mentioned about something it's about anti-alizing methods so right now I'm just going to go edit project settings and I'm just going to type NT analyzing method so in default settings as you see I'm using temporal anti-alizing it's normally I think it's TSR which is temporal super resolution and TSR is taking more performance even it is giving uh more accurate and better image on the screen but if there is a when you check CPU visualizer and if you take the ntlizing method taking so much performance maybe you can think about changing your internalizing method from TSR to temporal entailizing I think it's affecting a bit of the performance so you can try and it if it works for you you can think about to use it okay guys so I made a video about some optimization and performance tips for your games if you like it please like the video and subscribe to the channel I'm thinking of making this video again as a second part which is I'm going to talk about only blueprint and coding so how you can optimize your code and blueprint files if you want to see this video please write a comment down below also if you have any video idea you can write down below I'm reading all of the your messages and I'm trying to replant them back so last time if you liked the video please like And subscribe until the next video see you all I hope you all doing great works foreign [Music]
Info
Channel: MeteDev
Views: 17,044
Rating: undefined out of 5
Keywords: unreal engine, unreal engine 5, ue5 optimization, unreal engine 5 tutorial, unreal engine 5 optimization tutorial, unreal engine 5.3 tutorial, unreal engine materials, game development, optimization tutorial for ue5, unreal engine 5.3, ue5 tutorial, unreal engine 5.2, unreal engine performance, ue5 performance tutorial, how to increase fps in unreal engine 5, unreal engine beginner, ue5 beginner game tutorial
Id: Ipn0sDcdc_4
Channel Id: undefined
Length: 21min 12sec (1272 seconds)
Published: Thu Sep 28 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.