Generating a concave mesh from a point cloud

diamond.geezer
Posts: 7
Joined: Tue Jan 26, 2010 1:49 pm

Generating a concave mesh from a point cloud

Post by diamond.geezer »

Hi,
I am using the Kinect sensor to generate a point cloud of a section of the surrounding room.
I need to generate from the point cloud the corresponding set of collision surfaces in Bullet.
I have tried using the btConvexHullShape to load the point cloud. This works but creates a convex mesh from the points,
which is a nonsense shape, as the point cloud really describes a concave shape.

What is the best/easiest way to generate a concave mesh from the point cloud?

It looks like I can add triangles to a btTriangleMesh and use that to generate a btBvhTriangleMeshShape, but I don't have the triangle data, just the points.
I could try and run a marching-cubes-style algorithm to manually generate the triangle information, but I'm wondering if this kind of utility function may exist already within Bullet?
Essentially the same kind of functionality as provided for convex objects by the btConvexHullShape.

Does anyone have a code snippet, or tips on how to do this?
winspear
Posts: 77
Joined: Thu Nov 26, 2009 6:32 pm

Re: Generating a concave mesh from a point cloud

Post by winspear »

You need a surface reconstructing software. You can try Meshlab.

http://lcni.uoregon.edu/~mark/Projects/ ... inspection
User avatar
majestik666
Posts: 66
Joined: Tue Mar 02, 2010 6:13 am

Re: Generating a concave mesh from a point cloud

Post by majestik666 »

there are many many algorithms to generate a convex hull from a point cloud,
take a look at qhull , etc ...
or this : http://www.bulletphysics.org/Bullet/php ... f=12&t=255
lulzfish
Posts: 43
Joined: Mon Jan 03, 2011 4:26 pm

Re: Generating a concave mesh from a point cloud

Post by lulzfish »

majestik666 wrote:there are many many algorithms to generate a convex hull from a point cloud,
take a look at qhull , etc ...
or this : http://www.bulletphysics.org/Bullet/php ... f=12&t=255
The point cloud represents an entire scene, though, diamond is trying to generate a general mesh, not a convex one. A convex mesh would lose all the detail he's trying to get.
sparkprime
Posts: 508
Joined: Fri May 30, 2008 2:51 am
Location: Ossining, New York

Re: Generating a concave mesh from a point cloud

Post by sparkprime »

maybe you want some sort of voronoi-like thing, with a threshold for maximum distance between two points