BOOST your FPS with occlusion culling | #UnityIn60Sec

  Рет қаралды 105,139

Nerd Head

2 жыл бұрын

Boost your FPS and improve your game performance by using the Unity occlusion culling tool.
This is the BASIC tutorial, let me know if you want me to make a more advance one. in the advance tutorial we will learn how to create a Custom occlusion culling and change it, fix some bugs and more.
Want to read more?
docs.unity3d.com/Manual/OcclusionCulling.html
Link to the asset in use:
assetstore.unity.com/packages/3d/environments/industrial/rpg-fps-game-assets-for-pc-mobile-industrial-set-v3-0-101429?aid=1011leVbt
Come hang out on Discord
discord.gg/sZmAkFXeRT
www.patreon.com/NerdHead?fan_landing=true

Пікірлер: 108
@johneyre9493
@johneyre9493 Жыл бұрын
I got a 15-20 fps increase on a small scene, thanks very useful.
@NerdHead
@NerdHead Жыл бұрын
Nice! Glad to help😁
@julianrockl4228
@julianrockl4228 Жыл бұрын
You literally saved my project in 1 min. Got from 10 fps to 40 fps.
@NerdHead
@NerdHead Жыл бұрын
That is really nice to hear, I will post some more optimization videos so you can be on even more fps
@DARK_AMBIGUOUS
@DARK_AMBIGUOUS Жыл бұрын
Once you build your game, it will run a lot better. My game ran at 30-40 FPS, but after building, it was locked at 200FPS, i could probably get higher, like 3,000+ FPS but monitors max out at about 144
@restushlogic5794
@restushlogic5794 10 ай бұрын
In the context of occlusion culling, "occluder static" and "occludee static" are terms used to describe the static nature of objects in relation to occlusion culling calculations. Let's break down these terms: Occluder Static: An "occluder" is an object that blocks the view of other objects from the camera's perspective. In the context of occlusion culling, an occluder is an object that is deemed to have a significant impact on what is visible and what is hidden in the scene. "Occluder static" refers to objects that are considered to be static occluders. These objects are not expected to move or change position during runtime and are used as reference points to determine what parts of the scene are hidden from the camera's view. Occluder static objects are typically used for calculating occlusion in scenes. Occludee Static: An "occludee" is an object that can be hidden from view by occluders. "Occludee static" refers to objects that are considered to be static occludees. These objects are also not expected to move or change position during runtime. Occludee static objects are those that are potentially hidden by occluders, and they are subject to culling if they are not visible due to occlusion. In essence, the terms "occluder static" and "occludee static" are used to categorize objects based on their role in occlusion culling calculations. Occluder static objects are the ones that have a direct impact on occluding other objects, while occludee static objects are the ones that can be occluded by occluders. When implementing occlusion culling techniques in a 3D graphics engine like Unity, understanding the static nature of objects in your scene is crucial. Static objects are often more suitable for occlusion calculations because they do not change position, and their interactions with other objects are consistent. Dynamic objects, on the other hand, can introduce complexity to occlusion calculations since their positions can change frequently. By properly categorizing objects as occluder static or occludee static, you can optimize occlusion culling calculations and improve rendering performance in your scenes.
@BudgiePanic
@BudgiePanic 3 ай бұрын
Did ChatGPT write this comment?
@deaddiamond7554
@deaddiamond7554 3 ай бұрын
@@BudgiePanicFor sure.
@hernandonj
@hernandonj 2 жыл бұрын
Thanks for the tutorial, it's quick, easy to follow and understand. Looking forward for the advanced tutorials, and suggesting you to create a invite to cup of coffee and patreon to support you.
@NerdHead
@NerdHead 2 жыл бұрын
Thank you very much! I am waiting to upload few more videos before I do that so I can know that I would be able to give extra content to people that choose to support me😊
@windwakin
@windwakin 2 ай бұрын
Woah didn’t know occlusion culling was something I could have without scripting it myself, thx for the tip 👍
@brokenmonitor242
@brokenmonitor242 Жыл бұрын
thanks bro this trick also fixed my lighting issues
@NerdHead
@NerdHead Жыл бұрын
wow, good to know it fixed the lighting, if you every figure out how please let me know🙏
@aaviusa835
@aaviusa835 Жыл бұрын
33 FPS in City Now 114 FPS in high demanding areas Thank you so much
@NerdHead
@NerdHead Жыл бұрын
I love to see stats changing like this😁
@amitklein2007
@amitklein2007 2 жыл бұрын
Wow, I have to try this!
@NerdHead
@NerdHead 2 жыл бұрын
Let me know how it goes
@GrimmSmile
@GrimmSmile 10 ай бұрын
Thanks, this helped!
@NerdHead
@NerdHead 8 ай бұрын
Glad it helped!😁
@lukamuller7305
@lukamuller7305 Жыл бұрын
Great tutorial ty
@NerdHead
@NerdHead Жыл бұрын
Thanks, I love seeing how many people are liking this tutorial😁
@Snake-sv6ie
@Snake-sv6ie 5 ай бұрын
omg thank you !
@TheRemaindersYT
@TheRemaindersYT 7 ай бұрын
My game went from 25 to 75 fps!!! Thank you!!!!
@raman5352
@raman5352 Жыл бұрын
Amazing
@NerdHead
@NerdHead Жыл бұрын
Thank you😊
@komunich
@komunich 7 ай бұрын
Hey.. I wanted to ask if it would work on a bean game. Dumb question but it kinda lags tho. Just askin.
@korypeters2059
@korypeters2059 2 ай бұрын
I need to make this happen bad thanks for the start
@royaleyourdad
@royaleyourdad 9 ай бұрын
very good video and first like
@NerdHead
@NerdHead 8 ай бұрын
Thank you very much!😊
@nirbhaysharma9913
@nirbhaysharma9913 Жыл бұрын
It works
@B4NTO
@B4NTO Жыл бұрын
Marking everything as static is not always the solution, lets say you have a shelf in an indoor scene then you gotta make sure it does not occlude a wall behind it etc by remove Occluder Static from it, atleast this is to my experience while working on a Uni project
@oleksandrbrahynets9595
@oleksandrbrahynets9595 9 ай бұрын
Can you please explain what is exactly the problem with a shelf being an ocluder?
@axethannanth
@axethannanth Ай бұрын
​@@oleksandrbrahynets9595 My guess is that the shelf occludes in a convex shape, therefore even if it's a see-through shelf: It occludes the wall and makes it look strange due to a seeming visibly missing wall.
@LALESPETROS
@LALESPETROS Ай бұрын
Hi there! I see that the default Unity's occlusion cooling tool is used. what is your tool doing exactly? I can't understand.
@yuraah_games
@yuraah_games 5 ай бұрын
Is it a good idea to make occlussion on a terrain, because I feel like my fps dropped?
@anvari255
@anvari255 3 ай бұрын
17 fps -> 30fps. Needs some work but it certainly is an improvement! Thanks.
@in4init3vr
@in4init3vr 11 ай бұрын
I dont know how, but doing it only got me a 3fps boost on standalone. after removing demanding things it bumped up to 30fps, but before the max was 15fps so not too big because my max fps on standalone is 72 and im getting half that. help?
@Fun17RequestOfficial
@Fun17RequestOfficial 2 ай бұрын
Can this work while generating the object through scripts ?
@stormer268
@stormer268 2 жыл бұрын
Thank you for the nice tutor~! And I have question: How dynamic objects occlusion culling? In my scene, hava a lots of dynamic objects. They are created at runtime.
@NerdHead
@NerdHead 2 жыл бұрын
Thank you😁 I have a more advanced occlusion culling video when I answer this question and a lot more but for short, in your GameObject's mesh you have an Dynamic Occludee option that is by default set to true so any moving object you have will be, by default an ocludee. For occluder you will have to use portals (I also have this in my advance tutorial but it's harder to explain in short).
@lucutes2936
@lucutes2936 Ай бұрын
0:23 how do you enable those metrics?
@RealityScapeStudios
@RealityScapeStudios 2 жыл бұрын
Need one similar but for Procedurally Generated maps on runtime.. any suggestions?
@NerdHead
@NerdHead 2 жыл бұрын
If you have generated maps you mostly don't really need it, you can just make the map smaller or with chunks and use player position&rotation or raycast to load and hide chunks
@MuhammadTahir-ql8ly
@MuhammadTahir-ql8ly Жыл бұрын
Short,concise,to the point....Earn one more subscription.....Why you stop posting videos?
@NerdHead
@NerdHead Жыл бұрын
Thank you very much! I am aiming to be just that. There is a video soon to be finished, just takes time with the studies and some vacation😁
@boom8918
@boom8918 4 ай бұрын
broooooo from 12 fps to 144 you saved my life!!
@boom8918
@boom8918 4 ай бұрын
even to 195 fps
@wtmftproductions
@wtmftproductions 5 ай бұрын
Does this only help when there's objects within the camera's view area? I'm wondering if this will give any improvement for a top-down game where nothing is ever really occluded, but is simply either in view or out of view.
@Rayears
@Rayears Ай бұрын
By default, Unity performs what is called frustum culling, which should be all you really need. frustum culling = Only renders objects within your camera's field of view (including objects that may be behind other objects) Occlusion culling = Only renders objects within camera's field of view AND line of sight (excluding objects that are hidden behind other objects) Hope this helps!
@lucutes2936
@lucutes2936 Ай бұрын
Also what about the objects like trees that were painted with Unity's terrain tool?
@lucutes2936
@lucutes2936 Ай бұрын
nvm it does work with them too
@dolanananimasi1286
@dolanananimasi1286 15 күн бұрын
how to display statistics?
@deadara918
@deadara918 Жыл бұрын
is it still nanite possible on occlusion culling ? since ue5 do much similar on nanite its tri go higher if go far
@donkeyy8331
@donkeyy8331 Жыл бұрын
Nanite actually already applies occlusion culling to meshes before rendering them.
@bara555
@bara555 10 ай бұрын
I'd like to ask if there is a way to enable it in a Unity game with a command or something, without entering the dev tool?
@NerdHead
@NerdHead 8 ай бұрын
I don't belive that there is, there are many other ways of hiding/ showing things in you game via script. If you need to, you can use those.
@bara555
@bara555 8 ай бұрын
@@NerdHead That's unfortunate, but thank you for your answer regardless :)
@TreronDevelopment
@TreronDevelopment 8 ай бұрын
This Helped alot. now Chimps Life! Runs At 72 to 350 Fps instad of 32-48 fps!
@NerdHead
@NerdHead 8 ай бұрын
I am really happy to hear this!😊
@TreronDevelopment
@TreronDevelopment 2 ай бұрын
​@@NerdHead also, You should make a Tutorial on Batches, Your Tutorial isn't Batch optimized, Witch for Games Meant for Console and Standalone Games are a Nightmare to Have
@TreronDevelopment
@TreronDevelopment 2 ай бұрын
​@@NerdHeadIt's Why I then Focused on Batch optimizing right after, Reducing Vertices and As well as Add Proper Occlusion Culling Using some Custom Code, And Added Lod Groups, That Should help for your Next Tutorial, And Also I use Realtime lights, So Optimizing It Through Batch counts was necessary, And I didn't want to Go through the hassle Of Switching to Baked Lighting, Light Probes and All That, Especially paying 50 dollars for Magic light probes
@ExoticRapha
@ExoticRapha Жыл бұрын
my fps went from 70 to 70
@NerdHead
@NerdHead 8 ай бұрын
The best improvement so far! But seriously - this won't be the best option for every game, smaller games will probably not be helped a lot by this.. What did you make?
@yours_indie_game_dev
@yours_indie_game_dev Жыл бұрын
somehow mine reduced from 100-50, or is it because i have 3 cameras in my scene one for minimap and another for car mirrror
@NerdHead
@NerdHead Жыл бұрын
If you use many cameras the occlusion culling will be less helpful because you are looking at basically everything so everything is showing. I am planning to post a video about LOD soon - this might be more for you
@jayantbarthwal4470
@jayantbarthwal4470 Жыл бұрын
can we apply same thing to UI Canvas (camera ) as there is a lot of thing in my canvas and it is running in 15 fps in android.
@NerdHead
@NerdHead Жыл бұрын
No, it's only for 3D, for canvas if you have alot off images look at my sprite canvas tutorial and let me know if this helps you
@jayantbarthwal4470
@jayantbarthwal4470 Жыл бұрын
@@NerdHead Thanks bro, I am definitely going to watch it , But for now i attached a Rect Mask 2d Component to my Canvas and it leads to a drastic change in performance , it went from 17 fps to 45fps as now it does not render ui which is not visible to camera . This was amazing.
@softwareengineerunitydevel8279
@softwareengineerunitydevel8279 Жыл бұрын
I am using Unity 2020.3.33f1 I tried many times but my stats are not going down. Please let me know where I am missing things....
@NerdHead
@NerdHead Жыл бұрын
Make sure that things are getting blocked properly, with some assets there is a problem where you can see right throgh objects and that they are not detecting it
@adeel4410
@adeel4410 Жыл бұрын
What is the difference between occlude static and occluder static?
@NerdHead
@NerdHead Жыл бұрын
Occlude = can be hidden when not visible Occluder = hides things behind it For example, a mug will not hide anything because it's small and a mountain will not be hidden by anything because it's too big.
@adeel4410
@adeel4410 Жыл бұрын
@@NerdHead so if i set wall to occluder static will it hide things behind even if camera is facing them
@adeel4410
@adeel4410 Жыл бұрын
@@NerdHead and also when to use which flag or both
@NerdHead
@NerdHead Жыл бұрын
Yes, as long as is not visible, it will not render. Use occluder on big object and occludee on small to mid range
@schonkigplavuis8850
@schonkigplavuis8850 Жыл бұрын
I just did it. Eazy. Now my controller walks like a drunk man,
@NerdHead
@NerdHead 8 ай бұрын
😂😂, why? Did you make the character a static objects too?
@mlgjman1837
@mlgjman1837 Жыл бұрын
FPS downgraded with Occlusion Culling, not sure why :/ Maybe, because my models are placed from Unity Terrain.
@NerdHead
@NerdHead Жыл бұрын
There are some common problems with different materials of the objects and assets, I am looking into it and will try to put a video out about how to solve it
@gamecreationtutorials3846
@gamecreationtutorials3846 Жыл бұрын
is it possible to make collision culling in a prefab instead.
@NerdHead
@NerdHead Жыл бұрын
only as an occludee (the one that hides) because it can be dynamic, occluder will need to be baked, you have to put all the objects in the scene and bake it. Basically everything can be in the prefab but the scene will have to be baked for occluders to work
@gamecreationtutorials3846
@gamecreationtutorials3846 Жыл бұрын
@@NerdHead so is there a way to bake the scene as soon as the game starts?
@NerdHead
@NerdHead Жыл бұрын
Not really, it's editor only as far as I know
@itsdonix
@itsdonix 6 ай бұрын
damn my pc almost crashed cus of this thank you
@ArjanDuijs
@ArjanDuijs 2 жыл бұрын
still waiting for the advanced tutorial..
@NerdHead
@NerdHead 2 жыл бұрын
I was just about to make another video but I guess I know what I'm doing now😁
@ArjanDuijs
@ArjanDuijs 2 жыл бұрын
@@NerdHead cheers, looking forward to it
@Chieseled_Renegade
@Chieseled_Renegade Жыл бұрын
It's not that easy look at the size of that thing. It is like 90 mb of occlusion data which is bad. You could have made it in more detail and tell about occlusion area componnent.
@NerdHead
@NerdHead Жыл бұрын
In this example I used it with every object in my scene, this is not the ideal way to use it, just an example. This video was just about the basics of it, as I saw people's interest in this I did made an advanced one (you can go check out out)
@OzbyrkEmre
@OzbyrkEmre Жыл бұрын
60 to 42 thx
@NerdHead
@NerdHead Жыл бұрын
42 is a nice number indeed
@Produciones_Basado
@Produciones_Basado Жыл бұрын
from 2 to 900
@NerdHead
@NerdHead Жыл бұрын
"To infinity and beyond" ~buzz lightyear
@arjunm1246
@arjunm1246 3 ай бұрын
Wow now my fps went to 90 to 60😂💀
@thepolygonpilgrimage
@thepolygonpilgrimage 2 жыл бұрын
300+ FPS while not playing the game. What is the FPS when you actually hit play and run around? Also the 9000 FPS in your thumbnail is false and misleading
@NerdHead
@NerdHead 2 жыл бұрын
Hey, I will slit my answer to 2 parts. First, the idea of the tutorial is to show you how to boost your FPS. I couldn't move around because my pc crashes without the occlusion Culling turned on. Secondly, the 9000 is an exaggeration to show that it can make a BIG improvement to your project's performance. With a good computer (that I am far away from having) and a good scene (as you can see the scene wasn't optimized properly) you can easly have that huge change in your FPS using this methoud. That said, I will take this to my attention and show more concrete examples and make a less of a clickbait thumbnail. Thanks for the feedback and for reading so far🙏
@secretservicebob3288
@secretservicebob3288 2 жыл бұрын
@Juka agreed.
@secretservicebob3288
@secretservicebob3288 2 жыл бұрын
But hey, would have been cool to say: IT'S OVER 9000!! 🤣
@fantabulousclipsfullhd6887
@fantabulousclipsfullhd6887 Жыл бұрын
Nobody was expecting 9000+ fps to be honest. As long as the game's working smoothly and doesn't have any fps drops it's just fine. Even some popular game titles cap the fps to as low as 30 fps(For example split second velocity is car racing that capped the fps to 30 and feels great).
@lucutes2936
@lucutes2936 Ай бұрын
​@@NerdHead don't listen to him, the thumbnail is great, meanwhile this comment is not.
@T4RIHCIBEKIR
@T4RIHCIBEKIR Ай бұрын
I had 7fps know i have 33fps
@garrydev
@garrydev 11 ай бұрын
It destroyed my map bro
@NerdHead
@NerdHead 8 ай бұрын
lol, can you revert this? what did it do?
@HummerEarn
@HummerEarn 11 ай бұрын
byeeeee🤣😅
@NerdHead
@NerdHead 8 ай бұрын
Thank you, apparently I also do this in real life and my friends laugh about this so much 😅😅
@ANlMEbuoy
@ANlMEbuoy 2 ай бұрын
literally 5 fps
Super gymnastics 😍🫣
00:15
Lexa_Merin
Рет қаралды 108 МЛН
small vs big hoop #tiktok
00:12
Анастасия Тарасова
Рет қаралды 25 МЛН
He sees meat everywhere 😄🥩
00:11
AngLova
Рет қаралды 9 МЛН
WHO DO I LOVE MOST?
00:22
dednahype
Рет қаралды 78 МЛН
ОЧЕНЬ ВКУСНЫЙ БУТЕРБРОД 🍞
0:49
КиноХост
Рет қаралды 4,2 МЛН
Невестка с приколом 😱
0:23
ТРЕНДИ ШОРТС
Рет қаралды 4,1 МЛН