Automatic cages are nearly possible. I made a simple function that examined a single surface mesh and attempted to create "sensible" links from it's basic shape.
- iteriate through the verts
- for each vert, create a verlet
- for each verlet link 3 more by:
looping through
trying to snap to 90 degree (or 45 degree) angles and prioritising the closest.
By doing this, we can be fairly sure of some stability, but at the end of the day I believe the best approach is to create a series of simple pre-defined primitive stable cages.
A cube, tetra, etc... and perhaps a small utility to import your model and fit the cage to it.
On the other hand, perhaps it's possible to examine the model and create a rough approximation of the shape, and fit an already existing stable cage to it.
Any thoughts?
- iteriate through the verts
- for each vert, create a verlet
- for each verlet link 3 more by:
looping through
trying to snap to 90 degree (or 45 degree) angles and prioritising the closest.
By doing this, we can be fairly sure of some stability, but at the end of the day I believe the best approach is to create a series of simple pre-defined primitive stable cages.
A cube, tetra, etc... and perhaps a small utility to import your model and fit the cage to it.
On the other hand, perhaps it's possible to examine the model and create a rough approximation of the shape, and fit an already existing stable cage to it.
Any thoughts?
