Rigged Meshes, Bounding Boxes and Frustum Culling

I recently realized that by default, the bounding boxes of rigged geometry don’t get updated when the joints move or rotate. This can lead to geometry disappearing while it’s still in view.

I’m currently avoiding this by setting alwaysSelectAsActiveMesh to true on all my rigged meshes, which is probably not be the most efficient solution, though maybe it’s okay for my relatively small scene. I also know I can call refreshBoundingInfo() whenever I want a mesh to update its bounding box, but I’m not sure if it makes sense to do so for every mesh at every frame, or if it’s worth adding logic to only do it for visible meshes and meshes that have been deformed / moved by joint manipulations since the last update.

My questions are:

  • What are others’ recommendations on a simple and performant way to update the bounding box info of the appropriate rigged meshes only when needed?
  • Is there any performance advantage to updating alwaysSelectAsActiveMesh to be true or false according to a mesh’s visibility property, or is that pointless?


I will HIGHLY recommend to simply use alwaysSelectAsActiveMesh
The perf toll is almost invisible


That’s great to know, thanks!

What you can also do is setting a bounding box that is large enough to encompass all the frames of all animations. It could be a large box, but you will still get some culling if the box is not in the frustum view.

1 Like