Sign in to follow this  

scenegraphs, space sims, data structures, oh my

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

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