Questions about MD5 and jme

So I've been successfully using Ender's old MD5Reader with JME version 1.

However, I've hit 2 specific problems:

  1. Only an MD5 model can attach to an MD5 model.
  2. The attached MD5 model (eg a weapon) doesn't animate with the parent MD5 model(eg an avatar).

    Does the new JME v2 handle/solve these problems?


    <edit>ugh.  just realized I put this in general rather than graphics.  Sorry all.  Is there an easy way to move?</edit>

As far as I know neakor's MD5Importer solves #2, but not #1.  It does work in JME 2.0 though.

I havent tried this yet, but I'm guessing it should work. Its what I will try when I come to the point of adding extra equipment to my models.

So I use 3ds max, but I'm guessing there is a similar way to do this in other modeling programs.

Say its a sword you want to attach, I assume the avatar had a sword sipe animation, then your sword can be an md5 model, attach it to a point in the hand in orientation and mebe rotation(might take some playing around to get this to look right). So then it should follow the hands movements, but still be its own model and have its own animation data.

Export the sword, then attach it to the same node as the avatar's node. match up the animation speeds and they should work togeather.

I mean, if you attach and md5 model to a node, and its not centered at 0,0,0, in the modelling program, the offset it reproduced from the node in JME, I hope this makes sense, it does in my head lol.

There are probably better ways to go about this, just an idea

SomethingNew - Thanks, ok I'll switch to the new version and see how it goes.

Del - Yes.  That's how these things work in a perfect world.  The problem is that the original MD5 reader used a single node for the whole mesh and while there was code for attaching to a joint, it did not actually animate the attached node. 

Del - Another issue to watch out for is that an exported model with no rigging will contain no data.  Thus the sword(or whatever) needs to have bones as well.  Not sure if this is the case with Max, but it is with Blender.

Ok, you can just put a single bone in the sword, skin it, but so that it does not affect the mesh geometry, only the coordinates/rotation.

About what I was saying where you attach somthing orientation/rotation, I was thinking where to attach to get this to work right. You want to find somthinng in the hand that alligns with the angle you want the sword, either and edge or face. still making sure your not attaching it as part of the model, just follow that certain part.

About attaching the node. Maybe I understand it wrong, but the md5 gets attached to a JME Node(from the rootnode of the MD5 Skeleton). The node its attached to is nothing to do with the MD5, its just a node that JME understands as far as postion/rotation and any other attributes a node has. So if you move this node about, the MD5's root node follow's. So thats the node you want to attach your sword to, not the actual md5's root node, the JME node. Then with the offset in world space in the modelling program, because both models are attached to one node, they both have the same offset.

I don't think I'm explaing it every well and I could be wrong, I have alot of other things to work on, but I'll try and get a test done before the weekend out.

Also I use MD5Importer, not the reader, but attaching things to a JME node would be the same if its say a .obj file for exmple.

Tested my method and it works.

Only thing it was rushed, the allign tool in max only worked for a single frame, but I'm sure there is a way to make it allign each frame withought having to do it manually.

The main point of the test was to see if attaching the sword MD5 to the same node as the avatar MD5 would produce the right positions, rotations.

edit - Thiking more on this, I don't know if having to deal with the sword as an extra md5 with anim data will affect perforamnce as much as it being a .obj file,  finding a a triangle in the md5's mesh geomertry, say the palm of the hand and aliging it with that position/rotation, each update. It would be harder to find that part of the geom data, but its there somwhere.