Previously when a mesh was deformed the bounding volume or AABB was not updated and it caused some wrong frustum culling.
To fix it i added an AABB compute in RAS_MeshObject and in RAS_Deformer, which are updated each time the mesh or deformer is modified but as Moguri noticed it can spent 10% spend more time than deforme the mesh.
So the solution is to add an option to automatically update or not the AABB or use a predefined AABB based on a mesh.
It fixes T33191.
Details
Diff Detail
- Repository
- rB Blender
- Branch
- ge_aabb_support
Event Timeline
You can't remove OB_NEVER_DO_ACTIVITY_CULLING just because it's not exposed in the UI and not even mention it in the log/patch description. And even if you propose removing it (after some investigation with git blame, git log, ...), I would suggest, at the time of commit, to do it as a separate commit.
Also I would leave cleanups (such as SetMeshModified) outside this patch too.
Hey! I'm not experienced enough to review your code but do you think it can be usefull in such: http://blenderartists.org/forum/showthread.php?379862-Armature-animation-does-not-start-until-it-is-watching-the-camera situation? I wait your .blend example to test your patch and have a better comprehension of what is an AABB. A question: Can we see this box when we check "physics visualization"?... That's not really physics but it would be nice to have a button to see this box.
| source/gameengine/Ketsji/KX_BoundingVolume.h | ||
|---|---|---|
| 45 ↗ | (On Diff #4898) | This seems overkill, This needs to point to the game-object anyway, so having a separate object seems a bit of useless de-coupling. For eg, if you wanted to use a BoudingVolume elsewhere from Python. You couldn't use this class because its specifically a KX_GameObjectBoundingVolume |
- Readd OB_NEVER_DO_ACTIVITY_CULLING
- Readd m_ignore_activity_culling intialization.
- Remove python doc
- Don't compute AABB for deformers if the game object doesn't allow auto update.
- Allow conversion for non-converted AABB mesh.
- Remove SetMeshModified function modification.
