Limit on Model's Geometry Count


#1

Before I assume that there isn’t one, does anyone know if there is a limit on the number of geometries a model can have?


#2

That really depends on your scene, and what your trying to do, and the system your running on.


#3

There’s always some limit somewhere. When in doubt, probe. (and/or ask of course)


#4

The geometry count (and other loops or data structures related to it) use 32bit unsigneds, so the theoretical upper limit is‭ 4294967295‬.

In forward lighting there’s an optimization that combines the first light and base pass, which needs a bitfield that also uses a 32-bit value, so the optimization can only be used for the first 32 geometries / batches. Based on that using more than 32 can’t be recommended, unless you’re using deferred lighting.

In general the lower the better, you always pay in performance for more geometries, as the engine needs to do more bookkeeping and issue more draw calls.