#[Solved] Occlusion culling and general weirdness

1 messages · Page 1 of 1 (latest)

woeful sonnet
#

I wanted to make occlusion culling work with my terrain, so I made another terrain model with the exact same amount of triangles but this time split it into 256 chunks. There are a number of weird things going on that I don't understand.

  1. Triangle count in unity is a lot higher vs blender
  2. Triangle count is a lot lower for some reason on the new mesh even when I'm looking at the chunks at once
  3. Occlusion culling seems to be working whether I have it enabled in the main camera or not. Could this be due to Cinemachine?
  4. The stats panel is showing a lot of batches (200 - 400) for the new model even though the frame analysis window shows it happening in a single SRP batch. The shader is compatible with the SRP batcher. Should I be worried about all these batches? AFAIK SRP batches are still all separate draw calls. Is there a way to render the whole mesh with one draw call?
  5. With the unified mesh I had one mesh collider, now I have 256 smaller ones. Should I be worried about this?
rocky thistle
#
  1. triangle count in stats shows the total triangles from all the draw calls AFAIK, including shadow, depth and other passes, while blender only the number of unique triangles in the scene.
  2. Related to 1 - there's likely a difference in render passes.
  3. No sure. Haven't used occlusion culling that much.
  4. Stata window is not very reliable for batch count in SRPs. Use the frame debugger. Worry about them only if there is a cpu bottleneck related to batches count that you confirmed via the profiler. You generally can't draw separate meshes in one draw call. The only possible way is some custom indirect draw call which would take a lot of setup and unlikely provide much improvement beyond the SRP batcher. It might also increase the overhead on the GPU side.
  5. It could technically introduce seams as well as affect performance depending on the context and other factors. Maybe test and see if there are any actual problems.
brittle tapir
woeful sonnet
woeful sonnet
brittle tapir
# woeful sonnet You're right, I was confusing them. Frustrum culling was the only one working as...

That is very common confusion since the occlusion system visualizes objects behind the camera not rendered even though frustum culling takes care of that anyways. I have seen many tutorials too confusing the two so it's no wonder it get's confused a lot. Figuring out whether something is completely behind other object is really difficult problem to solve properly, figuring whether something is within the camera frustum is relatively trivial hence it's always enabled