Loader for the bones with a single mesh model

Hi,
There seem to be three ways to include character animations in 3D applications

(1) use segmented graphics - a body is built using separate 3D graphical objects for each limb or body part, head, forearm, thigh, foot etc.
(in Java 3D we assigned each of the imported Shape3Ds to a hierarchy of transform groups in order to build a skeleton)

(2) import the mesh at keyframes of predefined animations from a graphics package into your program and morph the mesh between those frames

(3) use a single mesh of vertices (or ‘skin’), assign each of those vertices to the bones of an underlying skelton - subsequently transforming the skeleton then requires updating the position of each of the vertices. (see for example: http://www.cosm-game.com/dev_skinbones.php )

The latter route seems to be gaining in popularity - it gives greater flexibility of movement than predefined animations and results in cleaner movement than segmented graphics objects (I’ve found unwanted effects like limbs cutting through clothing etc).

Anyway, I’m teaching all you grandmothers to suck eggs and besides, this is a long introduction to a very simple question:

Does anyone have a freely available loader that imports into Java3D the bones or skeleton from a package like StudioMax along with the relationship between the individual vertices in the mesh (skin) with those bones?

I am aware of object loaders (http://www.j3d.org/utilities/loaders.html) like the one from Startfire Research for 3D Studio Max (http://www.starfireresearch.com/services/java3d/inspector3ds.html) and Kevin Duling’s for MilkShake (http://home.earthlink.net/~kduling/Milkshape/index.html). They’re fine for importing the mesh (I think the latter imports frames for animations also) but does anyone have a loader that will also import the bone information?

I can devise a skeleton myself but I really do not fancy - manually - assigning each vertex to the appropriate bone.

I’d prefer a loader that deals with output from 3D Studio max but, at the moment, I’d take anything.

Many thanks in anticipation,
-Paul

We use a plugin to max called Flexporter. You can write plugins for the plugin to write your own format. You can also use a supplied text format for exporting skin and bones. I can give you the source to our loader, but with zero support since we just entered beta and I have no free time. The code would serve as a reference and would be useless to you directly because it loads things up into our skin and bones system. But it will help you get past the tricky transformations and it handles all the parsing of the flexporter file. If you study the code carefully I am sure you can adapt it to your use in a couple of hours.

Let me know if you want the code.

Cheers, I’ll be in touch.