Jump to content
  • Advertisement
Sign in to follow this  
Kasya

Scene Management

This topic is 3083 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've just sketched a design for a scene management with scene graphs and octrees/quadtrees. Just wanted some advice before i get to implement that system. Here is the design: there is a generic TreeNode structure. Then there are render objects: class Entity : public TreeNode class Skeleton : public TreeNode class Light : public TreeNode class Particle : public TreeNode etc. class Octree { List<TreeNodePtr> nodes; void update(real time); }; class SceneGraph { List<TreeNodePtr> nodes; void update(real time); }; class Scene { Octree octree; SceneGraph scenegraph; }; the render objects are classified to stay in SceneGraph or Octree or both: void Scene::addEntity(Entity * entity) { octree->addNode(entity); scenegraph->addNode(entity); } void Scene::addSkeleton(Skeleton * skeleton) { scenegraph->addNode(skeleton); } etc. void Scene::update(real time) { scenegraph->update(time); octree->update(time); } in scene graphs the node's transform data is calculated relative to parent. in octree the node's collision data, cull data are calculated and executed depending of the current node, Obstacles etc. Then the Renderer Renders the final, altered data. Is that a good design? Another question about SceneGraphs: Suppose, I have a large island like in Just Cause 2. if im at one edge of that huge island and the citizen or soldier is at another edge of the map, does scene graph need to update its position, current animation cycle or octree need to update its collision data etc.? Thanks, Kasya

Share this post


Link to post
Share on other sites
Advertisement
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!