Re: incremental triangulation for 2D collision detection broadphase

[email protected]
Newsgroups gmane.games.devel.algorithms
Message-ID <OF951D986F.3E3003EE-ON802576C1.0058E69A-802576C1.00594CF9@scee.net>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi Samuel,

At first glance this approach seems pretty complex and expensive for a 
broad phase? I can't see how you can do this without triangulation and 
thats not a cheap operation. Even then, you have to intersect polygons 
against AABBs which is actually quite a costly operation - not that far 
away from a full narrow phase.

I would recommend sweep and prune, or multi-sweep and prune if your worlds 
are huge. We used sweep and prune in little big planet psp and it worked 
quite well.

Just my 2p :)

Cheers, Paul.

Samuel Moll <[email protected]> wrote on 03/02/2010 14:38:46:

> @Ben: Thanks for the link, but I wanted to avoid doing full Delauney
> triangulation since everything remotely Delauney-like suffices for
> me... but I can probably use some of the methods in this paper.
> @ Erwin: Thought I read somewhere that Box2D uses a hash... but the
> source code looks alot like a AABB tree ;)
> 
> 
> But I think I found something better, because I realized that I don't
> really need a triangulation, only some partition for example using
> polygons...
> 
> Okay, here's the outline to my approach:
> Every objects center is a "node", around the node is this objects
> bounding volume (I think I'll use circles).
> Then you build a graph that partitions the plane into (convex and
> concave) polygons (You could make the graph so that only triangles are
> used). On every corner of a polygon is an object, no object is on the
> inside of a polygon.
> 
> Now you test for every object which polygon its bounding volume
> intersects. Obviously it intersects at least all polygons adjacent to
> its node; if the bounding volumes are relatively tight, it should not
> intersect more than these.
> I think the average number of bounding volume tests for each object
> should be around 6.
> 
> Now all nodes move, and if the graph changes its topology, it needs to
> be repaired. This is the part where I have no concrete algorithm
> yet... but I guess I'll find one. I'm relatively sure that this step
> should be fast ;)
> 
> Then the graph is optimized: a few edges are swapped, inserted etc. to
> avoid slivers and such. This should be easy.
> 
> Greets,
> Samuel
> 
> 
> 
> On Wed, Feb 3, 2010 at 6:39 AM, Erwin Coumans <[email protected]> 
wrote:
> >
> > Hi Samuel,
> >
> > Box2d uses a dynamic AABB tree for the broadphase, based on the 
original
> > implementation from our Bullet library in 3d.
> >
> > This tree is incrementally updated, faster than sweep and prune.
> >
> > No spatial hash.
> >
> > I'm interested in your approach. How do you 'triangulate' the centers, 
and
> > compute connectivity?
> >
> > Thanks,
> > Erwin
> >
> > Feel free to forward this to the list, I cannot mail to the list 
because of
> > mail server issues.
> >
> > Sent from my iPhone
> >
> > On Feb 2, 2010, at 16:54, Samuel Moll <[email protected]> wrote:
> >
> >> Hello all,
> >>
> >> I need a broadphase collision detection algorithm for 2D rigid body
> >> physics (continuous collision detection, but that shouldn't matter 
for
> >> the broadphase...).
> >>
> >> I have objects of wildly varying sizes, lots of free space and
> >> possibly lots of clustering or even a single object very far away 
from
> >> all the others, so a Quadtree (without some strange modifications,
> >> wrapping the world came to mind) is not the best option.
> >>
> >> What I came up with is to take all the objects positions and
> >> triangulate this point set. Then for each triangle I determine which
> >> objects it overlaps and test all these objects for collision.
> >>
> >> This has a number of advantages, and I believe it could be 
competitive
> >> to sweep and prune or Quadtrees (at least in 2D, in 3D its probably
> >> not cool, but who knows?). I couldn't find anything about this 
method,
> >> but if somebody already invented it I'd appreciate some pointers.
> >>
> >> What I need now is an (efficient :D) algorithm for updating the
> >> triangulation when the points move. i.e. given a valid triangulation
> >> (no triangles overlap, triangulates the convex hull of all points) 
and
> >> movement vectors for all points, how can I "repair" the old
> >> triangulation?
> >>
> >> The first part of the problem is how to maintain fat triangles
> >> (slivers lead to poor collision rejection). I'm sure there are 
already
> >> good algorithms to incrementally maintain a good triangulation, but I
> >> couldn't find them. Also, the union of all triangles must stay 
convex.
> >>
> >> The second problem is how to detect and remove triangle overlaps that
> >> arise due to fast-moving objects. I have no idea how to do this
> >> robustly (theoretically, the points could teleport arbitrarily)
> >>
> >> I guess somebody already has solved this problem, but I could find no
> >> relevant paper...
> >>
> >> Of course I'll release the finished implementation as open source, or
> >> try to incorporate it into Box2D if they want it and if it proves
> >> faster than their existing spatial hashing ;)
> >>
> >>
> >> Sincerely,
> >> Samuel Moll
> >>
> >>
> >> 
> 
- ------------------------------------------------------------------------------
> >> The Planet: dedicated and managed hosting, cloud storage, colocation
> >> Stay online with enterprise data centers and the best network in the
> >> business
> >> Choose flexible plans and management services without long-term 
contracts
> >> Personal 24x7 support from experience hosting pros just a phone call 
away.
> >> http://p.sf.net/sfu/theplanet-com
> >> _______________________________________________
> >> GDAlgorithms-list mailing list
> >> [email protected]
> >> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list
> >> Archives:
> >> 
http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list
> >
> 
> 
- ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the 
business
> Choose flexible plans and management services without long-term 
contracts
> Personal 24x7 support from experience hosting pros just a phone call 
away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> GDAlgorithms-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list
> Archives:
> 
http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list

**********************************************************************
This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. 
If you have received this email in error please notify [email protected]
This footnote also confirms that this email message has been checked for 
all known viruses.
Sony Computer Entertainment Europe Limited
Registered Office: 10 Great Marlborough Street, London W1F 7LP, United 
Kingdom
Registered in England: 3277793
**********************************************************************
P Please consider the environment before printing this e-mail

-----BEGIN PGP SIGNATURE-----
Version: PGP Universal 2.9.1 (Build 287)
Charset: US-ASCII

wsBVAwUBS2xEHXajGqjtoMHxAQi/iQf+LA826T+HJfDyYpXe89DM3tx1H9bBBbME
ND94GJj6Gbd93YNNgfXfYQV1kkyKKE+jyRG0IrQmrd3UaKIb2176hHkRfeDtmuJQ
LH9W45L9ePp9kLYqadveQv0CKME8Vy9Bg9MlmTtDYp56eLUa7A0uUHVFmRaJmExK
AgmZLio9fiuR14bUqHXXik50Wk7kwXcOt0sWQqSO0HPmXyLFGgCRiNF1TSzxjPZA
hK7dbKzoS772s6UyT6QHqeD3B5XE6J4cJCY0utNNxMeNCcVUaP0CcS+5//IlfGZn
ZcFZOvLJGoY2Mt9h1JDFWY3blmWLla+7mrGWWAag7aqCdtg2U02pYQ==
=pGyB
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
GDAlgorithms-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.