In the BGE there’s too many problems with frustum culling in case like:
- replaced mesh
- deformed mesh
- skinned mesh
- physics shape re-instanced (including soft body)
To solve it we can recompute the AABB in these same case, it will avoid culling error but for skinned or soft body object which are deformed each frame and recompute its AABB each frame too, it can spend too much time.
So to solve this we can implement a predefined AABB in the UI side which take the AABB of an other mesh, and in the python side expose to the user the AABB.
So in the UI 3 options will be added :
- ignore activity culling (already half implemented) avoid culling for drastic case
- update AABB : don’t update AABB, corresponding to the old behavior
- predefined AABB (mesh) : mesh used as AABB, disable if ‘update AABB’ is enabled
In the python side:
- KX_GameObject.cullingAabbMax/Min : the AABB r/w
- ignoreActivityCulling : r/w
- updateAabb : r/w
- synchronizeAabbs() : recompute the object AABB, can be use to undo cullingAabbMax/Min
So the question is : it can be interesting or i’m in the wrong way ?