Optimization tips for maximum performance - Part 2 | Unite Now 2020
Вставка
- Опубліковано 3 чер 2024
- Be sure to watch Part 1 of this two-part series on optimization tips: • Optimization tips for ...
Watch and learn from Unity evangelist Arturo Núñez the real-world best practices for optimizing game performance. He provides many useful tips so you can get the most out of Unity and your game.
Speaker:
Arturo Núñez, Unity evangelist
Ask your questions here: on.unity.com/3i59Jm2
Did you find this video useful? Room for improvement? Let us know: on.unity.com/2Yr5ER3
Check out the Unite Now page to be among the first to watch upcoming sessions: on.unity.com/2ByJQu5
00:00 Introduction
00:59 Asset Importing Tips
05:35 Graphics Tips
12:46 UI Tips
17:04 Audio Tips - Ігри
I never thought of removing texture alpha channels! Just saved several hundred megs of ram on a Switch game!
Amazing to hear this! :)
how do you do that? how do you remove alpha channel
@@irocklalot Select the texture that you want, and switch the format from "Automatic" to "RGB 16 bit"
I would love to see more about graphic performance of Larger worlds containing many AI humanoid characters.
I've got a use case where I want to have around 1000 or maybe 2000 humanoid NPC's walking around doing their thing. Which of maybe 100 ~ 200 are on screen simultaneously. But Rendering performance is poor because of the many draw calls and not being able to GPU instance them. GPU Instancing is not available for Skinned Mesh Renderers.
I know ECS based Animations & Baking animations to a texture solutions exist. But ECS is far from done, let alone easily usable. It seems to be a perfect case for ECS but that tech just isn't ready for use yet.
So what could one do with the current tech to solve this problem?
Scenario:
- Large Terrain
- Multiple "Cities" each of where 100 ~ 200 NPC's live their life
- 100 ~ 200 Humanoid NPC's with Skinned Mesh Renderers on screen simultaneously (Maybe even more)
- Each Humanoid NPC is a NavMeshAgent
more videos like this please :)
Something else to note is that Unity will not always provide the best looking results when clamping the maximum size of a texture and can display compression artefacts easily. Bringing the image size down in Photoshop to your maximum or similar will have much better results.
more videos like these pleaseeee!
*Super Helpful* Love your advanced tutorials..
thanks for the feedback! Will work on more of these advanced tutorials
More like this, please! Do navigation!
In my personal experience, when importing video into a Unity project, you get a better image when with less storage use when you select a slightly lower Max Size with High Quality compression than using a larger Max Size with Low Quality compression. I don't know how well this converts over to textures.
T.Y. very useful uploads lately.
glad to read the content has been useful :)
Thank you Arturo! Awesome!
szpickij thank you for taking the time to watch!
Thanks for these great videos. At 18:14 when you talk about the size of an audio clip are you talking about it's original size or it's imported size ?
Thank you for your interesting tips!
>Please include subtitles
thanks Iskander! I apologize if the English was not perfect (not my native language). But you are absolutely right, we want to make our videos more accessible. I tried adding the English subtitles but started taking too long and didn't finish :(
Arturo Nereu definitely don’t need to apologize for it! Keep up the good work!
I cried when I watched the unity beginning video .
So just doing:
audioSource.clip = null;
Or:
audioSource.Pause();
Or:
audioSource.Stop();
Doesn't free the memory or the CPU usage?
Not 100%, but I think 99%... I think it's enough to use it, but I never tested. Someone should test it. I think that destroying audio sources is overkill, even more that you will need to code something to recreate them if the audio is on again (think, you need to re-put all old settings, or force the game to restart), "Stop" looks like a better option, maybe destroying is better because there is some RAM use for the existence, but, how much bytes?
How to make Raycast Target disabled by default? I think I create non-interactable UI objects more often, and it's always a chore to have to do it every single time. Especially hard when creating multiple TextMeshProUGUI, where the Raycast Target is hidden behind a dropdown.
Have one TextMeshPro UI element which has your optimal settings and duplicate it instead of creating new ones from scratch. Where possible you could create a prefab of your UI element with your preferred settings.
Perhaps I'm a bit late but, one way to have components default to something would be to use presets (by going into the top right of a component and select the preset, where you can create a new one and set it to default.)
Surprised why LOD, LightMap and Occlusion culling was not in the list.
I’d love to know if there’s any built in way to do either frustum culling or occlusion culling on instantiated objects
Actually there are hundreds of tips that can be included but this video includes some really rare tips which I never found on other places.
My game was running at around 300fps and after implementing some of the 3d mesh import settings described here, it collapsed to 100. Im not sure why this would have affected my performance since it is mentioned that mesh optimization is more for disk space than memory performance.
more please..
im still new using unity.. is it ok to play with level design first? or create asset with blender first?
I would prototype your levels/game first then incrementally start replacing placeholder objects with your own assets. When creating your own assets you can keep in mind the optimisation tips such as keeping your vertex count low and sharing texture maps between objects where possible etc.
@@legendaryitem2815 okay thanks for the tips
Avoid Mobile Native Resolution also works fine in Android ?
Yes just make sure it does not blur out the output. Because there is a huge range in android device resolutions.
Hello! I have to instantiate a lot of static buildings, but actually i do it loading scenes through Addressables in async way because i use scene partitioning for my city! I don't know why really well but if i keep my buildings marked as statics i have serious FPS drops while if i remove they from to be static it goes smooth! Now i know that where is possible keeping objects statics it would be better, and you mentioned that StaticBatchingUtility.Combine function. I have read the documentiation but im really not sure how to use that in my case.. Any idea??
did you figured it out how to use it ?
Had similar issues and seen similar effect with async loading scenes (split up large maps). Static causes issues and dynamic seems to be the way to go for some reason.
I would like to request to deeply profile a sample Unoptimized porject.
share your presentation if possible. Thanks
Is there is anybody who has the slide? Because it would be really useful
Last point, with sounds, is pointless. There is no or very small benefit for optimization like that, and it can be even odd when player discovers that game runs better/faster/more stable (according to less memory consumption) when sounds are muted. It has barely visible effect on power consumption, it's better idea to for example enable suspend feature on mobile devices when player has opened pause menu, than optimizing sound when it's muted, and many mobile games doesn't handle this aspect correctly, causing unnecessary battery drain. Also simple implementation, like unloading all assets, cause another strange behaviors, for example resenting to beginning background music, loosing some special effects in middle of action, when all what player wants is for example mute sounds just for a small talk with friend, for end user behavior like that looks like bug and fixing all corner cases is a waste of development time.
It feels like the person who made this video never played a game or made a game for himself and an audience which are daily players