I just want to make sure no one has done this yet before I do it. I plan on having animation handled by code rather than by file. My modeler is fairly new and I'm lucky if I can get him to do a base model let alone any animation. What my plan is, is to write a program that will:
Load a model by any means (ms3d, md5, md3, whatever)
Allow the user to identify triangles that make up a part (bone).
Write the model information to some file format.
Write the bone information to some file format.
I don't know what format 3 and 4 will be. If jme has some native format it can write a model to I'll use that.
I actually did 1 through 4 in C++ for a different engine, but the engine designer kept breaking the engine and I got fed up, so am switching to Java and jme.
I just don't want to do this if someone else has already done it.
You could just use the MD5 format: model the mesh, 'weight-paint' it (which just applies a 0-1 value of bone influence to a vertex), then attach a skeleton (which you could use to animate programmatically) …
That would get you the mesh and skeleton 'info' (using the modeling program to facilitate it) and if you ever decide to go back and animate the models your work is half-way done.
I've been reading a bit about model animations and data and it seems to me that a model would consist of:
Mesh (3D Vectors)
Bones. (Start and end, perhaps vector and distance)
Weight. (A float that means… something)
Quaternions are only used for the animation purpose and could be handled in code etc…
Is this correct?
I'm unsure of the weight. It seems that the weights are applied to the bones, looking at jmeSimpleBoneAnimation.java. But I'm still unsure how the bone weights are applied to the vectors. I've read a little on it but am still confused. How does the engine know that the bone for the right arm which has weights don't move the stomach.
Anything someone can point me at to help me with this part?