Тёмный

Unity Performance Tips: Draw Calls 

Lofi Dev
Подписаться 4,3 тыс.
Просмотров 191 тыс.
50% 1

Опубликовано:

 

27 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 227   
@Kapthos
@Kapthos Год назад
I was always so worried about poly count, always trying to keep it to a minimum, but I love it that in this video you went from 0.5 FPS to hundreds without reducing a single polygon, always kept with those 21M.
@Domarius64
@Domarius64 Год назад
There are various bottlenecks to be aware of, polycount is still one of them, but the aim is to solve the one affecting your particular situation.
@xomvoid_akaluchiru_987
@xomvoid_akaluchiru_987 Год назад
@@Domarius64 why not apply all of the performance techniques at once? As soon as you solve the original problem, shouldn't you apply the other techniques?
@Domarius64
@Domarius64 Год назад
@@xomvoid_akaluchiru_987 if you have infinite time, sure, you can do everything. But in the real world you are always making trade offs to get something produced in a way that still turns a profit.
@xomvoid_akaluchiru_987
@xomvoid_akaluchiru_987 Год назад
@@Domarius64 Ok, time constraints, sure, but if a product is finished and you're coming back to fix some things then I don't see why implementing all of them would be an issue if the product really does benefit from it. If it doesn't benefit much then I just trust myself to have common sense and see that it's not worth it.
@Domarius64
@Domarius64 Год назад
@@xomvoid_akaluchiru_987 that "extra time at the end" literally never happens in game dev :) you always end up releasing the game when its good enough, not because its finished, because it never is. And so you cant justify spending time on things that have no tangible benefit - remember, you said "why not do all of them?" Well, thats why not. If the game runs on the target hardware acceptably, there is no reason to optimise. Plus when you say "why noy do all techniques" like there are only 5 or something. Every different programmer could know any number of techniques they learned about somewhere, too numerous to list, you cant just "do them all". And more importantly, those changes will not have zero impact, there will always be knock on changes related to that, and plenty of opportunity for new bugs to be introduced at every step of the way, all which will have to be fixed, taking even more time. If its working, you leave it alone.
@TurboMakesGames
@TurboMakesGames 3 года назад
Great overview. I liked how you you showed multiple levels of improvement and how each setting improved frame rate and batches 👍
@Imry0411
@Imry0411 Год назад
This will definitely be added to my greatest-unity-tutorials-of-all-time list.
@ivo435
@ivo435 Год назад
You single-handedly saved my project. I went up from average 28-30 fps to 160 lol. Thank you so much
@dertobbe1176
@dertobbe1176 3 месяца назад
How are you doing mate? Is your game realesed yet?
@samkwok2538
@samkwok2538 3 года назад
The best Unity Performance tips on RU-vid ever
@lucutes2936
@lucutes2936 4 месяца назад
indeed
@harrykingsley7915
@harrykingsley7915 3 года назад
These are very professional and excellent quality tutorials. Keep up the good work!
@squonkbot9487
@squonkbot9487 4 месяца назад
It's men like you that make the world a better place, I watch tons of videos on the same thing but you broke it down simple and easy to digest.
@Reeality09
@Reeality09 2 года назад
Btw. GPU Instancing will NOT work, if you have enabled SRP Batching in the Render Pipeline Settings. The SRP Batching is also better in performance reasons, because your gameobjects do not need to share the same Mesh/Material.. just the same Shader.
@antonovivan3008
@antonovivan3008 9 месяцев назад
I’ve never tried to measure the difference in performance by myself. But according to what people write at Unity forum, SRP batcher is generally slower than static batching. It has less memory footprint and easier to use though. And in some cases GPU instancing may be more efficient than SRP batching. In case of dense grass field made of 1 instanced mesh, for example.
@raploky
@raploky Год назад
I CAN'T EXPLAIN HOW EFFICIENT IT IS! THANK YOU!
@piyushguptaji402
@piyushguptaji402 2 месяца назад
ngl that funnel animation was mesmerizing asf 🤤
@kurtdevries9182
@kurtdevries9182 3 года назад
the ultimate guide to go from seconds per frame to frames per second.
@BelieveGameStudios
@BelieveGameStudios 18 дней назад
Best optimization video on RU-vid
@Louis-ko4yq
@Louis-ko4yq 3 года назад
Great work, the overall quality of the video is really high, please continue :)
@TheSateef
@TheSateef Год назад
i love these short concise videos full of great info, thanks so much
@suicune2001
@suicune2001 5 месяцев назад
Thank you! One of the reasons I'm hesitant to try 3D is because I'm worried about performance. 2D is just so much easier and you don't need to worry about performance as much.
@baldipogchamp8926
@baldipogchamp8926 2 года назад
Been making jam games in unity for 2 years now, did not realise how important the Static tickbox was. Never used it before, changing that now!
@aleksandrpipchenko426
@aleksandrpipchenko426 Год назад
Genius! Such important stuff in a nice and short video. Thanks
@Foxtrot6624
@Foxtrot6624 11 месяцев назад
Absolutely fantastic. I had no idea that marking an object as static actually did anything without scripts or rigid body’s applied to them
@peteyoshea
@peteyoshea 3 года назад
This is so well explained. Great video!
@thescribblersdiary
@thescribblersdiary Месяц назад
Great knowledge bro! Thanks a lot!
@cristhiancantillo4922
@cristhiancantillo4922 2 года назад
Short and clear. Nice vídeo man
@Nightmare_Developer
@Nightmare_Developer Год назад
Loved it !! when i was about to upload my game i searched this and all the top results were just making the game look like potato 🥔 and today i found this video :) honestly RU-vid should push this video more...
@Sail_VR
@Sail_VR 2 года назад
SO USEFUL THANK YOU!!!
@howtogamedev_
@howtogamedev_ Год назад
This was really cool, finally got to know why batching
@DevDunkStudio
@DevDunkStudio 3 года назад
If you have rooms I recommend using a tileset, not joining then into 1 object Just set all the not moving objects to static and enable static batching. That way they can be combined into just a few draw calls! (Same as your windows. All windows and the building should take 2 draw calls if I'm not wrong)
@Tymon0000
@Tymon0000 3 года назад
Can you elaborate on the tiles part? :) What is it and how to use it, some link would be helpful
@DevDunkStudio
@DevDunkStudio 3 года назад
@@Tymon0000 instead of 1 big 3D model you can make it into modular parts. That way unity can cull them with occlusion culling or just batch them with static batching
@dreamisover9813
@dreamisover9813 2 года назад
Great overview, quick and to the point, thanks
@Juss_Chillin
@Juss_Chillin 2 года назад
Thank youuu, I needed this soooo much for my mobile app! So, thank you ^-^
@andreidaniel687
@andreidaniel687 Год назад
Thank this is amazing I've been looking for something like this for a while now!
@Trashloot
@Trashloot 2 года назад
So much good information in such a short video. Just wow.
@MAINRAGAMES
@MAINRAGAMES Год назад
hatur nuhun bang. ilmunya mudah dipahami dan singkat
@AndrewDreamKeeper
@AndrewDreamKeeper 4 месяца назад
thnks dude! powerfull information 👍
@aaronjenkins2225
@aaronjenkins2225 2 года назад
i wish i saw this video months ago, great advice!!!
@TobeasJ
@TobeasJ 6 месяцев назад
Very clean and easy to understand.
@__Hay_Dar__
@__Hay_Dar__ 21 день назад
crystal clear to be honest
@mimsii4200
@mimsii4200 7 месяцев назад
Really cool, thanks!
@nikbivation
@nikbivation 2 года назад
thank you for this! so much info in so little time
@liulinzhifu
@liulinzhifu 2 года назад
very informative, thank you!
@glebparshikov1351
@glebparshikov1351 Год назад
That is brilliant. Finally, I understand!
@zlotey6485
@zlotey6485 3 года назад
I have a question about your 3rd point. 4:05 What should I use for organic material? For example, grass, trees, bushes, etc. - but these only "move" by a shader. should I use GPU instancing or static mesh?
@LofiDev
@LofiDev 3 года назад
Good question, static batching should work for them. When I say no movement what I mean is that objects transforms should not change. Any movement done through the shader is fine.
@ZeroStas
@ZeroStas Год назад
Perfect tutorial
@gabangang5093
@gabangang5093 3 года назад
Nice tips, 800th subscriber. :D
@NevRS32
@NevRS32 Год назад
After a few Unity courses, a few mini games and a whole lot of youtube tutorials, than you! I've come across some tips, but nothing as relevant (and clear) as this one. One thing I struggle with is doing performant UI. I made a small game where the UI uses the same assets as the game, but my god the main menu is slow.
@LofiDev
@LofiDev Год назад
Thank you! If you're looking for tips on UI performance I strongly recommend watching this talk from Unite: Squeezing Unity Tips for Raising Performance. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-_wxitgdx-UI.htmlm38s
@ArranAsh
@ArranAsh 3 года назад
Thank you so much, my game had a lot of belts in it and this was a great way of cutting down usage
@captaincommando9839
@captaincommando9839 2 года назад
insanely useful considering i was using multiple materials for flat coloring instead of just using a texture.
@INeatFreak
@INeatFreak Год назад
Quick and accurate! Great video 👍
@onemanonmars6478
@onemanonmars6478 Год назад
Great video! Thanks-
@ClintochX
@ClintochX 10 месяцев назад
Thanks so much for this video
@narendrakumarjha734
@narendrakumarjha734 2 года назад
you saved me. thanks man!
@GabrielDias0223
@GabrielDias0223 2 года назад
Incredible video, thank you so much!
@shobeon
@shobeon 2 года назад
What a nice tips! gonna try it
@ethankendall7575
@ethankendall7575 2 года назад
Thanks this means a lot to me when I am developing on a Intel i5 2gb gpu appreciated
@disdathit
@disdathit 2 года назад
Nice vid, thanks 😊
@limsengyong2122
@limsengyong2122 3 года назад
very well-explained, thanks for the tips!
@myst1cs04p7
@myst1cs04p7 Год назад
Thanks so much now i made my game go from 0 to 3 fps :D
@bambusz0131
@bambusz0131 2 года назад
Very good and helpful! Thanks!
@mohammedmurad7725
@mohammedmurad7725 2 года назад
Thanks, REALLLLLY THANKSSSS.
@Banaaani
@Banaaani Год назад
Thanks. This is insanely helpful.
@TruGameRage
@TruGameRage 2 года назад
wow this was informative! thanks a lot
@in801fo5
@in801fo5 2 года назад
Thank you, keep up the good work! :)
@luizfellipe1206
@luizfellipe1206 3 года назад
Very intuitive instructions 10/10
@Jicefrost
@Jicefrost 2 года назад
thx! Usefull video!
@gameplayhubindia
@gameplayhubindia 2 года назад
Awesome Tutorial
@jonajo261
@jonajo261 3 года назад
GREAT VIDEO MAN
@computer1889
@computer1889 2 года назад
Come on!!! I visited your channel, and I do not see many videos just only 5! I am hoping that you will make in the future, a video like this... >:/
@kevinramirez-rq8sy
@kevinramirez-rq8sy 2 года назад
Very well explained!
@aussieraver7182
@aussieraver7182 2 года назад
This is amazing!
@UnityTrap
@UnityTrap 2 года назад
Awesome video 👍
@MrZazzy
@MrZazzy 3 года назад
Tysm, you deserve 1k Subs :)
@refi350
@refi350 11 месяцев назад
I would probably add a fifth point to optimization to disable your own custom gizmo, when checking performance. I was wondering why my project was staying at 30 FPS, when I had very unoptimised gizmo running in background 😅
@mydreamprojcts
@mydreamprojcts 2 месяца назад
It will Best if shared this project with us..
@bhattacharjeesantanu
@bhattacharjeesantanu 3 года назад
Totally awesome channel !!!!!!!💥💥💥💥💥💥💥💥
@CA_Carilae_KeReRi
@CA_Carilae_KeReRi 2 года назад
Save my life . Thanks!
@farukonder8937
@farukonder8937 2 года назад
Thank you :)
@kennethbailey9802
@kennethbailey9802 2 года назад
Thanks
@devzozo
@devzozo 2 года назад
I believe probuilder can combine meshes within Unity.
@supercc66
@supercc66 2 года назад
nice tip
@miaan9374
@miaan9374 2 года назад
Thanks bro
@albertusbodenstein1976
@albertusbodenstein1976 3 года назад
Thanks man! ~!you LEGEND you!
@esa0832
@esa0832 2 года назад
nice video
@KiliGraphics
@KiliGraphics 3 года назад
Cool
@oozly9291
@oozly9291 3 года назад
Great help!
@Hietakissa
@Hietakissa 2 года назад
Why did you combine the meshes in Maya? Doesn't Blender already do that for you when you merge the objects with Ctrl + J? Also, maybe you should mention the SRP Batcher somewhere, even as a pinned comment, I think It's probably worth mentioning.
@nanoux
@nanoux 8 месяцев назад
Hey there! thanks for the great tutorial, really helped me understand this concept, but i have a question now... what if my game is 3d tile based, and these tiles are destructible and walkable? i need them to be individual units but a scene can have around 100K of those tiles... how can i go about it? the tiles are pretty simple already! would really appreciate your input. 🙏🏽
@TheKr0ckeR
@TheKr0ckeR Год назад
I've created an simple cube object. They have same materials & mesh (cube); I also enabled their GPU instancing in material & and also in URP settings. But batch count is not decreasing. What might be missing? It is same before & after
@Rollthered
@Rollthered Год назад
TO THE WINDOOOOOOOOOOWS... AND THE WALLSS (and the walls) UNITY SWEATS AND CAUSES DRAW CALLS, ALL THESE BUILDINGS FALL. 🎶
@tonytran07
@tonytran07 2 года назад
This dropped my batches from 3k to 2k However, FPS is still the same at 20fps. Profiler says it is due to Rendering. I have 200 animated goblins from Mixamo, animating an idle animation Have a feeling its got to due with Realtime Lighting...
@SerhiiZhydel
@SerhiiZhydel Год назад
Great explanation, thank you for the video! Now I better understand how it works, but I still can't find the answer I'm looking for. Maybe you could help me (please^_^)? I have 1 meshRenderer that has 46 materials fields set by the same material. This material has GPU instancing enabled and once again it's the same material instance used 46 times in the same mesh. And inspector shows me that it gets 46 batches to render it. Do you know if it is possible to combine these batches in unity without reexporting the mesh in blender or maya? I get it from the server so I can only use runtime operation with it...
@Dippps
@Dippps 2 года назад
sonce your buildings have same rotation and scale also enabling gpu instance will increase performance even more
@LofiDev
@LofiDev 2 года назад
Objects do not need to have the same rotation or scale. GPU instancing will work regardless. The requirements for GPU instancing is objects with the same mesh and the same material. Hope this helps.
@galan4173
@galan4173 3 года назад
Nice vid!
@nicolasportu
@nicolasportu 2 года назад
Outstanding! If I have a big city with lots of different models, do I have to choose between this tecnique vs Occlusion culling? Let's supose that I combine all the meshes in one in Blender. Thanks!
@HikikomoriDev
@HikikomoriDev Год назад
My VRChat scene is not running any faster :(
@Iboshido
@Iboshido 2 года назад
Can i set objects to static which are animated, but still dont move. For example a 2D character who has a child object arm that is waving
@TonEX76
@TonEX76 Год назад
Would you rather use Static Batching or GPU Instancing for grass?
@dreamterrormaster
@dreamterrormaster 2 года назад
Thanks for the good explanation. Does this apply in the same way for HDRP though? The official docs unfortunately seem to be missing/outdated on that topic.
@LofiDev
@LofiDev 2 года назад
Yup, everything here is the exact same with HDRP.
@dreamterrormaster
@dreamterrormaster 2 года назад
@@LofiDev Good to know, thanks.
@CHEEZEyCHEEZE
@CHEEZEyCHEEZE 2 года назад
How do they do a City then with different buildings?
@AntonioNoack
@AntonioNoack 2 года назад
"they"? - still using unified materials - buildings are static -> static checkbox -> will be combined into fewer meshes, which reduces draw calls - LODs
@potatoesss6174
@potatoesss6174 Год назад
I love the cat😈
@jamesrussell2936
@jamesrussell2936 3 года назад
Combine, combine, combine.
@unknownx4295
@unknownx4295 3 года назад
Thanks, it helped
@lucutes2936
@lucutes2936 4 месяца назад
Batches = drawcalls?
@marcoseliasmep
@marcoseliasmep 3 года назад
I got worse results with GPU instancing. Idk why, but I got huge drops on FPS after enabling it on my moving vehicles. So I stopped using it.
Далее
КАК БОМЖУ ЗАРАБОТАТЬ НА ТАЧКУ
1:36:32
Brilliant Budget-Friendly Tips for Car Painting!
00:28
Inside Out 2: BABY JOY VS SHIN SONIC 4
00:16
Просмотров 2,7 млн
When Optimisations Work, But for the Wrong Reasons
22:19
I Optimised My Game Engine Up To 12000 FPS
11:58
Просмотров 678 тыс.
How To Render 2 Million Objects At 120 FPS
14:57
Просмотров 144 тыс.
20 Advanced Coding Tips For Big Unity Projects
22:23
Просмотров 186 тыс.
How Do Games Render So Much Grass?
15:52
Просмотров 329 тыс.
КАК БОМЖУ ЗАРАБОТАТЬ НА ТАЧКУ
1:36:32