KatsBits Community

[MD2] import and animation problems in Blender

0 Members and 1 Guest are viewing this topic.

Offline Asaeis Wi Vio

  • Newbie
    • Posts: 31
Currently, I'm trying to add additional animations for the Quake 2 male player in Blender, but am having some difficulty copying the frame which uses the same animation that the rig is attached to to an open area of frames (as to not overwrite the current ones).

However, after parenting the model to the bone structure, when I paste the copied frame onto the desired empty keyframe, only the bones will be pasted. Also, when playing through the list of allready existing frames, the skeleton does not follow the frames, but when moving the skeleton consequently moves that part of the model.

This is what happens when I copy the frame onto a free frame:



Basically, the bones get pasted, but the model itself however doesn't move from the final frame of the final animation.

I am using Blender 2.49, and the model is an .md2 file from Quake 2.

Is there something I'm not doing? Or not doing right?


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
I'm slightly puzzled by this. How was the model orientated when it was imported? Was it lying on its back, side, front, or standing up? With regards to what's in the screenie that's a common problem when you parent a mesh to an armature that has a different orientation. In other words... if you press "N" to open the object properties panel check the "XYZ" readings of both the mesh and the rig, if they're different that's why it's flipped. Correcting this could be tricky depending on how the MD2 script works so you'll need to do a test. First orientate the mesh properly and then Ctrl+A to apply RotScale to ObData, that 'fixes' the orientation issue, then parent the mesh to the armature, this should stop it doing what it has.

I'm not entirely sure what's happening when you say "only the bones get copied" because if you're doing this correctly you're not copying "bones" but the "pose" they're in. I see you have the action editor open, but I don't see any keyframe markers in there (little yellow diamond shapes) - which is what should appear - that tells me that you may literally be copy/pasting the actual bones. To do what you need to you have to add a new "Action" (click the double headed arrow button to the left of the two "Up/Down" arrow iconed buttons in the header bar) and then press "I" to "insert" a keyframe, you should then see some markers appear in the Action Editor.

I do have a video tutorial in works on this stuff but its a long way off (I deleted and old capture I had). Thanks for posting this here by the way, YouTube is really annoying for anything more than "Hi I likes ur vidos".

[EDIT] I modified your topic heading to make it clearer what the post was about, saves people having to guess ;)


Offline Asaeis Wi Vio

  • Newbie
    • Posts: 31
I'm slightly puzzled by this. How was the model orientated when it was imported? Was it lying on its back, side, front, or standing up?

The first animation is the same stance which the rig is placed in, just an idle frame.

Quote
With regards to what's in the screenie that's a common problem when you parent a mesh to an armature that has a different orientation. In other words... if you press "N" to open the object properties panel check the "XYZ" readings of both the mesh and the rig, if they're different that's why it's flipped. Correcting this could be tricky depending on how the MD2 script works so you'll need to do a test. First orientate the mesh properly and then Ctrl+A to apply RotScale to ObData, that 'fixes' the orientation issue, then parent the mesh to the armature, this should stop it doing what it has.

A different orienatation? As in, in conjunction with the entire skeleton, or indevidual limbs?

The thing is, by default, this .md2 model has no conveniant default (crucified) animation, so it's fairly challenging to synchronise the bones with the mesh itself (or sheerly accurately, atleast).

Quote
I'm not entirely sure what's happening when you say "only the bones get copied" because if you're doing this correctly you're not copying "bones" but the "pose" they're in. I see you have the action editor open, but I don't see any keyframe markers in there (little yellow diamond shapes) - which is what should appear - that tells me that you may literally be copy/pasting the actual bones. To do what you need to you have to add a new "Action" (click the double headed arrow button to the left of the two "Up/Down" arrow iconed buttons in the header bar) and then press "I" to "insert" a keyframe, you should then see some markers appear in the Action Editor.

Well, as in for some reason when selecting both the model and the bones, it's only the bone placements which get pasted, not the position/frame of the model aswell.

After adding a new action and adding a new keyframe to that action, while both using the shortcut and the item from 'pose', no markers appear. The model position doesn't get copied either.

I'm not sure if it means anything, but I noticed another icon in the action editor which copies a whole 'keyframe', so I tried clicking on it, and it said that there was nothing to copy.

Quote
[EDIT] I modified your topic heading to make it clearer what the post was about, saves people having to guess ;)

Aha, thanks.


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
Send me the *.blend file (info@katsbits.com), there's something not right here and I can't quite figure out what based on what we've discussed so far (here and on YouTube).


Offline Asaeis Wi Vio

  • Newbie
    • Posts: 31
I sent you the .blend file which contains the model and the attached armature.


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
OK, that's really bizarre and I've never come across this before but it kind of makes sense. MD2 and MD3 models store animation data in the vertex iirc as the characters don't have skeletal rigs in game. This means the model has imported in to Blender 'properly' - in that there are no distortions and animations play. But... the process hasn't 'split' that vertex animation data from the mesh and into their own Action sequences - there are no sequence segments (run, walk, fall etc) and no Action/IPO track you can visually check and edit even though animations are present. If you do create a new animation in that context it's breaking the pre-existing ones because they then play relative to the last pose of your custom anim.

You're going to have to do a bit of research on this one because in order to do what you want, you need to be able to see the animation track, so long as the animation data is held in the mesh it's going to be problematic for you to edit or create your own. You need to find a way of exporting/importing the animation detached from the mesh so the object can be set up in a way Blender can use.

And you're right about the rig wierdness, it does effect the mesh when you custom pose it but if you play back the vertex animations they have no effect on the armature, which is odd. The good thing is that all the animations are contained in what appears to be a single track so frames 1-25 might be 'run', frames 26-40 'death' and so on.


Offline Asaeis Wi Vio

  • Newbie
    • Posts: 31
Hmm, honestly I would have no idea how to import the animations seperately from the mesh; unless I asked someone from Id if they happened to have the old bones and the mesh lying around seperately.

I could try to find out how, but right now I am suffering from an illness which makes such things rediculously more challenging than they need to be; I struggled to get through even that beginner tutorial for blender animation, let alone figuring out how to seperate the animation positions from a model which are ironed together into a single file.


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
I'm not familiar with the MD2 tools for Blender (except from a cursory point of view) but doesn't the script give the option to import mesh and animations separately? Incidentally, wasn't the Quake 2 source released under GPL some time ago by idsoftware? If you track down those files they may have the information that's needed for this in Blender, that's how and why a lot of these Q2 based 'flavours' are produced, people are using the source code to make what they want with it.

With regards the illness, at least you'll now have something to distract you from it ;)


Offline Asaeis Wi Vio

  • Newbie
    • Posts: 31
An md2 script? Do you mean a plugin? This version of Blender allready comes with .md2 support without any additional plugins.

When I choose to import and .md2 model, there are no options or settings which it asks me to set for importing; it simply imports it into Blender.

The Quake 2 sourcecode? I'm afraid I don't actually know any programming languages :/

Also, thanks, allthough it takes up alot of concentration to even figure out how to add animations, let alone figuring out how the animations and models are saved in an md2; I can't really afford to concentrate on too much.


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
"source-code" is a generic term to mean "the source content" which often includes 'sample' assets and example files. I suspect the Quake 2 source files would be the same, so it's worth checking out to see what's in it, I'd be surprised if there weren't any character example files.