Jump to content
  • Advertisement
Sign in to follow this  
Unreal

MD3 Model BB calculation

This topic is 5056 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!