Sign in to follow this  

MD3 Model BB calculation

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

hello! I want some help. How can I get the bounding box of an MD3 model? I the BB to be calculated for each model and not define it by hand. But the md3 models has not actual vertex coordinates. but they have some matrices that transform the md3 parts of a model (upper, head, torso). How can I calculate the BB for the whole model? thanks in advance!

Share this post


Link to post
Share on other sites
Do the same transformations as if you were rendering and use the transformed vertices to calculate the bb.

A bb can be defined as 2 vectors: bottom_left_back and top_right_front. Compare the current vertex's components with these vectors and adjust the bb vectors accordingly.

You should probably do it in your rendering loop so you don't loop and transform twice. This bb that you compute can be used for the next frame for collision and stuff (even if the next frame will have a slightly different transformation the difference between two frames should be very small so you can use the previous bb for the current frame).

Share this post


Link to post
Share on other sites

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