UE5 Mobile Game Optimization in Unreal Engine 5 | Professional Mobile Game Development in UE5 2022

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys welcome back in guru varity and in this we are going to optimize our unreal engine 5 game for mobile so recently i just updated the map as you can see it's pretty enough looking good for a mobile game but the problem is when i publish this game in google play blaster it's giving super lag like yeah user facing super lag because there's tons of stuff like there's a if i show you the foliage as you can see there's a 256 wow that is super uh so so much foliage and there's also super quality textures and also the problem is there's tons of not tons of but there are many of animals as you can see there's some reindeer and there's maybe have some elephants yup we have some elephants and we have also some maybe zebra in this site uh maybe on this side maybe yeah there's a zebras so yeah there's a pretty much lots of stuff so the problem is now for facing this thing uh the user basically facing super lag so now we need to optimize so now let's learn for now if i show you like if i show you at here that is state state unit so as you can see that correctly frame rate is super low that is only 23 fps that is super low like just think guys in my pc it's coming 24 fps so how in the mobile it's come good also we can check with uh as you can see it's already showing that by default how many gpu it's using drop calls and everything so first of all we need to understand that what is why is the problem so we will go to optimization view mode let's first set it to light and complexity so yeah that's here there's a you know that is in a blue so yeah however now let's translate this into uh density so as you can see now why is the basically the green it's been that yeah it's good there's no problem but why is it basically the blue there's some problem our issue so as you can see the in this black because that is using nanite and the third as you can see this is using blue so we need to optimize the scene okay basically our world also we need to optimize that so others it's totally good as you can see the reindeers is also good uh and but there's some foliage that is some bad so you need to optimize them okay that is uh for light and density okay now let's go to uh the complexity as as you can see that how much foliage problem here okay like super fully let's go to shadow complexity and quartz so you can see that basically what is a super problem so there's tons of foliage so for the foliage there's a basically the scene becomes super laggy and other stuff okay then let's go to only a quartz draw so we can see some difference okay so from here as you can see the nanite is not visibling the problem is on the trees and the foliage as you can see it's super bad so we need to optimize our foliage and other soup is pretty much enough good the animal is also pretty much good not so much bad okay so now we understand that what is the problem let's go to overview of nanite visualization so as you can see that in the full scenes only the nanite using by are the there okay so first of all what you do we need to for enabling nanite we all we all know that for we just can be you know first of all just go and search that why is the object and enable the nanoscience work okay i accept that but the problem is with that nanite there's a problem that the niner when you build the lights the nanite using the virtual shadow mapping so you need to enable that so go to edit then go to project settings and here you need to search that vir virtual virtual and here if you just scroll down here you find the mobile support so you need to enable the virtual texture supports and enable retrieval support for mobile and make sure anywhere virtual texture light map okay so that's all and it will automatically become shadow to virtual shadow map beta okay and auto virtual texture size uh that's 4096 that is pretty much enough good but yeah it's okay now we need to give a restart our project okay so make sure once you give the restart the first problem is come that there's a now compile tons of shaders okay like yeah there's a now compile lots of lots lots of shader so you need to understand that so okay now it should be compiled the virtual shader so as you can see it start compiling now it's compiling in my case it's i have a good pc like i have intel i9 to 32 gb time so it's now enough uh good but for a light building i need a rtx also okay so i bet i don't have the rtx i have no idea at any 60 maybe uh or it's a it's not rtx it's to have only 6gb ram extreme gaming so limited edition i have but the problem is that i don't have rtx but for light building and others you know i had high performance uh for light build or rages i needed rtx so i tried to buy artix but for now it's not possible because i have some money shortage so i need to first buy that then maybe i can do some better light build and maybe more fast so as you can see that it's now building this uh it's basically shader compiling so let me give the compiling shader then after all the shader compile i'll be show you okay guys so you can see that now is fbs is 41 some time ago it's only coming 20 to 30 fps now it's coming 40 so this is good because we are enable virtual texture because the virtual texture if you are using nanite for mobile you should be use the virtual texture and once we build the lights we will get more better result okay now uh what you need to do is basically uh we we need to as you can see that if you go to large and complexity as distance we can see uh that this is some assets using super high okay as you can see that's a super high so we need to fix them so just go to foliage first of all and let's see that which foliage it's using this one so then we need to find out that foliage so for our case this one using okay let's see the rhc using any lods or something like that so you can see that it's not using any leds or something like that so there's some problem okay so what should we do first of all go to triangles and any okay so will we can 50 by 50 then apply change okay now we have some unless uh you know then let's go to customs and we need to uh make sure that we need to for now we need to set it to a small pops or a larger pop you can select so click on yes and now go to custom lod so at here will be remove the led number three so just select the all of one so only remove the lod numbers uh three and now select the led number two and will be sit there at only the five percent of leds and then let's go to led once at here will we give only 30 percent of led apply and then we'll go to led 0 and at here will be set only that is uh not 40 more than 45 percent and then will visit customers to auto leds okay so that is the correct current uh super good okay like it's have now less triangles as you can see if you go long distance it will automatically increase the foliage now click on saved okay so now we get will be get some more better results okay then uh we need to fix this uh assets uh the text or the material okay so as you can see for example it's using this material okay this is the basically the grass material so we need to there's basically the grass uh material so what you need to do first of all we need to create our own custom material so just create a create a material and set it to a i 2 and double click and open okay we have now this one and let's remove this grass and everything we have only these ones and this also we need to make sure that we will open our this by default one so from here we can basically change the colors and other stuff but for now i'll only use this one so okay so it's uh looking good but we need to also use the opacity so because this is a transparent asset so click on that and that opacity so it should be work and now let's try these materials first of all in our this grass section so that how it's working i'm pretty sure that it's not it's not should be work great uh okay it's uh doing but it's needs some color yeah we it's it's totally needs some color so we'll go over here this uh then copy this code and comment here basically this is a parameter with so it's which is multiplying with by float so we can basically adjust the color so saved okay it has be changed so as you can see it's also changed the color so we are getting now more good fps so now let's do white selecting i'm not sure that white select all this stuff not should be select okay let's click click on play let's see how much fps we are getting now as you can see we are now getting 42 fps that was enough impressive so then what you can do as you can see there's a foliage it's too much okay that as you can see we can see in a long distance too so for fixing this stuff we will go to foliage and then will be select all the trees and go to basically the light map and resolution and will be first of all change the light resolution to 1 in 28 and even you can give the right resolution it uh it's also good and then we'll be select all the trees and select equal distance that is basically how much distance we want maximum so maximum let's give it to uh 5000 let's see it's good but we need some more so let's give it that 7 000 okay that's good 7 000 in which is great so we'll get now a good look and yeah it's good not bad and then let's select the same method for the grass for the grass we'll be setting the resolution only to four and then we'll be set the consistence of the maximum this grass is uh 3 000 so as you can see it's kind of like looking like an empty place like it's seriously like just think that you are playing the game and at that time uh you are basically as you can see it's our fps become high but uh as you can see that it's some kind of like a loading and loading and loading okay it's not great because uh we need to also customize our landscape too for fixing this issue like we need to blend the foliage with our landscape do the same thing for our folly uh the grass too same the four and set the maximum for this one so we prefer uh 1500 not more than so we don't need more than like this it's uh quite enough good okay so we are we already fixed our fall is super so as a result as you can see that we are getting now 53 fps even once the light will be baked will we get 60 fps that was good and then we want one more thing uh we need to basically update our land escape material so just double click and open and now with this ones will be basically go to our this uh color code and copy this one that what is the basically the value you can use your own value just paste it like this thing and now for the rgb will be basically simply multiply with this one and connect it with this thing so here we will be great now i will be given again we'll basically found the basically the same color how our foliage is looking so simply compile and save okay i think it's done so as you can see now it's blending totally good okay so now the grass are not look super bad or even we can make our this resolution more lower so but we'll be get a better result as you can see it's now basically imagine this thing that was pretty much enough good so you can basic if you want you can reject that uh some more if you want depends on yourself but i'm saying that it's quite a good not so much bad okay now we can basically change the resolution of the texture so it will be we can get a more better result okay so now we'll be go to our basically textures that which is using this ones double click and open and for this ones um it's using this so this is let's see that how much is it as you can see the texture uh there is a 10 24 so what will be do ah for i select all the trees okay all the trees and the assets i'm setting them all in only 128 that is super low but it will be uh make sure that it will be affect our scene but it will also give us the performance good more good okay if there's anything we need to upgrade uh make it some more high quality we can give so there's no problem so as you can see it is not looking so much great from the close but when we go in a play mode and we can see the trees it's uh not so much bad even everything is good okay then yeah it's pretty much enough good right now at here i'm getting i will get some better isolation and everything and yeah that is now pretty much enough looking great not so much if you want you can change the colors also of this one so it will be uh you know you can make some lighter ones if you want and then what you can update more what you think guys so third we can update our basically the landscape lag we can basically make it some more lower that it can be usable like we can basically go to this uh basically the landscape mode and we can put a smooth section and make our this thing sound bigger and make some smoother so there's less triangles if there's a less triangles it's mean that we get some more better result okay so because there's a less triangle so less triangles means we are the shaders will be the triangles will become low and the draw call will become low so everything will be get a better result okay if we if we can if we if we you know just need to just do some optimization nothing else okay now it's pretty much enough good there's a ton of foliage at here like yeah the super foliage and then i think this is now playable for our map basically i hope so uh let's also see the texture resolution of this uh the massive this one so as you can see that is a 4080 that is super but for a mobile game i don't prefer that it should be it any you know that is super so what i do basically i just select them all and action look at it go to compress mode set it to 1024 and save them all okay then what i do i will search the same method for all of one so like which one using the same okay so okay now that is attenuate24 we already set up that's good uh we maybe need for this ones too so go to action work edit set it to 10824 it will be deduct our game size also so we need to keep it mind and then go to saved all so if you have more different types of like rocks or other stuff so you can check them too okay and i'm saying my elephant is great so there's no problem issue for elephant that's good uh we can basically do some here okay like our player can be you know just play around some here so we can make it some smoother okay i think this is now some playable like our player can be cool there it's not look like a you know unbelievable it should be believable that our player can be reached that point basically um i'm saying that it's not pretty enough good guys what you think it's a pretend i'm good or not so i'm not sure that why these foliage is now selecting automatically so let's giving time saved all seriously guys i don't know so let's give it a try right now we need to just build the light so as you can see the 30 to 40 fps is coming but it's great from 20 we are updated 30 to 40 so when we build the lights and other stuff i think we will get some more fps you can basically change this once too and also you can do one more thing you can paste a command line that r dot uh streaming s t r e a streaming then poll size uh that is there's a full size then you can set it to full size dot 2 000 you can give it 2 000 to 3 000 so i'm giving it 2 000 so it will be basically to some optimization okay so everything is now pretty much enough good at here so guys that's all for our game on mobile optimization i hope you understand thank you so much for watching us love you all and see you in next video so yeah bye-bye see you next video
Info
Channel: Tec Dev Studio
Views: 12,451
Rating: undefined out of 5
Keywords: ue5, Unreal Engine, Unreal Engine 5, Unreal Engine 5 Optimization, Optimization UE5 Game, Game Optimization UE5 Mobile Game
Id: BL2zHmVSIAA
Channel Id: undefined
Length: 19min 24sec (1164 seconds)
Published: Sun Jan 16 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.