Target 60fps Unity URP Performance Optimisation & Analysis for mobile devices

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
foreign [Music] how many of you guys are programmers okay the whole room I have to ask the other one okay uh I'm assuming everyone is unity okay okay uh okay another question is how many of you guys have worked for more than five years on Unity second okay that's a lot of audience okay awesome uh how many of you guys are making games for low end Android handsets everyone that's good so that's the India audience primarily what you're talking about so uh so the talk as it says it's it's targeting 60 FPS but primarily it's on urp and how many of you guys use Erp oh yeah okay very nice that's a lot of good audience so understanding what uh 60 FPS is it's all on Computing time right uh you have to figure out from your profiling now Unity has used your profiler an immunity very good so good so uh just starting from the profiling data itself it's all about where your compute time is and uh 60 FPS is basically 16 milliseconds anything lower than that around that great uh for extremely low end handsets you're looking close to 30 milliseconds if you can get in if you get 30 milliseconds you're good and always as a question is is your performance is it CPU bound or is it GPU Bond and that's that's the first mistake take usually most developers including me we do we have to figure out whenever you're stuck say at some there's some throttling happening at some spot in your game is it CPU bound or GPU bound and that everything relates to a single parameter is you look at the profile data and you look where the performance is getting eaten up okay you plug in through your you figure out from a GPU you figure out from a CPU time you look through all of that stuff you look with the physics is taking in whether it's animation taking in is it a particle effect a lot of things across Unity uh which would cause the throttling effect what's there and today's talk is going to cover little bit on uh areas on specific to urp and where say from the low end to the high end where you will see uh different bottlenecks and how we address them in some of our projects over the years and since we migrated urp maybe we migrate to Europe about last year we uh so some of our projects from the last two years have been on urp so this is more about our knowledge and figuring out where uh you know where we have experienced issues and and every LTS version not to say everyone I'm assuming have used and every LTS version is buggy in unity uh you there is no longer LTS right you're you're looking through your writing on forums to figure out hey which version is the least buggy uh is my particle system throttling in this or is my animation you know breaking on that you're looking through that right we use the last meaning I would say the most happy version for us is 2021 3.9 F1 and it's a specific number uh where we have found like you know it's it's the least buggy in terms of say loading times we had loading issues on uh some of the earlier versions the latest version just breaks everything uh we use addressables we use everything and we have a lot of game objects we have in our scene close to about almost two lakh game objects in our scene uh and it's all been called it's it's a huge hierarchy we do occlusion onto it uh this is a lot of stuff on it but we realized like uh some uh some of these versions are extremely slow on loading as well and while loading helps with performance I'll come to that as well when we talk about but yes main thing in mind profile look at your milliseconds and look whether it's CPU or GPU bound that's a one major thing uh now with urp the new pipeline is you have to use a renderable pipeline asset and how we address it is we use different uh pipeline assets for different devices and for different configurations as well so we so when we start the game we instantly analyze we run a small check we see how many milliseconds are we getting uh or everything is happening behind the loading screen as well we know we check uh how many on a blank screen we are getting in we take that we take and there's an intelligence built we look at uh the ram the process the course we look at Android version we look at the chipset we look at What compression does it support with that we are able to create kind of a matrix on where this devices and then we break it up into uh more or less like six buckets uh starting from a very very low end and it keeps going up till the ultra till the highest end so we kind of of break this down everything happens just before the game starts and then depending on that we assign different pipeline assets uh so what is it that uh as everyone knows under urp it comes with default uh as the rendering pipeline assets never use the default go towards it and configure it the first step when you start off with the project is go go at it create multiple pipeline assets with different settings and configure the first that's the first thing you should do for the project because that's where your first set of performance starts in on an empty projects set that part now what does it have uh one is controls your quality uh on the assets so you can Define different things onto it including your asset loading time at the last part if you can see there is an async asset upload uh where you can look from your if you have lot of game objects sort of heavy uh scenery built in uh if you haven't you can that will help if there's a throttling happening on that whether you'll require more than say uh there's a there's a 20 millisecond buffer what it creates uh onto every chunk when it's loading the data and so if you want to increase that the default is set at 16 you can increase it to 32 it will help you in Faster loading as well so you'll have to look you'll have to look at the profiling and see hey for the low end I will need a bigger buffer or a smaller buffer depending on your game objects as well in terms of loading it any others you have to configure that data the profile will tell you all of the data just look at there is an asset loading uh ah profiler just look at that and you can understand where the loading takes place but apart from that from a rendering point of view right from uh say do you have to use different what's your Shadow is going to be uh do you uh look at what your materials is what your other stuff on the parameter stuff it's a pretty straightforward on what we use and we like for the higher end and all the stuff we force obviously anistopic filtering uh is a lot of anti-lacing and all of that stuff and everything is configurable on this and according to it we load different types of assets we call up a different addressable asset and we load in depending on the different configuration uh side of it so yes this again can be set up again we do it on the loading and we change it during the setting uh we have a setting section also inside the game so during then whenever you change it it completely changes your pipeline asset uh for the low end and for the very low we reduce we use half rest on the texture size as well and so it kind of helps you with the texture memory on the whole per se and speaking about texture which I'll cover later is something you have to figure out is how how does a low end handset specifically extreme low and Android handset what chip does it have to allow you to use compressed textures most of the advanced chipsets nowadays uh right let it be a DM and from the Qualcomm team over here in they're better at storing compressed Textures in memory and it decompress it it stores them there's a texture area and it uses at a buffer it's real time decompressing using uh it need a buffer and putting it back in but that only happens on certain chipsets uh Qualcomm including one of them there are other chipsets which does it but some of them just don't support there will be a lot of throttling on say the low and extreme low and Android and set specifically they will it's better to keep them on compressed and loaded and memory so it's very fast and all of this is critical because when your game is running you really don't want a single uh stop in frame rate right now what we the recent we we launched a recent game right now on the Ramsay the movie he did an endless Runner and endless Runner is I would say it's very close to even an FPS game because it's all on performance if you don't if it starts there are hiccups during the game and stuff like that people just hate it uh it needs to be smooth it needs to be uh fast consistent and the worst is the heating okay it shouldn't heat people play endless Runners like our average people who play in they play for almost 15 minutes in a single session okay so your game needs to run 50 minutes without heating at all and in each round and 60 FPS so that's the challenge in terms of where uh you where your decision on whether it needs to be a compressed texture does it need to be uncompressed what do you decide before you loading load up the game these are the different things what you will take up and it will cover uh more ahead as well uh one critical thing on default the pixel lighting is on uh per pixel lighting again in the renderable asset you can set it uh so what we do is on the low end and the so so perpixel lighting is the most beautiful way of rendering right you look at how the shading happens uh on on the character or on the environment how the light affects the entire beautiful gradient or the phone shading uh how it appears uh all of those are all the beautiness of for Pixel shading right and but it's really expensive for very low end devices so first things is what we do is we push everything to vertex lighting okay on the very low lighting uh so there will be a the problem with pushing to the performance gains on vertex lighting is massive but it's immediately your entire scene which is set by the artist it looks really bad okay uh all the lighting what you imagine to set the scene and it's worse when you have baked it as well uh so you're going to have these challenges again it's all part of the pre-production phase when you set up your project and you have to sit with the artist and figure out look I need to set up uh only vertex lighting I need to set up so let's first optimize for vertex lighting let's figure out you start off from the ground up you look how your scene uh looks up for vertex lighting and then that will ensure like for the very low end and sets it's been taken care of and specifically for very low uh Android handsets right you have to make sure one vertex lighting is uh enabled for them that's what we do on a pipeline asset additional lights now additional lights again uh we usually set for the medium configuration we set it at vertex we additional lights are always vertex for us uh we don't do perpixel for only for the high very high and Ultra it's always at the beautiness of per pixel Lighting on all our lights and we support close to about three lights maximum uh all are directional no nothing else and all are directional all are real time uh we didn't bake anything for our requirement right now because uh on an endless Runner you are kind of moving the asset and we wanted to change uh provide different lighting and effect because there are a lot of cinematic scenes we wanted everything to be real time uh so all our high end and all of the stuff everything is on the real-time Lighting in but important thing from the low end again is switch on Vortex lighting that's the key on the main part the shadow now if we'll talk on next on the shadow part but the shadow resolution is critical now and uh the high what we realized from high to ultra it can most chipsets can take a 4K texture okay it's uh that's what our data tells us is like any anywhere from so we any any fourteen thousand fifteen thousand rupee handset uh you've taken all the plethora offenses nowadays most is purchase is 14 15 000 answers so you have two buckets how I look at it the very low ones are usually the eight and a half cancer the sub hundred dollar handset uh which will run Android 11 out of the box uh it will have maybe a 2GB RAM and uh it starts with a 32 GB storage okay and these are your really popular handsets right from manufacturers like infinix and redmi uh the 9 or 10 series they all are eight and a half K handsets and they're really popular meaning they have more than one lakh ratings on Flipkart uh and they're all four and a half Stars uh so the thing is all of these answers is what India the mass grassroot level uh Gamers they play so for for them and all of the those handsets will support vertex lighting brilliantly okay and they will support some of them as good they have good chipsets built in a lot of the mediatek uh but they will support say 4K textures on their shadows in AdWords so but for us what we do is if it's a particular ramp to be on the safer side we make sure like if it's a 2GB handset and on a multiple configuration we check we usually push them towards medium uh medium or low we don't take the risk of pushing it too high uh that's something we should do but main is it supports a 4K uh shadowing resolution which will help us when addressing Shadows now Shadows is uh the main thing about Shadows it makes a game look nice how many of you guys use real-time shadows in your game yeah it is less uh and stuff how many of you then I'm assuming everyone is using baked yeah okay so yeah so that's that's something uh or maybe uh uh or light probes is more or less uh so for Shadows one main thing is the good thing about real-time Shadows is on urp specifically with the urp pipeline uh the the Shadows work really well from The Medium to the high-end settings okay and you'll be surprised they'll work on really low end handsets as well they it performs it's it's great for performance it looks nice and it's not that expensive as well if you follow some basic steps on setting up your uh on your shadows so one major thing is you your max distance what is there on a quality settings right default it's set as 50 okay which is good now depending on your game if it's a fighting game or you can even get it down to maybe 20 or maybe 30 isometric game can get it down lower as well depends on how far your camera is with regards to what you're rendering okay and the closer it is the Lesser distance you can set and when the lesson is instead it's nothing but your resolution of the Shadows is it becomes more accurate it's less pixelated it looks clean okay and it's all depending on where your camera is positioned with what fov obviously uh but how it's closer to your subject okay so it depends on that and 50 is a good number because ultimately what is Shadow Shadows is nothing but a big depending on the depth it just creates a big two-dimensional image right it's processing all of the data it's putting in a big map and it's generating that map from the low to the high right from uh the depth as you say from the depth buffer what it's going to use that so the more closer the better so if there's a character which is near to the camera you want that very nice silhouette on the Shadows just make sure 50 is a good number uh and if the 4K resolution but the second most important thing if you have a large scenery and you want say a shadow to a particular distance then the cascading helps and cascading is again you have to now cascading again helps in creating different Shadow maps for different distances it it calculates it in in that way to we usually for our high to very high settings we use three uh on the shadowing map there's not much difference between three and four but three is a Max 3 gives you a good result because three we make sure like when the character is standing the nearby area the plants the rocks and the the character they get all the beautiful high resolution texture and remember most of your screen is a of our Target our Target is mobile devices so we don't do PC uh so this all of this setup works great for a Mobile screen right which is small so ultimately when you look at the screen it's this small okay so and the maximum uh the if your character is really close then the your character and the nearby scenery is almost 50 percent of your entire screen area Okay so the first Cascade what you get uh should be configured give you give give them the largest screen space okay so give them like hey in the texture map what's there in give it more area then the middle line if you want is a vast level scene then you give the next uh account next Cascade account you assign it little bit more area little bit more uh texture area and all this is configured by every Cascade you can configure those values play around ask your artist to look at it uh and to see and you can adjust uh you can cover a very large uh distance Shadows okay for a whole scenery on real time and it works brilliantly so again we configure all of this for different handsets so for we from a medium high very high Ultra and everything which fiddle around with this we figure on what uh a lot of them are OLED screens nowadays so they look more and more crisper even the second batch looks nicer when the third batch looks nicer so you'll have to like fiddle around what setting uh you can but this we spend a lot of area on making sure that the Shadow from a Cascade count is set up properly or not uh for the extreme low hand sets we switch it off there is no real time at all uh because Shadows on real time is a good wish to ask for but you're never going to get it and so we have to make sure like for our extremely low end uh stuff we completely switch it off we use blob Shadows but we also do one process on the environment we do complete fake Shadows on other environment the artist will hate it because we have we take a tree we take a rock and we place artificial Shadows beneath the surface all the contact Shadows are all built manually from the uh uh from the program from the artist side a lot of them are prefab so we make sure like any Rock any tree everything is placed in it automatically uh places a shadow beneath that as a contact object in but you have but that's a manual process and that's something which you have to do to get to please put in Shadows but make sure like for the low end you have to do a manual work onto it that's what what we do from from the next part is now coming from the Shadows to the actual lights so when you're when you're configuring a scenery uh uh you have to have multiple layers okay on your scenery you have to decide which objects need to Cache because if you're using real-time Shadows which objects have to uh cast Shadows which of them shouldn't uh do you want trees to put in do you want the player the enemies the obstacles the far-off mountains do they have to uh you know cast Shadows or not you know all of these things you have to configure it now we have meaning we have close to 2 lakh objects uh 200k objects in a scene so we have to be really critical to figure out which which objects can cast Shadows which objects shouldn't but it we have to be like very clear like most in our all or two lakh objects most of those objects do cast Shadows it's not like they don't uh but you have to be little clear like which are the ones which are casting it you have to decide which will take a larger map as well because if it's a it depends on the light direction as well right if a light Direction is is almost towards an evening light setting and it's going to cost you these Long Shadows and Long Shadows avoid them is what I would say because Long Shadows will cost you those aliasing effect and so if you have a long Tower casting a long Shadow and if it's near then it's great but it's far it's going to look extremely pixelated in our walking distance so avoid maximum long Shadow light Direction so you can meaning kind of negotiate with the artist here let's put it in an afternoon setting it'll help me the game look better uh but that's something which is important from uh art perspective as well but what we also do is we we group one very important thing for doing a player Shadow is we group the ground and the character together so that's something which we don't so they are on us we've cast our shadow lights only on the ground surface and the character and anything on it so this this helps us to cast the real time because the shadow has to fall on the ground right uh we don't cast Shadows on the nearby rock or on the tree the the player Shadow we avoid that uh but we make sure like it's only on the ground and it's only on the on the character so that's a separate layer and then the characters have different light settings anyways the our characters have three lights uh all from different directions serving a different purpose to get the shading that is uh there are there's a leather objects there are different there's a metal object so we we try to like make sure like there are multiple sites so highlight those different props on the body as well uh but a characters usually have about the three lights and the entire environment we have two lights uh the reason of doing that is on a single light the issue with uh on specifically on medium handsets right uh we have noticed like some of the times the Shader rendering on some of these handsets they're quite broken and they will make the objects appear very dark okay so you're going to see one side well lit and the other side is Extreme it's it's make sure like and they are non OLED screen so it's going to look even more darker on those handset the panels are bad some of those LCD panels so you have to make sure like some of them they are lit on the opposite direction as well so that they are lit up uh nicely but we make sure the two environments onto it but another thing of the light is important and not important not important is almost free lighting meaning you can apply not important lights on different scenarios colored lights anything it's it's almost like urp will beautifully handle a ticket care for you important when you want to show the metallic and all of those different surfaces you need all of those in important lights in and Shadow is obviously casted on on important lights and but not important helps you do check from your game what your game really requires if it doesn't require important light it's great because one is for sure it takes a lot of computation to calculate those Lighting in the first place and if you have a game which uh player is going to play say for a half an hour session or in our games like they play for more than half an hour session then not important light will help in your thermal throttling okay so make sure like if you really need those important lights to really showcase it look from the device because ultimately you play the game not like this you're playing it far away right so just look at it it'll help you from the heating issues if it's a not important setting but yes we do change again depending on the uh entire hierarchy low end all all a low end is all not important we don't is important at all so all a low end very low and they all are not important along with the your vertex lighting so coming to the uh the main uh I would say the dragon in the room this it's all about set pass calls uh uh so set first calls again Surplus calls is the most important parameter when you're looking at hey what's your how are all the game objects in your screen batched up okay and below 100 is a good number 50 is excellent and if you get 30 you can pat yourself on the back meaning you have achieved really a great result uh but main thing is to see is how do you how do you when you have so much of geometry on the scene how do you configure it to have the least set of calls a set pass calls and it's a difficult thing because it's a uh when we have multiple for us when multiple artists are working on a single scene you have to make sure like hey not two people cannot work on the same texturing right if one person is working on to it if he's working on a part of land uh part of scenery where he is configuring he knows hey you are in charge of say props and the surface uh on a section of the scene then he's working on he can optimize for the number of textures been used the number of materials been used you know he'll have control over it but ideally all of these things are going to help when you cover the texturing and the multi-materials part next you'll understand why we have to keep the Lesser materials and lesser number of textures okay it's better and everything boils down to set pass calls so keep it below optimize it use your frame debugger there's a tool frame debugger uh allows you to like understand on what's been used where are your set pass calls going what's occupying why these two are not batched together it's going to give a lot of cool data uh just have a look at it you'll be able to understand why these two objects are not rendering though they are using the same material but why they're not bashed together maybe one has Shadow enabled one has Shadow disabled okay so they're not going to get bashed together they'll be on a different processing different so under it'll give you that data it'll say like hey the the Shadow the lighting applied is different this is applied on a different direction light is applied to a different direction light again it will not batch it together so it'll take all of these things the frame debugger will tell you and then you can act up onto it uh triangle count is something uh which I think with urp and with generally with unity itself it'll most of these devices will handle a large amount of triangle count okay its triangle has never been an issue uh even in the older consoles or the older PC you can have a million triangles thrown at it it'll still render it uh if you just switch off all the lights just keep ambient light on it'll do it uh but what what when you're taking real-time lighting specifically 150k is a good number uh one two things it's going to do again from a heating perspective because for us thermal heating is extremely important the more uh it will be able to take say 300K 400k 500k triangles not an issue will say yeah I'm getting I'm getting 60 FPS even at a such a high uh triangle count but the the computation time from the GPU and DCP everything is going to take more it's going to take more Cycles everything is going to be more it will do all of those operations in within 16 milliseconds but it's going to take uh occupy take more of the juice right it's going to make more of the uh the buffers to work your buses are going to work more uh individual things so everything is going to be more percent that's why it's going to heat up so it's a fine balance 150k is a good number uh not cause heating issues much at all so that's a number to keep in the last lever is on your uh far distance right and the far distance again from the camera setting is keep it below 100 because that's a that's a good number for it the two things what it helps you in one is on the uh the shadowing depth accuracy also it's able to manage it better so you'll get lesser uh those of those lines jagged lines and stuff like that everything is nicer but the main is it is going to Cull all the objects uh in a large scenery right and that something is also critical when it comes to how many game objects have been rendered on your scene all of this data is you will notice it like over here is going to tell you how many uh draw call set pass calls have been used you just change those camera for keeping plane it will show you an instant uh report on how many set pass calls is it using it so what we usually do is for uh High to ultra we we have a large we have a hundred clipping plane distance for the low and a very low we keep it at 50. uh and we cover the rest of the area with fog so that's the UN fraud the pro that's that's like the artist is going to hate it for it but that's something which we'll have to do for the low end handsets anyways because one is they they don't take triangle counts uh easily they are expensive so so for a very and a very low end end you have to make sure it doesn't mean you don't have huge draw uh distances already covered this on on all the stuff the second most important maybe what apart from this is on the post processing right all all of our titles we use post processing so every the post process is default by off on okay for us for high end to the ultra post processing is is already enabled post processing with urp is where the magic is the urp is great at handling post processing okay thanks to the new pipeline it's able to handle it really well even to the medium handsets so from our media mindsets to the ultra instance everything has its post processing on so in a post processing we have all the different things you have color Corrections we have we have Bloom we have you know all the beautiness of it again depends on the artist what he likes the the art Direction needs to be but post processing is literally uh meaning as I say it's almost free and it gives you with the performance so do try it switch it on it will not cause you heat throttling issues if you follow the rest of the parameters 150k lesser materials I said every all of those parameters were followed it should work brilliantly uh and it's it's work so far for us on WE maintain different profiles now that's something which we do we have for every Graphics setting we have a different profile okay and depending on the scene on different shaders is running right from the water to the character to the lighting or all the different apart but we use different post processing profiles for one different areas in the screen but the second main thing is for every uh again device configuration wise we set up different profiles all having enable like Bloom is expensive maybe on uh some of the low end hand sets on from the medium and answered it might cause more heating issues on those so we enable disable create different profiles and we assign assign that to it uh on medium and low it's off we completely switch it off one is because it's not because you can't take it some of these answers take it but uh again as I said it's on the entire how the GPU architecture is how it's set up it's going to heat up you know our answer so we switch it off by default another main important lever is down sampling how many of you guys down sample your game okay very few okay do try it out there's a beautiful function called as set resolution okay it's it's also the you can also configure it via your DPI as well so this is an old trick right from the old uh right from the PC game era you don't have to render everything at 1080p you can take the same 1080p resolution and you can render it at 720p you'll not make out the difference very less and most consoles do it even today there are a lot of uh you know great uh console breakdown technical breakdowns as well so we do the same thing we take some of our high end to very high end as all at anywhere between 80 percent to 70 percent uh 70 is the least don't go below 70 down sampling so you can get a 1080 piece resolution to maybe 720 but don't go below than that it will start looking weird uh but on the ultra is on Native resolution so the devices with support it we render everything at Native but have those the simple function set resolution you can set it configure it on your quality settings inside your game give the user a chance to like hey go on Ultra put it native on the Lesser you can get it uh lower but down sample don't go below 70 is what I would say but the down sampling does two things for you one it will help you with again heat trottling okay when you're heating thermal it really helps okay making the rendering down sample to 70 percent will fix most of the heating issues on most of the use cases okay if it says GPU bound heavily okay so do keep that in mind down sample uh it's not a bad thing it'll look good but make sure like you configure it to give the user the opportunity to like uh change the setting inside your game as I said uh from the frame debug it's going to give you a different setup onto where each draw call is been broken up right and especially this you have to look at it from uh when you're using real-time Shadows when using real-time Shadows you look at a breakup you look it's going to tell you over there hey why this draw call cannot be batched up okay it's going to give you it's going to actually tell you trust it don't assume like it's it's not a and it doesn't make sense no I'm I did use the same texture Atlas for you know both these game objects I did use it but look at it study it more it'll tell you like hey you applied different lights to different uh you know objects so it's not going to batch it together okay so pay important you know pay importance to it that particular little area it'll help you uh to understand to reduce your set pass calls you'll be able to take good action towards it uh from a scenery culling point of view is is again as I said right one thing was on the far cryping plane of your camera but also what you need to see is how many things you need to render uh in a scene and the geometry is pretty uh us is a lot of lot of stuff which is happening in an area scene what's there and especially when you have a very detailed environment you as I said you layer each one you layer it according to what gets lighting and what gets not but the main key part is reduce your materials okay do not have excessive number of materials especially when you're working on a very large scene and you will address the materials part on the more number of materials is more number of set pass calls it's very it's very simple the number of materials increases in combination with your number of lights on the screen set pass cars is going to grow exponentially okay so first start off with less number of materials and then you are adding in more and more uh lights in our area from the materials point of view again it's on the Shader what you are applying okay on a game we use custom shaders as well as with inbuilt urp shaders by default whenever you assign a material on a game object it is set up to LIT uh Shader okay first thing you should do is disable it okay first thing you have to make sure start up with simple lid simple lit is the best performance on on these variety of handsets you're going to handle it again you don't need to unnecessarily calculate for uh you know check do a check for hey does this material have you know metal or in it or not or does it have you know all those different kind of lighting parameters what you need it's anyway going to go through all of those Shader batches if you're if I said hey if your light is important it's going to check whether it has shininess or not okay and if it's going to have so it's going to take on all of those things right simple lit will make sure one those those Shader uh stuff is completely Switched Off okay it's going to lose a very basic lighting see whether that works okay if your game really requires say a lit uh Shader switch that on but there's a huge performance difference between say a lit and a simple lit okay so start off with uh default simple lid you look through the game objects only thing what you required say a lit Shader you assign that else stay with simplelet for our games we use everything is as simple yet okay so right from it's not like it will not do uh shininess or the metal or all the other goodness for the artwork everything is there in simple it as well unless you really need it you should take to the next part but main is try to get as many different game objects in a single material so have an atlas the texture Atlas is a very common uh concept so use a single texture to have say all the put the props in a single texture again assigned it to a group of objects which will use a similar kind of lighting and shading put it in a single material you can then so that it occupies a single Shader as well you will get those exponential performance boost uh you know if you group it that way the must next important thing is texture compression uh how many of you guys use uh crunch compression okay LS so use it this is the single most uh thing on helping you reduce the file size okay and for an India market specifically if you want a lesser file size use enable crunch compression select all your textures use crunch compression set it at 50 percent uh of the results and switch off generate bitmaps okay this is the main parameters what you need to do okay you do this your almost your file size is going to go down by more than half okay uh if it's texture intensive but make sure uh like these are like basic start working with this see how the art feels if it's really bad then you uh increase it out but most of the time texture compression enabled because as I said most chipsets they have a specific texture buffer with the compression enabled so it will be able to decompress on the Fly and render the geometry out of the GPU again profiling analysis go through it look at asset loading if you want to really figure out where your again on all what aipmode number of game objects is going to give you a lot more data it's going to look at the timeline view it's going to give you a breakup of every single millisecond where it's been used okay every single one is going to tell you what it is doing is it reading is it streaming did it load it up in memory where what's happening is going to give you all of that so pay attention to that look at the Timeline you can right click on the uh on the game objects on a profile right click and you save view timeline view it will give you this View and then you look at giving going to give you individual breakup right from your scripts to your geometry where it's going and then you can take action onto it and that's it thanks guys um any I think we don't have much time for questions but uh any I think maybe or two one or two questions I can yeah yeah sorry Mike so thank you for your sessions every time like so uh my name is I'm coming from TCS like uh as this session was specifically for mobile devices and one thing we are forgetting that's on the door is uh something related to mobile devices it's virtual reality for again mobile devices uh coming all way all the way to optimizing and having best performance and maintaining quality is something we have to take care again uh talking about the resolution of a mobile it's again this much screen but talking about VR it's uh independent like we can move everywhere and we have to maintain quality as well in compared to perform performance issues right so at the end at the end we we still follow some very basic tips like baking lights and uh sure right and doing the texture resolution like you said right so any tips on that for specifically for virtual reality because that's something uh a future of mobile game like as I would say the rest of the uh like from a texture compression and the light settings and the render asset render pipeline asset those all uh optimization performance things you can easily do the only thing I think what's what's not going to do as a tradition yeah so that's anyway you can do that right uh down sampling again you can't do much on the watch uh we are because it has to be the high resistance you want to take 2K resolution each optimize Zone quality it doesn't need to be there yeah it shouldn't uh I would say avoid larger scenes okay unless we we did a bike racing game in VR okay this was I think we did it almost two years back uh we didn't have a large draw uh distance but I think keeping it within 100 and keeping at high resolution it will still work on the VR creating open World Games in VR as well it's it's difficult it's a difficult Challenge and uh and that's where avoid large long draw distances is all uh main what you can do specifically for VR thank you yes so sometimes we generate prefabs through scripting yes so uh what happens is that yeah we get material instances uh in the hierarchy yes so is it okay for uh uh like a set pass is going to be higher for that so what you could do is what we do is you can group those materials as a shared material see you again when you have instantiating say a prefab just assign just make them use the same shared material uh that's another step when you are doing you can do that so that will make sure like the same material uh is across it will not create those multiple Unity anyway does it on a shade it enables shared material anyways by default when you instantiate this from the same uh prefab but just as a double check you can uh do that that will ensure like there's no multiple materials there yeah we do scriptable meaning all our stuff is procedurally generated as well on the level part hey thanks guys if there's anything I'm here so I'm happy to help thank thank you [Music]
Info
Channel: IndiaGDC
Views: 6,464
Rating: undefined out of 5
Keywords: IGDC, IGDC2021, #GameDeveloperConference, #IndiaGameDeveloperConference, #GameDevelopers
Id: FjcNSjf7tvw
Channel Id: undefined
Length: 45min 12sec (2712 seconds)
Published: Fri Dec 16 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.