Instead of looping over each vertex, just loop over each joint's animated position + some per joint radius.
OBB is better and is the common way used in all big animation system.
Instead of looping over each vertex, just loop over each joint's animated position + some per joint radius.
OBB is better and is the common way used in all big animation system.
OBB is better and is the common way used in all big animation system.
In EMotion FX I offer different ways to calculate the bounds.
1.) Based on the node's (bones) global space positions
2.) Based on the mesh vertices in case software skinning is used
3.) Based on the bone OBBs, taking all corners into account
4.) Based on the bone OBBs, taking just the transformed min and max into account (faster, less accurate)
5.) Based on a static precomputed AABB, which is calculated by calculating the mesh based AABB and then rotating the character in all directions to find the max bounds.
Number 1 to 4 are dynamic and can be calculated once per frame or at another update rate. They require the bone transforms to be known.
Number 5 is the most practical one in games. This also allows you to only process motion extraction/root motion once the character walks out of screen. You move this precomputed AABB with the characters position. This way you do not need to calculate any bone transforms when the character walks out of screen. Only the motion extraction node needs to be calculated, which can be a huge win in performance.
When using method 5, you can of course also use a sphere or capsule or any other shape.