Convex Hull Generation

I had a misunderstanding of the simultaneous shape decomposition and skeletonization paper. It was clear that it depended on approximate shape decomposition (ACD) for the core functionality, but I didn't realize that convex hull generation has been essentially solved for a long time. I was reading through the paper trying to understand how they were able to calculate convexity with a convex hull without describing an algorithm for generating the actual convex hull.

I had a look through the Wikipedia page for convex hull algorithms, and QuickHull seemed to be a fairly popular algorithm that runs in a reasonable amount of time. So I've been dedicating resources to implementing that. So far I have the beginnings of the hull (as it starts with a triangle of the most extreme points).

Start of a convex hull on a dog mesh Start of a convex hull on a humanoid rat mesh

The triangles are green because they aren't automatically added to the initial shading group. I'll need to look into a way to fix this next time so it's easier to see the geometry of the convex hull. It's also worth noting that the default name for a mesh is "polySurface1".

On the Overall Project

Developing a Maya plug-in has been an interesting experience. I had originally relied on the MSimple interface, which gives a simple way to create a command in Maya. However, because I'll need to depend on several different algorithms, I had to find an alternate way, which involves creating a central cpp file with initializePlugin and uninitializePlugin functions that register and deregister my commands. The polyPrimitiveCmd and pointOnMeshInfo examples that Autodesk provides have been especially helpful as well. The Maya API has an interesting approach to object manipulation to avoid memory issues, and actually going about implementing with it has been a lot more helpful than their documentation on it.

As I'm developing in Visual Studio, I've also found that it's a little difficult to use the default functionality where running the plugin involves starting up Maya and stopping involves closing Maya. Instead, I've resorted to building the plugin without running the debugger and copying the file to the appropriate plugin folder. Then, I don't have to restart Maya all the time.

I've also taken away the lesson that these research papers aren't necessarily self-contained bundles of knowledge. My previous experience with research has been with the SPH and IISPH fluid simulation. SPH is a fairly simple and novel technique at the time I believe, and IISPH was the product of a thesis which obviously contains all the details.

Taking in another look into the skeletonization paper, I've also learned that this algorithm may be insufficient for some special case scenarios. Obviously research papers try to present themselves in the best light possible, though I would have expected to see more counterexamples in the paper. As recommended by my advisor, I'll be planning to look into different algorithms to see which algorithm works best for production purposes. There's a paper by Wade that seemed to have spawned a number of derivatives that looks promising.

The goal next week is to finish the convex hull algorithm and start on the actual shape decomposition. I've included a very good link on QuickHull implementation below as well.