<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/592" />

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2006-10-16T22:11:34+00:00</updated>

	<author><name><![CDATA[Real-Time Physics Simulation Forum]]></name></author>
	<id>https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/592</id>

		<entry>
		<author><name><![CDATA[Erin Catto]]></name></author>
		<updated>2006-10-16T22:11:34+00:00</updated>

		<published>2006-10-16T22:11:34+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2155#p2155</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2155#p2155"/>
		<title type="html"><![CDATA[convex hull vs polygon soup collision detection]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2155#p2155"><![CDATA[
I fixed a typo there.<br><br>What I meant to say is that you should only consider the triangle normal _and_ the hull face normals when creating contact points. You should only use the edge-edge cross product axes to rule out collision.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=12">Erin Catto</a> — Mon Oct 16, 2006 10:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[vicviper]]></name></author>
		<updated>2006-10-16T22:04:12+00:00</updated>

		<published>2006-10-16T22:04:12+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2154#p2154</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2154#p2154"/>
		<title type="html"><![CDATA[convex hull vs polygon soup collision detection]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2154#p2154"><![CDATA[
<blockquote class="uncited"><div>I dealt with this problem quite a bit.<br><br>I found a good heuristic is to consider the triangle normal and the box face normals axes contact normals. This avoids the edge-edge case, and helps with the cliff problem.</div></blockquote>What do you mean by axes contact normals? could you develop this a bit?<br><br>Right now I'm doing this:<br><br>First I test the triangle normal as separation axis test.<br><br>Then, I test the cross products of the triangle normal vs the triangle edges, but I only take the result into consideration if the resulting dot product between the triangle normal and the adyacent triangles are within some limit angle.  This seems to solve the edge-edge case too, but I need to do further tests.<br><br>The case which I haven't solved yet is the hull plane vs triangle corner, that is, when I test the hull axes alone.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=559">vicviper</a> — Mon Oct 16, 2006 10:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Erin Catto]]></name></author>
		<updated>2006-10-16T22:07:45+00:00</updated>

		<published>2006-10-12T18:11:13+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2123#p2123</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2123#p2123"/>
		<title type="html"><![CDATA[convex hull vs polygon soup collision detection]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2123#p2123"><![CDATA[
I dealt with this problem quite a bit.<br><br>As Erwin mentioned, if you only use triangle normals, then a box sitting on the edge of a cliff will be pushed off the edge. With many physics algorithms, there is a little bit of penetration. The triangles on the face of the cliff will see the box as being deeply embedded into the face. This is obviously bad behavior.<br><br>When you have penetration, there are some odd cases. Another example is a thin box sticking vertically into the floor along the edge between two triangles. In this case, an edge-edge axis will likely have the minimum penetration. But the edge-edge axis is parallel to the floor so the box will fall right through the floor.<br><br>I found a good heuristic is to consider the triangle normal and the box face normals as contact normals. This avoids the edge-edge case, and helps with the cliff problem.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=12">Erin Catto</a> — Thu Oct 12, 2006 6:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Erwin Coumans]]></name></author>
		<updated>2006-10-08T23:25:24+00:00</updated>

		<published>2006-10-08T23:25:24+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2100#p2100</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2100#p2100"/>
		<title type="html"><![CDATA[Re: convex hull vs polygon soup collision detection]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2100#p2100"><![CDATA[
<blockquote class="uncited"><div>With triangles, I test all possible axes, but In case there's a collision, I always get the triangle normal as separation axis, regardless an axis with shorter depth has been found.  This is good because it solves very well the conflicts when a convex hull collides very close to the edges of two triangles in a mesh, actually, always choosing the triangle normal as separation axis is correct 95% of the time.<br><br>The problem is the other 5%, where the correct separation axis is one other than the triangle normal (usually a cross product between a triangle and hull normals)<br><br>The question is: how to know when these 5% axes are the correct ones?<br><br>Thanks in advance</div></blockquote>Handling concave triangle meshes by performing a batch of separate convex versus triangle tests is very common, and either SAT or GJK can be used. I assume you use a culling stage (midphase) like kdop tree or aabb tree to cull triangles that can't contribute to the final results.<br><br>SAT has the drawback that it is penetration based, so the effect of hitting 'internal edges' is larger then when you use GJK, because GJK allows contact generation based on distance (using some margin). Still, both approaches can benefit from some heuristics, and using the triangle normal is one of them, using continuous collision detection another (this is used for character controllers, like the typical quake FPS) or using rounded collision shapes(when using GJK you can easily round all shapes by increasing a collision margin).<br><br>One improvement is to distinguish between 'convex' edges and 'concave' edges. You can safely ignore 'concave' edges, as no collision will happen with them. You could add some threshold based on the angle of the two triangles that share the edge, and below certain values (although the edge is convex) still threat it as concave, so use the triangle normal.<br>You have to be careful which penetration depth and normal to use, otherwise you can push objects in the wrong direction: imagine an objects on the edge of a cliff, it will be pushes off-the-cliff.<br><br>Another more complicated improvement is doing some convex decomposition (either precomputed or online/at runtime) to solve this: group all triangle that share convex-edges into a convex hull, and do a convex-hull versus convex-hull test.<br><br>Erwin<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=2">Erwin Coumans</a> — Sun Oct 08, 2006 11:25 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[vicviper]]></name></author>
		<updated>2006-10-08T20:53:34+00:00</updated>

		<published>2006-10-08T20:53:34+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2099#p2099</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2099#p2099"/>
		<title type="html"><![CDATA[convex hull vs polygon soup collision detection]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2099#p2099"><![CDATA[
I'm doing some research about how to detect collisions between a convex hull and triangle soups with arbitrarily arranged triangles.<br><br>What I'm trying to do is to treat every triangle in the soup as a convex hull, using SAT, and so far, I can detect collisions very well.<br><br>The problem comes when I want to find the correct separation axis between the convex hull and a triangle.<br><br>Typically when two convex hulls collide, the correct separation axis is the one with the shorterst depth penetration.<br><br>With triangles, I test all possible axes, but In case there's a collision, I always get the triangle normal as separation axis, regardless an axis with shorter depth has been found.  This is good because it solves very well the conflicts when a convex hull collides very close to the edges of two triangles in a mesh, actually, always choosing the triangle normal as separation axis is correct 95% of the time.<br><br>The problem is the other 5%, where the correct separation axis is one other than the triangle normal (usually a cross product between a triangle and hull normals)<br><br>The question is: how to know when these 5% axes are the correct ones?<br><br>Thanks in advance<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=559">vicviper</a> — Sun Oct 08, 2006 8:53 pm</p><hr />
]]></content>
	</entry>
	</feed>
