Jump to content
• Advertisement

[DirectX 10] How to create a bounding sphere around a group of objects

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

I want to know how to create a bounding sphere around a group of objects.
So I can create a bounding sphere for each of my nodes...

Thanks in advance...

Share this post

Share on other sites
Advertisement
Maybe just calc a AABB which includes each Objectcenter and then from Center to corner + (maxradius of all objects) ?

Greets

Share this post

Share on other sites
Using the corners of AABB's or OBB's such as KanTeH suggested is certainly a good and fast way to do this.

If you don't care about good real-time performance and you want to calculate the smallest possible bounding sphere instead:
- Find the center of all vertices in question, use it as the center of the bounding sphere.
- Use the distance between the center and the vertex furthest away as the radius.

Share this post

Share on other sites
Quote:
 Original post by KanTeHMaybe just calc a AABB which includes each Objectcenter and then from Center to corner + (maxradius of all objects) ?Greets

I dont believed that will work, because if I create an AABB which inclues each object center certain parts of each object will be outside the Bounding Sphere right?

Share this post

Share on other sites
Quote:
 if I create an AABB which inclues each object center certain parts of each object will be outside the Bounding Sphere

A simple approach would be to determine the minimum X,Y,Z values from all the AABB minimum X,Y,Z values. Similarly, determine the maximum X,Y,Z values for all the AABB maximum values.

That defines a new AABB which should bound all the AABBs. Calculate a bounding sphere from the new AABB. Note: that may not be the minimum bounding sphere.

Share this post

Share on other sites
Thanks. I will use your approach :D.

Share this post

Share on other sites
Quote:
 If you don't care about good real-time performance and you want to calculate the smallest possible bounding sphere instead:- Find the center of all vertices in question, use it as the center of the bounding sphere.- Use the distance between the center and the vertex furthest away as the radius.

Unless you mean the Euclidean 1-center, that's not true. You can find more info on the subject here.

Share this post

Share on other sites

• Advertisement
• Advertisement

• Popular Contributors

1. 1
Rutin
41
2. 2
3. 3
4. 4
5. 5
• Advertisement

• 16
• 18
• 12
• 14
• 9
• Forum Statistics

• Total Topics
633360
• Total Posts
3011524
• Who's Online (See full list)

There are no registered users currently online

×

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!