2
\$\begingroup\$

AFAIK, many physics engines like Physx and Havok don't incorporate cylinder as basic shape because it is expensive than sphere, box and capsule. But bullet engine does incorporate cylinder as a basic shape. Do they found any fast algorithm to simulate the cylinder and what is that?

\$\endgroup\$
4
  • \$\begingroup\$ Havok.. hkpCylinderShapeClass. Why do you suspect a cylinder is more expensive than a capsule? I don't know about Physx, but Havok most certainly supports cylinders, capsules and very complex geometries. But the cylinder is not considered expensive. Of course, the sphere is the "most" trivial, with the box following. The cylinder/capsule should follow (it's actually based on segment vs something collision queries, and these are actually pretty cheap to compute). \$\endgroup\$
    – teodron
    Commented Sep 17, 2013 at 11:26
  • \$\begingroup\$ @teodron I know capsule/capsule intersection test is cheap, but isn't cylinder/cylinder intersection a lot more expensive ? \$\endgroup\$
    – James0124
    Commented Jun 18, 2015 at 7:59
  • 1
    \$\begingroup\$ @JamesAMD to answer your question accurately, I should look into specific implementation details of those collision queries and preferably benchmark them on different processor architectures. Looks like finding the exact collision point is tricky, involving a bit of conjugate gradient search, as detailed by Eberly: geometrictools.com/Documentation/IntersectionOfCylinders.pdf . Aside from that, as I said, one needs benchmarks to see how much the "early-out" tests help avoid the "expensive" part :). \$\endgroup\$
    – teodron
    Commented Jun 19, 2015 at 11:52
  • 1
    \$\begingroup\$ @JamesAMD I'm not sure about Bullet, but last time I meddled with Havok, I think the actual collision between two cylinders boils down to treating them as convex solids and using GJK (which is indeed more expensive). But since Havok is not open source, judging by how the cylinder shape is formed, one can only hypothesize that GJK or anything else as general is the way to go. See here: transporter-game.googlecode.com/svn/trunk/inc/physics/Physics/… \$\endgroup\$
    – teodron
    Commented Jun 19, 2015 at 11:58

1 Answer 1

3
\$\begingroup\$

I don´t know about the speed or exact nature of the cylinder shaped collider in bullet, but this paper gives a nice overview about cylinder collision.

If you are only after the implementation of their collision you may want to start here and try to recreate what they are doing with it.

\$\endgroup\$
3
  • 1
    \$\begingroup\$ Link's dead. Can you update them? \$\endgroup\$
    – Krythic
    Commented Nov 3, 2016 at 19:04
  • \$\begingroup\$ @Krythic sure thing! Replaced link with an archive.org pointer. \$\endgroup\$
    – floAr
    Commented Nov 7, 2016 at 8:25
  • \$\begingroup\$ For this reason, answers that rely fully on links for all relevant information are discouraged on StackExchange. It's generally best to include in the text of the answer at least a high-level summary of the information found at the link, so it doesn't become useless if the link rots or is not archived. \$\endgroup\$
    – DMGregory
    Commented Nov 7, 2016 at 14:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .