[Studio Beta] Introducing Occlusion Culling

Also wondering if this could be used as a way to block esp? When avatar occlusion comes out

3 Likes

The only part that didnt work was the lag it caused, as I had no idea how to write my own occlusion culling lol

We have discussed exposing whether something is occluded. We don’t have any plans yet, because it is trickier than it sounds. For example:

  • It only knows about what’s in the frustum. If a character is off the side of the screen, it doesn’t know if it is behind a wall or in plain sight.
  • A character that is occluded may cast a visible shadow. We don’t detect that. Should that character be considered hidden or not?
  • Performance/quality tradeoffs mean that we cannot always detect when something is occluded. It’s natural for scripts to assume that this query would mean either “yes it’s hidden” or “no it’s visible”, but in reality the test would mean either “yes it’s hidden” or “I’m not sure whether it’s hidden or visible”.

For your other question, occlusion culling should just work. It tries to dynamically adjust itself to never be the bottleneck. This is to handle different hardware, different workloads, and even different scenes in a single experience.

I know how important it is to hit performance targets, and I know how tedious it is to babysit visibility systems. Babysitting visibility takes time and isn’t fun. But, it also means you’re less likely to make changes that are good for your games, because it’s too much work to redo all the visibility! You also don’t have time to fine-tune visibility parameters for every scene on every device, so you’ll have to make approximations, and those approximations may grow stale as your experience develops over time.

Believe me, it would’ve been a lot easier for us to expose the parameters and make developers deal with them than it was to do it automatically! But we think that isn’t what’s best for you or for your players.

So, we’d prefer to let you all spend your valuable time on making your games fun and engaging, not on trying to tweak visibility parameters. I totally believe that you could tweak the parameters better for specific scenes and devices! But, we can get close automatically for all scenes on all devices, and you don’t have to worry about missing any problem cases, and you don’t have to worry about breaking anything when you make changes. This all frees you up to do more fun and important stuff for your individual games.

14 Likes

This is fantastic!
Not only it represents a huge leap in how developers work but it also opens several possibilities of connection between users worldwide no matter what device they’re using (as long as it’s compatible, of course… :sweat_smile:).
Big props to the Engine team for providing us with this, congratulations! :heart:

1 Like

I’d have to look into your specific case to know for sure, but I suspect the building meshes in the first scene are too detailed for use by the occlusion culling system. If you’re curious, you can see some of my other replies for more info!

3 Likes

You mentioned bad consequences if developers can’t control when a model is eliminated. What is your specific concern?

This really should work like the depth buffer on the GPU. The GPU uses the depth buffer to skip drawing a model that is behind stuff you’ve already drawn. Occlusion culling is like that, but even earlier, so it saves more work. Also like the GPU depth buffer, it doesn’t change what models are loaded or what gameplay occurs.

If the GPU depth buffer can eliminate a model, then there should be no observable difference if occlusion culling eliminates it earlier, except that you may get higher frame rates.

5 Likes

We have noticed that players using automatic quality can get bumped to a higher quality because occlusion culling improves their performance.

5 Likes

I cannot tell from the screenshots what is going on. My impression is that the big purple thing should cull most of what’s behind it. Do you have a repro case?

Oh, fast clusters don’t get culled yet! That’s still in progress due to boring internal engine details. That’s probably what’s happening here.

3 Likes

The best improvement so far, to make lag a thing of the past.
However, it seems like when I’m standing in a room made of parts and meshes.
The buildings outside still get rendered which is a meshpart.


Hope to see it soon at Roblox ( i neeeeeed it )

5 Likes

Do you plan to share what those requirements are for objects to be considered occluders by the engine?

I get ya, but the idea of always offering ONLY automated features with next to no controls exposed to us for the sake of trying to have developers focus less on things like this will only hurt developers in the long run. I have no issue with you guys providing automated features like this, my issue comes from the fact that the automated features with zero control are the ONLY things we get.

It’s insane to believe that it’s possible for developers just to “skip” X Y and Z parts of game development. This idea roblox has does not really do much to help developers and only serves to hurt them more in the long run as ive said. How much should we just blindly trust the magical automated roblox features? So far a lot of them have already proven ineffective and straight up unusable all because they serve to function within magical parameters designed by people at roblox, you yourself should know that specific things (Like the AAA shooters youve worked on) need quite a lot of care and attention specific to THEM. My primary example of those roblox systems proving to be ineffective would be Streaming. Second example would be all of the AI features roblox added, those only serve in wasting other people’s time due to how limited and scuffed their models ultimately are.

Oh, and let’s not forget the fact that this belief of roblox is something they themselves can’t really hold consistently. Just last week roblox announced how they want to force us to rip out all of our chat systems just to use theirs. That’s not exactly something that can be done automatically nor it is allowing developers to focus specifically on game content alone.

Again, i get you and i do agree that micro managing and micro changing one thing 500 times for hours to maybe even days can be super annoying to even barely at all productive. However again, not allowing developers to get the most they can out of the tech roblox provided only serves to hurt developers more, all for the sake of really just straight up forcing them to focus on raw game content alone.
Again, i have no issue with the fact that you guys provide new automated features, my issue comes when said automated features are the one and only options.

8 Likes

I’ve locally fixed the scale used by special shape spheres and cylinders. It’ll be out in about 2 weeks. Thanks again for the simple repro, that made it very easy!

6 Likes

Hello, I found that studio will sometimes crash when changing mesh id (any mesh) when occlusion culling is on
This is an old issue that existed prior to beta release

image

11 Likes

AMAZING WORK! One of the most important features in any engine, this will severely increase the performance of games!

2 Likes

Does it make sense to place large occluders hidden within the walls / buildings of a map to help the occlusion system?

1 Like

Finally Roblox is improving performance. I hope these kind of performance enhancing features keep coming out. Thank you !!!

2 Likes

Hi @Seiiyo, in this first version, terrain isn’t used as an occluder yet.

3 Likes

If occlusion culling is working in studio and you’re not seeing an improvement in performance, it could be that 1) for some reason not a lot of objects are getting culled thus not making a great difference, or 2) that your game is not bottlenecked by the drawing cost (we’re reducing the draw cost but something else that’s more expensive is holding back your frame rate).

For the first point, If you bring up the performance overlay in studio (CTRL-SHIFT-F2 on Windows), you’ll be able to tell the before/after triangles/draw calls for a specific viewpoint you want to test. This should tell you how much is getting culled.

3 Likes

Between this and Buffers, I’m really enjoy the advancements!

1 Like