Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Occluding out what we really can't see. Occlusion baking is a terrific way to save draw calls. I've gone through my scene, untagging objects that have transparent shaders to make the occlusion work a little more smoothly. I've turned off the screen and the window glass, as well as the railings from being static. And this way they occlude correctly. Or rather, we can see through them properly. Some buildings are more of a hit in draw calls than others, especially when they've got more windows in the outside. If we were doing this scene that was all concrete bunkers, for example, we'd get terrific occlusion curling but at the price of well, not too many windows.
So it's a tradeoff in here between the design of If we were doing this scene that was all concrete bunkers, for example, we'd the game and the amount of culling we can do. Keep this in mind, that if we can limit get terrific occlusion curling but at the price of well, not too many windows. down the view in any chance in our game design. We should, because it provides a way to optimize performance. We should be able to do it through design, not merely a brute force approach of just putting a wall on. But instead thoughtfully thinking about how far we can see in the game as a method of designing our way out of excessive draw calls.
What we'll see is a lot of batching taking place. We should, because it provides a way to optimize performance. Now that we're dealing in occlusion culling. We should be able to do it through design, not And also, once we're batching our pre-fabs. merely a brute force approach of just putting a wall on. I'll choose Edit and Project Settings. But instead thoughtfully thinking about how far we can see in the Here in the Project Settings, you've got the different quality game as a method of designing our way out of excessive draw calls.
settings for our different components, such as physics and so on. What we'll see is a lot of batching taking place. I'll go under Player. And what we can see is when we Now that we're dealing in occlusion culling. scroll down here in the standalone under other settings. And also, once we're batching our pre-fabs. We have our static and dynamic batching. I'll choose Edit and Project Settings. I'll turn on static batching. Here in the Project Settings, you've got the different quality What this lets me do is take objects that are declared as prefabs and marked as static and batch them together to reduce draw calls. I'll take a look at it first, looking at the statistics in the game window, before I turn on static batching. In the game window, I'll make sure that statistics are up, clicking on statistics and maxing on play. I'll press Play and see how that looks. My game definitely looks better with the occlusion culling optimized. Right now I'm saving by batching at the most about 600 or so. It's still a lot of culls, but I can optimize it further. Now, turn on static batching. It'll take a minute. And then I'll have static batching in my game. I'll press Play again and we'll see how it looks. I'm still seeing about the same reduction, but it's definitely saving some draw culls the farther back I get and the more I see. Between the batching and the occlusion, we can save a lot of draw culls. This will change radically depending on where I go and what I see in here. We can see that I'm saving a lot of
draw calls by batching when I'm dealing in like objects. Between the batching and the occlusion, we can save a lot of draw culls. So obviously, this is situation specific. This will change radically depending on where I go and what I see in here. It depends on what we see and how many prefabs We can see that I'm saving a lot of are instanced through here versus how many unique objects we're seeing. That number changes radically when we get outside. There's more and more unique things visible, and we can really see where batching takes a hit in some places. This really starts to max out the batching. Where looking across the railings and the bridge here for example, we see a lot of the same kind of objects and we're able to batch a lot of them together. The scene is really starting to come together. And through some careful attention in how we're building, we can really economize how it's playing.
Get unlimited access to all courses for just $25/month.Become a member
107 Video lessons · 33029 Viewers
94 Video lessons · 22901 Viewers
78 Video lessons · 9223 Viewers
147 Video lessons · 3069 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.