I've had a bug reported where brush models can occasionally disappear. It was originally in APSP1, but I've also observed it myself in the Marcher Fortress. In both cases these are extremely large brushmodels (such as an extremely tall elevator).
Going back to the original 1.0 of DirectQ reveals that the bug also manifests there; I would assume that it's likewise present in other engines, but I haven't fully tested.
The bug is PVS related; sending all entities to the client irrespective of PVS resolves it. Expanding out the fatness of the fatpvs also resolves it, although I don't view this as a solution, as the amount varies per map, per entity, and depending on the distance from the client POV. However, this did get me to add an "sv_pvsfat" cvar to enable control over this factor, which may be a handy feature for mappers.
Further digging reveals that the actual cause is the entity being in too many leafs; if we hit the value of MAX_ENT_LEAFS before we hit any leafs that are in the current PVS, we'll see the symptoms. This is one internal maximum that I hadn't yet addressed in DirectQ, so it's now becoming a priority. The default of 16 is normally fine for most models, but when one goes beyond basic ID1 functionality in a map, abberant circumstances such as this occur. Nonetheless, it's good to push boundaries sometimes, and the end result will be a more capable DirectQ.
Simply bumping the value of MAX_ENT_LEAFS is one method of handling this, but I think I'm going to go for something a little more flexible (and less wasteful of RAM).
It's fixed.
As a side effect I was able to remove the MAX_ENT_LEAFS hard limit entirely, and make the entity-leaf-touch routine a lot more optimised.
I love bugs like this that result in good stuff all round.
2 comments:
Sweet. :)
That issue came up with Fort Driant recently too: http://www.celephais.net/board/view_thread.php?id=60310
Still some brushes disappearing in it, but it doesn't seem as bad as that thread makes out.
Post a Comment