#Frustum Culling Job

1 messages · Page 1 of 1 (latest)

low dune
#

Backstory:

So I have a game with millions of individual entities being rendered using Entity Graphics. Only X number are on the screen at a time, as my camera is "isometric" (using the term loosely since it's a very specific term).

I want to zoom out and show potentially all entities (tbd as I would need hierarchical LODs or something probably), but also want to zoom in and show very few. When I show very few, my performance obviously goes up, but it's still quite bad.

Actual Question:

The profiler shows that the Frustrum Culling Job is taking roughly 30ms to complete. Is there a way for me to batch my entities into chunks for the frustum culling job to have an easier time digesting when it should or should not render entities?

Or is this a job left up entirely to me, where I would determine a chunk of entities should be "switched off" so the frustum job simply skips over them?

dry girder
#

hmm i'd have to check but i think unity already does frustum culling per chunk

#

at least uses it as a first pass optimization

#

so yeah if you grouped entities together that were close might help

#

but obviously there are other things you could do, like just merge entities and use lods to turn entities out of range off

low dune
#

I am trying to avoid combining entities together so I can still move things individually.

#

I think the only time I will have no choice is when I am zoomed out so much that I am overwhelmed with trying to render too many entities at once

#

My other idea is to just keep track of where the camera is looking myself.

Like, "camera is in cell B7 at X zoom level, shut off all entities in cells blah blah blah"

Currently not storing what cells contain which entities, but I could start doing that if I have to.

sand jackal
sand jackal
dry girder
#

but you can also just disable MaterialMeshInfos, it's enablable