Archived

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

sphere trees and collision detection

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

what i have in mind(probably not the first) is to partition my models with an octree and then generate a sphere that contains each node in the tree, after a few levels, the spheres should approximate the mesh pretty well, and then i can go into a mesh/mesh collision if i need the accuracy. my concerns are how fat the "Actor" object is going to be (from a data perspective), and when i get to animation, how i will make the tree dynamic. i chose spheres because of the ease of update, but it looks like im going to have to scale my octree dynamically and rebuild my sphere tree during animation. if anyone has encountered this issue before or has some insight it would be helpful. Dredd ________________________________________ "To die with your sword still in its sheath is most regrettable" -- Miyomoto Musashi

Share this post


Link to post
Share on other sites
maybe define your model with all kinds of primitives including spheres. it really depends on the model. attach the primitves to the bones of the model. when you do any kind of transformations they will follow. from a data perspective, primitives dont take up a lot of space as they all really can be defined with a few params. this is just a suggestion tho!

Share this post


Link to post
Share on other sites
on octree on a dynamic model?!? That''s really pushing it You''re aware that in most games, characters are often modeled by a single large box? Except ragdolls, which are a collection of boxes or other primitives.

If you have an octree per keyframe, it''s gonna be megabytes, unless you run-length encode the levels and all that jive.

Having a set of primitive per bones (like a couple of spheres) seems much more sensible. When you test for collision against the environment, get the polys near the player, and test all the spheres against those polys. If you cull through the static geometry with the spheres one by one, it''s gonna be terribly slow.

Share this post


Link to post
Share on other sites