Return to “Technical”

Post

some rambling about collison detection

#1
just a small ramble about making collision detection a bit more efficient.

overlay the system with an square grid (or cubic if the z axis object spread is pronounced enough)

overlay this grid with an second one of the same resolution but shifted half an structure with
that the midpoints of the one grid are in the place of the vertices of the other grid

now sort objects into this grid based on their position
every object is in 1 space of every grid (every object has 2 grid-indices)

now we only need to check objects for collision which are sharing one of the 2 grid indices.
sucessfully reduced amount of objects we need to check for collision

(nothing ground breaking, just wanted to post it here in case of it is helpful)
Post

Re: some rambling about collison detection

#2
This is fairly close to how it already works ;)

Broadphase isn't really the problem though - the problem is that with 100+ ships flying very close to asteroids, there are a whole lot of narrowphase checks that need to happen, no matter how fast the broadphase is. Just needs optimization :)
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: some rambling about collison detection

#4
the best approach would be the Dual Bounding Volume Hierarchy.

the computation time is formulated like this:

T = Nv * Cv + Np * Cp

where
T: total execution time
Nv: number of bounding volume pair overlap tests
Cv: time for testing a pair of bounding volumes
Np: number of primitive pair overlap tests
Cp: time for testing pair of primitives


This has proven to be the best approach at collusion detection on a massive scale.


source:
Post

Re: some rambling about collison detection

#6
Another random thought:

Is there some possibility that using alternative, not classic triangle based collision detection methods could provide an advantage?

As the ships are based around distance fields there must be an analytic way of seeing which ships are colliding and which are not.
As you could test whole sub-sections of models against each other instead of single polygons.

Online Now

Users browsing this forum: No registered users and 4 guests

cron