• Advertisement
Sign in to follow this  

Bounding box for skinned meshes

This topic is 3840 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

What are the most common approaches for calculating the bounding box of animated skinned meshes? The first ideas coming to my mind: 1) Skinning the mesh in software and calculating the bounding box from it. PRO: Almost exact bounding box CON: Inefficient for many reasons 2) At precalculation time, skinning the mesh for N poses, calculate the bounding box for each. At runtime, use the maximum bounding box of all poses or approximate (how?) the bounding box for the current pose from the precalculated ones. PRO: Fast, good approximation CON: Higher memory consumption, doesn't work for procedural or physics-based animations. 3) Use an artist-created bounding box that emcompasses all the poses that will potentially appear in-game. PRO: Fast CON: Finding a good bounding box requires lots of tweaking. Any ideas?

Share this post


Link to post
Share on other sites
Advertisement
You might use a bounding sphere around the base bone with radius = maximum length of attached bones (let's say base = hip. Maximum length might be: max distance to shoulder + length of both arm bones + length of hand).

If your mesh will be able to rotate method 3) would result in a bounding box that encompasses the sphere in order to encompass all possible animations.

PRO: fast, easy calculation
CON: might result in a bigger bounding volume.

You could use that sphere for early-out tests and use a bounding volume hierarchy for positive collision tests (e.g. with a bounding box for each bone).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement