FREE Performance Optimization / Draw Call Reducer (HLOD) | Unity Tutorial

  Рет қаралды 33,845

LlamAcademy

LlamAcademy

Күн бұрын

Learn how to optimize the performance of your game by automatically combining meshes, significantly reducing draw calls using the free HLOD tool from Unity. Hierarchical Level of Detail is a great tool to boost the FPS of your game, especially when you have large view distances with complex geometry!
💸 Ongoing sales 💸
⚫ Check out the latest Humble Bundles www.humblebundle.com/software...
⚫ Publisher Sale! 50% OFF an entire publisher's Assets! Publisher changes weekly! assetstore.unity.com/publishe...
⚫ Save up to 50% on NEW Assets: assetstore.unity.com/?new_sal...
👨‍💻 The HLOD code is available on Unity's GitHub: github.com/Unity-Technologies...
📚 Resources:
⚫ HLOD Specification (Unity): docs.google.com/document/d/1O...
⚫ HLOD User Guide: docs.google.com/document/d/18...
⚫ Unity AutoLOD: github.com/Unity-Technologies...
⚫ My Auto LOD Tutorial: • Free Automatic LOD Gen...
⚫ Unity Mesh Simplifier: github.com/Whinarn/UnityMeshS...
⚫ Astrofish Asset Used: assetstore.unity.com/packages...
❤ Believe in LlamAcademy's mission and have received value from the videos? Become a Patreon Supporter or KZfaq Member:
⚫ Patreon: / llamacademy
⚫ KZfaq Member: / @llamacademy or click the Join button on any video
📱 Let's stay connected
KZfaq: / llamacademy
Patreon: / llamacademy
Facebook: / llamacademyofficial
Twitter: / thellamacademy
TikTok: / llamacademy
Instagram: / llamacademy
----
Most tutorials come from knowledge gained making survival.llama.software Llama Survival - a top-down zombie survival shooter for Android and iOS.
I also have some Unity Assets: assetstore.unity.com/publishe...
Some links may be affiliate links, which at no additional cost to you, gives me a small portion of the purchase.
#unitytutorial #tutorialtuesday #gamedev #tutorial #unity #llamacademy #gamedevelopment
Chapters:
00:00 Topic Introduction & The Problem
00:45 What is HLOD?
01:56 Demo Scene
02:30 Get HLOD
02:50 Applying HLOD to the Scene & Configuration Overview
06:40 Demo 1 - Performance, Debug Visualizer, and What HLOD is doing
08:31 HLOD Subtrees
09:15 Reducing Chunk Size - More Granular LOD Swapping
10:00 Default LOD Controller - Runtime HLOD Controller
10:30 Side by Side Demo, a Weird Issue, Closing Thoughts, & Support LlamAcademy

