Jump to content
  • Advertisement
Sign in to follow this  
snowblind329

scenegraphs, space sims, data structures, oh my

This topic is 5026 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'm pretty unfamiliar with data structures used in scenegraphs for 3D games. Basically I'm interested in nothing too heavy duty, just semi-smart culling of objects. Our player will be flying around in a space ship--and space is relatively sparse. In one "sector," there might be a planet off in the distance, a looming rotating space station, asteroid field off in the distance, and various other ships milling about. I'm looking for the most intelligent way to divide up all that space, for both rendering and collision detection. Most importantly, if the player isn't facing towards the space station, don't draw it. I'm thinking the easiest method would just be to define a bounding sphere with each "Renderable" object. But does anyone have any experience in this area? What would the base class for a Renderable look like? Should everything be a tree? Should model data and bounding information be tightly coupled?

Share this post


Link to post
Share on other sites
Advertisement
If you have quite few objects, just having a sphere for each object that you can cull against your frustum would works nicely.
If you have many objects this will be slow, and then you should look into some kind of tree-structure (oct-tree:s or probably loose oct-tree:s).

A sphere is easiest defined by a position and a radius. :)

Good luck!

Share this post


Link to post
Share on other sites
Quote:

I'm thinking the easiest method would just be to define a bounding sphere with each "Renderable" object. But does anyone have any experience in this area? What would the base class for a Renderable look like? Should everything be a tree? Should model data and bounding information be tightly coupled?


in a space simulation the (*)best method, just chuck a boundsphere/box around each object and do indiviual tests. u wont see any speed problems up to 1000 objects, if u have places with 1,000s objects in a spot (eg an asteroid field) u might wanna chuck a bounding sphere around that first.

(*)space is typicaly sparse thus space partitioning methods (pardon the pun) arent normally the best

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!