Skip to main content
GameDev.net gamedev.net
🔒 Locked

Spatial Partitions?

Started by KulSeran Oct 9, 2005 at 5:07 PM 1 replies 600+ views
Original Post
KulSeran
KulSeran
I've been trying to get my particle system working recently. One thing I wanted to do was let the particles interact with eachother. In the simplest case, they collide. The problem is you can't just loop through everything O(N^2), so an octree or the like would work, but I was thinking about the conditions where a particle can interact over a range of distances. But, i have a few questions. Each particle has a sphere of influence. Node Spheres are generated to encapsulate every set of previous level spheres that happen to touch/encapsulate. ( where is the forum faq on how to post a picture of my idea?) Then there are large spheres for visibility testing on the system, and there are set spheres that let you pick a particle, go up one level, then back down a level to all particles that are within influence range. But, how do you come up with a center and radius for a sphere that encapsulates X other spheres? [Edited by - KulSeran on October 9, 2005 7:33:21 PM]
KulSeran
KulSeran
Thanks for the response,
Now that I have an idea of how to make the bounding sphere I will try to work it out.

Quote:

3.) there are others Octtree is one of them.

This is true, but an Octtree takes a specific area like (-10,-10,-10) to (10,10,10)
and seperates it into smaller sections based on objects within that area. And if i want to check if 2 objects are colliding, I would have to check first the current grid, then find the ajacent grids and check them.

I was hopinh to make something that seperates things in space, but just gives me a list of groupings A is next to B and C, but C is next to A,B and D. So that when I check distance constraints on A I have 2 points to constrain, and from C i know i have 3 points to constrain, and there are no extranious checks between A and D, where an octree would probably tell me that there is a posibility that a check needs to be done.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.