1 free read left. Create a free account for unlimited reading + AI research.
Create free accountthis is occlusion culling okay occlusion culling is super relevant for indie games just as relevant for indie first-person shooters as a triple-a game so for example we've got cyberpunk right here and this is actually occlusion calling happening improperly this is a glitch that i found on youtube you could see characters are culling out for no reason [Music] by the way guys feel free to download my free 2d game kit below it's totally free it's my treat to you i used this exact 2d game kit to make a game for pewdiepie in 14 days and then i got to play it in front of his subscribers which was really awesome um so download that use it however you want it's my treat to you yeah okay if you're making a 3d game you're probably gonna run into what most aaa studios run into even if you're making a small indie game
you're gonna have a ton of objects and these are all cold out i mean i've got a ton of objects they're all cold called out currently called out means they're just basically removed from the renderer so we've got a ton of objects this is not one room mesh this is little cubes put creating this massive scene here so it's a lot there's a lot going on and my computer is even struggling right now just to run it in scene view so how do you deal with this what i thought a lot of aaa studios did is they would use lod groups so i added lod groups to all of the various static game objects that's definitely something you want to do an lod group is basically a level of detail component that basically calls out slowly calls out something as it gets further and further from the screen but this is occlusion culling okay occlusion culling is super relevant for indie games just as relevant for indie first person shooters as a triple a game so for example we've got cyberpunk right here and this is actually occlusion
calling happening improperly this is a glitch that found on youtube you can see characters are calling out for no reason right usually what happens with occlusion calling what you're going to want to do is the camera should render what's in front of it but anything that's outside of the camera's view and even behind walls it'll call out the static meshes so you can see here even if we look over here you could see all of the city's static meshes are called out now again this is a glitch but the principles apply here just the same for cyberpunk and halo and half-life and also my game father here so let's take a look at father and how this is actually working what i had to do and this is so great i love unity it's one of the easiest things you can do to optimize your game you're going to go to the window rendering occlusion culling tab okay i've already got that open right here and you're just gonna bake your scene one of the things you do is you just click bake down here and it bakes the meshes and just tells unity
which meshes are gonna slowly call out as the camera is pointed in that direction so you just want to make sure that the cameras i have two cameras actually a weapon camera and also a regular camera the regular camera is going to have culling enabled so you can see here occlusion culling is checked okay once you click bake you're pretty much good to go now you can change these settings here i'm not really going to change these settings so i'm going to click visualize here and this is definitely going to slow things down for us but i want to show you what's happening in the scene view so let's go ahead and hit play and again like i said things are going to really slow down for us but let's move our game view over here and you can see now it's not perfect but you can see what's happening anything that's within the camera's viewport and that includes an algorithm that that checks to see if the walls are in front of something if a wall is in front of something that is generally not going to be rendered so you can see here as we rotate our camera things are slowly rendering into view
now it's pretty scary isn't it it's like whoa there's so much going on is it gonna break the game and i've been playing around with this and we really don't have any bugs that have occurred the only major issue here is if there's a really small tiny window unity will say okay i can't see through that window so i'm not going to render anything and you can definitely fix that with the parameters here and i'm going to fix that up but overall it's pretty cool huh so it's just rendering what it needs to so that's occlusion culling now i know that most of you probably knew about this generally but i wanted to share it with you because it ups your frame rate significantly and again that's because we're not rendering everything at all at the same time there's no reason for unity to do that let's turn off visualization because it looks like my scene is about to blow up this is this is definitely helpful for interiors okay this is helpful for exteriors as well but the problem with exteriors is you could see into the horizon
so occlusion calling is not going to be as effective as it is in an interior so combining lod groups with occlusion culling is the way to go get over here [Music] hey thanks for watching by the way if you haven't downloaded that free 2d game kit below click below it's my treat to you i used this game kit to make a game for pewdiepie in 14 days and actually got to play it with him in front of his audience which is really cool this game kit is totally free it's my treat to you and you can use it however you want you can make a commercial game and make a million bucks off this game kit i don't care or you can just use it for a hobby project it's my treat to you and by the way if you haven't click like that would mean a ton to me hit subscribe and also this is important hit that notification bell here's why if you get notified of when i'm live you can watch me make my next game and let me know in the chat what you think about the game or any ideas you have and you might just show up your chat might just show up in the next video
that i upload all right i'll talk to you later bye i love you too
Optimizing performance in massive game environments requires effective rendering management to maintain high frame rates. The primary technique for achieving this is occlusion culling, a process that prevents the engine from rendering objects that are outside the camera's field of view or obscured by other geometry, such as walls. By removing these hidden meshes from the renderer, developers can significantly reduce the computational load on the hardware, ensuring that only necessary assets are processed at any given time.
While level of detail (LOD) groups are a standard approach for managing object complexity based on distance, occlusion culling provides a more granular solution for complex scenes. In game engines like Unity, this is implemented by baking the scene, which allows the engine to calculate visibility based on camera positioning and environmental barriers. This process is particularly effective for interior environments where walls naturally block the view of other rooms or objects. However, for exterior environments with long sightlines to the horizon, occlusion culling is less efficient on its own. In such cases, the most effective strategy involves combining occlusion culling with LOD groups to balance visual fidelity with performance.
Improper implementation of these techniques can lead to visual glitches, such as objects disappearing prematurely or flickering when the camera moves. Developers must carefully calibrate parameters to ensure that small openings, like windows, do not trigger incorrect culling. Ultimately, mastering these rendering optimizations is essential for both independent and large-scale studio projects, as it allows for the creation of expansive, detailed worlds without compromising the stability or frame rate of the final product.
The games and companies this document names on the inner ring, other documents about them on the outer one. Select a cover to see it up close and open it in a new tab; drag to move, pinch or Ctrl + scroll to zoom.
Game Dev Unchained · 2025
Comments