Sign in to follow this  

I want to get boundingbox min max of a skinned animation mesh

This topic is 3292 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

Not sure there's a function for that...

My suggestion is obtaining the bounding box for every frame, grab the coords of each vertex, and then compare all those vertices, keeping the ones that make the biggest cube?

Not sure I explained that clearly...

Share this post


Link to post
Share on other sites
yes but i can get the bounding box min and max of a static mesh with no heirchy but not with a mesh with frames ,there must be some way to the min and max of the whole mesh just like you can with a static mesh

Share this post


Link to post
Share on other sites
This is an interesting problem, but I'm not sure there's a nice solution. As far as I can see, there are four options:

1. You can software skin all the positions and normals, performing a min/max on all positions to obtain perfect bounds. I do this on the PS2 and Wii (in optimised assembler of course) only because I have to software skin on those platforms anyway.

2. You can determine the maximal object space bounds (offline, in a tool) by animating the skin with every animation that it'll ever use, performing step 1 with each animation frame. Painful and slow to say the least. At runtime you'll need to transform the object space bounds to world space as required.

3. Estimate the bounds of the mesh (in object space) and transform into world space as required. There may be issues with applying animations that occassionally cause the verts to go outside your estimated bounds, but this shouldn't be too problematic (except if you need exact bounds like I do on PS2).

4. I pre-process the skinned mesh and determine the maximal distance of any vertex from its weighted bone. I store this in my skin structure as a "inflation radius". At runtime, I determine the bounds of the positions of the bones (using a simple min/max algorithm) and then inflate this box using the "inflation radius". This is seemingly the best compromise of speed versus accuracy (for my data anyway).

Hope this helps?

Share this post


Link to post
Share on other sites

This topic is 3292 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this