Пікірлер: 75
@fmproductions913
@fmproductions913 Жыл бұрын
Thanks, I was looking forward to this topic. What a great tool!
@georgegonzalez5322
@georgegonzalez5322 Жыл бұрын
Thank you for taking the time and going farther than what is documented.
@LlamAcademy
@LlamAcademy Жыл бұрын
My pleasure!
@andrewallbright
@andrewallbright Жыл бұрын
Performance topics are fun topics to consume content on. I enjoyed the intro especially the before and after observations of performance metrics. Getting those numbers in range is what performance tuning is all about. It would be tight to see a performance test using Unity's Performance Testing API. I've read the docs but have been busy with learning/implementing cloud based multiplayer stuff. My thinking for performance testing is that they're just asserting that the viewing a prefab or scene matches some anticipated number (aka the test expectation). Soon I'll write my first scene/prefab test that ensures they meet some performance expectation I've yet to define. ... At that point you can let the artists run wild (who may be oneself if working solo) -- just tell them to expect a conversation if they break the performance tests. I repeat: performance topics are fun topics to consume content on. Thanks for creating this vid! You do amazing work putting your content together. Cheers :D
@TheBlopster
@TheBlopster Жыл бұрын
Thank you for help making my gamedev dreams become reality! Love your new hair color btw
@LlamAcademy
@LlamAcademy Жыл бұрын
😎 thanks! Happy to help the gamedev dream!
@abdulwahab-wg2ok
@abdulwahab-wg2ok Жыл бұрын
really loving your content
@saqibbro5297
@saqibbro5297 Жыл бұрын
Great Video Buddy!
@castlecodersltd
@castlecodersltd Жыл бұрын
Nice one, thanks for sharing 👍🏻
@Caffeen
@Caffeen Жыл бұрын
Nice, hadn't seen this one yet
@NorthstriderGaming
@NorthstriderGaming 4 ай бұрын
Thank you for this detailed guide. This is making generating and using LoD so much more pleasant to use. Though I'm still hoping for a nanite-like solution eventually.
@MatrixRex05
@MatrixRex05 Жыл бұрын
This is a hidden gem. Thanks for covering. Unity has some hidden gems like these. Could you also cover Unity toon shading too? I think most people doesn't even know about it.
@LlamAcademy
@LlamAcademy Жыл бұрын
That is a cool idea. I will add it to the list of potential topics. Thank you!
@ashb899
@ashb899 Жыл бұрын
This is a good channel, shame youtube doesn't suggest you more often.
@LlamAcademy
@LlamAcademy Жыл бұрын
❤️ thank you!
@splashmaker2
@splashmaker2 Жыл бұрын
This looks like it could be useful. It does mention generating texture atlases, but I wonder if you’d be better off with texture arrays instead to avoid uv issues. I also think hlod can benefit a lot from hand created lods when you get really far away (think a huge box mesh or flat imposter billboard), or some kind of generation of these.
@beardordie5308
@beardordie5308 Жыл бұрын
Yeah I want a Unity version of nanite. And lumen for that matter. Need to compete on those, Unity is a hard sell right now for high fidelity high poly projects.
@LlamAcademy
@LlamAcademy Жыл бұрын
Hopefully we will see Unity pump out some cool competing technology! Unreal showed some really disruptive tech. Usually that means everyone else takes note and comes up with a competitor.
@Rahulsingh-theraha
@Rahulsingh-theraha Жыл бұрын
Btw i guess u should make a optimisation playlist, u already have many videos on it!I didn’t even knew that u had optimisation techniques tut for mobile
@LlamAcademy
@LlamAcademy Жыл бұрын
Great idea. Thank you!
@anussqadeer3181
@anussqadeer3181 4 ай бұрын
Nice tutorial Will this increase size of my android unity game?
@unityUser
@unityUser Жыл бұрын
Could you make a setup tutorial on it, cause when I clone the files in my project I get errors in unity :(
@StarkTech47
@StarkTech47 Жыл бұрын
Very good video! I have a question about moving part of the scene. How does it work for the doors for exemple of any object with animations? Are they ignore by the script, do I have not to implement these objects in the HLOD or it works perfectly and I do not need to take care?
@LlamAcademy
@LlamAcademy Жыл бұрын
Doors can be rendered including animators / animations at LOD0 without issue. The issue you may have is at LOD1+ they will be in their default (probably closed) state. So transitioning from LOD0 to 1 May cause a noticeable jump. You can exclude doors from the HLOD system to avoid this, or this behavior may be fine for you.
@StarkTech47
@StarkTech47 Жыл бұрын
@@LlamAcademy That was I had in mind, excludes every object which will move of the HLOD and it seems to be a good solution. Thank you !
@MichaelWatsonProgrammer
@MichaelWatsonProgrammer Жыл бұрын
Looks like just what I need, will this work with the LOD system from your other video as I've already set that up and don't want them to conflict?
@LlamAcademy
@LlamAcademy Жыл бұрын
it will work with the AutoLOD, but this also under the hood uses AutoLOD to generate the LODs. Generally I would expect you might use AutoLOD for character or dynamic models, and use this for world geometry.
@mehmedcavas3069
@mehmedcavas3069 Жыл бұрын
why did i discover your channel so late :(
@alicivrilify
@alicivrilify Жыл бұрын
Thanks for this great video. A quick question: Can I use this HLOD on prefabs? Because, the environment in my game is set at runtime. I don't have a fixed scene. And one more: Does AutoLOD would be enough in that case?
@LlamAcademy
@LlamAcademy Жыл бұрын
I do not believe you can, but I have not played with that use case
@yovador
@yovador Жыл бұрын
For your environment, to have them load at runtime I would advice you to load a scene instead of a prefab. That way you can set the enviro to static and use all LOD and baking that you want
@Project-NSX
@Project-NSX Жыл бұрын
Wish I saw this video before hacking the LOD system by using a script to manually set lod groups on objects and making it grab all their renderers etc. This should 100% be a part of Unity IMO, the LOD system on its own feels a bit lacking. Thanks for the video!
@LlamAcademy
@LlamAcademy Жыл бұрын
Definitely would love to see this implemented as a full 1.0 release package!
@duchiepcao5237
@duchiepcao5237 13 күн бұрын
can I pre-bake mesh or mesh group then do HLOD?
@netron66
@netron66 Жыл бұрын
Should the lod in the future based on the screen resolutions so there will not be no popping in? Unreal 5 seems doing a similar thing which has good results
@LlamAcademy
@LlamAcademy Жыл бұрын
The LOD slider we configure here swaps based on projected AABB size. The "popping" can be mitigated by lerping between the two models of different LODs and having less variation between stages
@mrestonian6905
@mrestonian6905 Жыл бұрын
I don't understand how to install it 😢 I drag and drop it into my project and then I can't use hlod script and it says meshoptimizer is missing. I install meshoptimizer and it still says the same. Idk if it's cause mesh optimizer is not inside the hlod folder or what (also I can't put it inside the hlod folder, it doesn't allow me to do that) pls help me, I have a HUGE openworld game and my optimization sucks😢
@Chewy1914
@Chewy1914 3 ай бұрын
Has this HLOD code been tested on 2022.3 LTS URP ? By the way, thank you for all your tutorial videos @LlamAcademy! 💪
@LlamAcademy
@LlamAcademy 3 ай бұрын
I haven't used it on 2022.3 but I don't think there are any breaking changes between 2021 (what I used in this video) and 2022 that would make this stop working.
@ivankubal6935
@ivankubal6935 Жыл бұрын
Hello, coming bit late to this, but I would like to ask - Does HLOD works also for GPU Instanced assets? Lets say, I have big forest. All the trees are Unity trees, so GPU Instanced (GPU Instancer plugin for that matter). Can I take advantage of HLODs to chunk further parts of the Forest into HLOD grids or is better to have it all just instanced?
@LlamAcademy
@LlamAcademy Жыл бұрын
HLOD would help you by reducing the number of triangles drawn, since GPU instancing is drawing the same mesh multiple times. I didn't try this with trees to do a comparison, but I would imagine this could improve performance on top of the GPU Instancing of individual trees or LODGrouped trees to billboards.
@ivankubal6935
@ivankubal6935 Жыл бұрын
@@LlamAcademy thank you, I will give it a try bit later
@nikjanspruk588
@nikjanspruk588 6 ай бұрын
I am a bit confused after watching this video. Do I use HLOD or Automatic LOD package for my game? Or do I use a mix a both, and if so. For what would each package be good for? Thanks Edit: also do you maybe have an idea what to do if i want to use hlod, but my materilas are urp... it just doenst work
@LlamAcademy
@LlamAcademy 6 ай бұрын
HLOD uses auto LOD under the hood. This video was about HLOD specifically, so I recommend it for these types of use cases. I don’t have this project set up anymore but I’m pretty sure it was done with URP. What is not working?
@nikjanspruk588
@nikjanspruk588 6 ай бұрын
before i implemented it on my whole project i made a sample scene and added 5 cubes to it. addet them under same parent and added hlod. all objects are pink, and when moving the camera non of the meshes show.. all are hidden all of the time. I also get one error but im not at the pc anymore. will reproduce the error tomorrow.@@LlamAcademy
@onewayroad3765
@onewayroad3765 Жыл бұрын
Is LOD system work in multiplayer game. If my game has 10 players, then in the game there should be atleast 10 cameras.
@LlamAcademy
@LlamAcademy Жыл бұрын
In a multiplayer scenario each client will likely only have 1 camera active at a time, so there would not be an issue
@niuage
@niuage 5 ай бұрын
Your intro is so cheesy but your content is tasty 😅
@LlamAcademy
@LlamAcademy 5 ай бұрын
I do find cheese quite tasty 😁
@Hazzel31337
@Hazzel31337 Жыл бұрын
sounds interessting HLOD + adressables sounds like nanite ? maybe ?
@awesomeniac
@awesomeniac Жыл бұрын
it's not actually, if we talking about UE, they already have HLOD before Nanite and it's totally different system, technically HLOD is some kind of custom static batching.
@Hazzel31337
@Hazzel31337 Жыл бұрын
@@awesomeniac oh yeah the technicall details of that a way beyond my knowledge
@LlamAcademy
@LlamAcademy Жыл бұрын
Great answer 🙂! To elaborate a little - Nanite is a much more sophisticated runtime triangle/vert optimization that allows artists to not have to use LODs like this. HLOD is generating many new models based on your current scene configuration and has to be recomputed if you change anything. Nanite does not require additional model generation or recomputing like this.
@Hazzel31337
@Hazzel31337 Жыл бұрын
@@LlamAcademy aaah thank you for further explaining it, yes thats on another level ^^
@Rishraff
@Rishraff 7 ай бұрын
How can I install this? I'm having trouble
@LlamAcademy
@LlamAcademy 7 ай бұрын
Unity's GitHub page has installation instructions here: github.com/Unity-Technologies/HLODSystem/
@pklpklpkl
@pklpklpkl 3 ай бұрын
@@LlamAcademy It REALLY does not help someone that doesn't know Git
@LlamAcademy
@LlamAcademy 3 ай бұрын
I think you just need to install git and run the two commands they have listed. Do you have trouble with those two commands?
@unityUser
@unityUser Жыл бұрын
Does this work with foliage like trees and grass?
@LlamAcademy
@LlamAcademy Жыл бұрын
Yes, it supports Terrain. I am not 100% sure on terrain grass, but trees are.
@unityUser
@unityUser Жыл бұрын
​@@LlamAcademy thanks :D
@unityUser
@unityUser Жыл бұрын
@@LlamAcademy bro i tried to clone from the github repository, but i get 5 errors when import the files to my project in unity
@LlamAcademy
@LlamAcademy Жыл бұрын
What are the errors?
@unityUser
@unityUser Жыл бұрын
@@LlamAcademy some namespace errors
@jirisuke2
@jirisuke2 6 ай бұрын
Batchesがまだ1000以上もある。mashbakerが必要?
@lucutes2936
@lucutes2936 2 ай бұрын
doesn't work on 2022 i think
@adrianmaj8656
@adrianmaj8656 Жыл бұрын
Does it paid or private use?🤔
@81mg61
@81mg61 11 ай бұрын
not working.
@81mg61
@81mg61 11 ай бұрын
Doesn't work if resource textures are compressed.
@deadevil_fst
@deadevil_fst 3 ай бұрын
The warzone mobile will run on mobile like nothing if the game engine is unity 😞
@illiavarenyk2973
@illiavarenyk2973 Жыл бұрын
Завжди дивувавсь навіщо людям блакитне волосся 🤔
@LlamAcademy
@LlamAcademy Жыл бұрын
I don't know, I like it blue, red, sometimes even just blonde, so I get it 🙂
@syarfandiachmad2397
@syarfandiachmad2397 9 ай бұрын
I got this error : HLODSystem\com.unity.hlod\Runtime\HLODManager.cs(83,24): error CS0120: An object reference is required for the non-static field, method, or property 'HLODCameraRecognizer.RecognizedCamera I already add HLODCameraRecognizer script to my MainCamera, but still :(
Watch This Before Working on a Big Game in Unity
18:44
John Leorid
Рет қаралды 293 М.
39kgのガリガリが踊る絵文字ダンス/39kg boney emoji dance#dance #ダンス #にんげんっていいな
00:16
💀Skeleton Ninja🥷【にんげんっていいなチャンネル】
Рет қаралды 8 МЛН
Slow motion boy #shorts by Tsuriki Show
00:14
Tsuriki Show
Рет қаралды 9 МЛН
Mama vs Son vs Daddy 😭🤣
00:13
DADDYSON SHOW
Рет қаралды 47 МЛН
OPTIMIZE your Unity game using these performance tips | Tutorial
11:20
Sasquatch B Studios
Рет қаралды 12 М.
The Art of Game Optimization
10:18
Worlds In Motion
Рет қаралды 260 М.
Top 10 Tips To Optimize Your Mobile Game - Unity 3D
8:06
CG Dealers
Рет қаралды 37 М.
Unity Performance Tips: Draw Calls
4:24
Lofi Dev
Рет қаралды 185 М.
20 Advanced Coding Tips For Big Unity Projects
22:23
Tesseract
Рет қаралды 171 М.
Unity GPU Instancing in less than 7 minutes!
6:56
Flaroon
Рет қаралды 39 М.
Top 5 Optimization Tips from Building a Mobile Game in Unity
15:54
39kgのガリガリが踊る絵文字ダンス/39kg boney emoji dance#dance #ダンス #にんげんっていいな
00:16
💀Skeleton Ninja🥷【にんげんっていいなチャンネル】
Рет қаралды 8 МЛН