Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

atcdevil

dynamic scenes

This topic is 5223 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 trying to make a game and would like to have dynamic scenes with things such as: moving platforms, rotation fans, an escalator. What is a suitable type of scene graph for this? (I''ve heard BSP''s are only good for static geometry)

Share this post


Link to post
Share on other sites
Advertisement
You have a couple of choices really. The first is to treat the dynamic geometry completely seperate to the static geometry i.e. you simply create a list of the objects that can move(possibly ordered in a heirarchial tree) and then whenever an object needs to move, simply check for collision against the static geometry as you would for any other object. The second choice is to use a unified representation - You''re right that BSP''s aren''t a good choice for this, since inserting and removing objects is a costly operation, and can result in degenerate trees due to splitting. The alternatives you want to be looking at are ''loose'' structures. Basically these divide the world into a number of uniform partitions(the shape depending upon the exact tree type), but you actually allow them to overlap, so to deal with dynamic objects, all you simply do is expand the bounding volume of the current node, as the object moves. Now when this growth exceeds some predefined threshold, you simply then return the node it belongs to currently to its original size(or one that encompasses any other dynamic objects currently in the node) and then attach the dynamic object to whatever node it has moved across into - and repeat the progress. You''ll find quite extensive discussions on these topics if you search for threads on loose Octrees, BSP trees(mainly explaining why NOT to use them) and ABT(Adaptive Binary Trees).

James

Share this post


Link to post
Share on other sites
For the most part, you should handle dynamic geometry as if it were any other dynamic actor in the world; that is to say, you should treat it like a mesh.

Share this post


Link to post
Share on other sites

  • 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!