KatsBits Community

[md5] Animated Character problem

0 Members and 1 Guest are viewing this topic.

Offline stilobique

  • Newbie
    • Posts: 4
Hello,
I'm a new in this board. I have animating a character but my export on MD5 is very bad, the mesh is deformed and the anime is not respected, i can't explain why ! The exporter does not support ik?

Rigging on Blender :


On the model Viewer :


Video Render GLSL :
View to Vimeo


My .blend : Download.


PS : Sorry if my English is bad, but it's not long since I used this language:)


Offline mikshaw

  • Newbie
    • Posts: 14
I opened your blend file in Blender 2.57-RC2, and it looked fine until i went into the actions editor and played the "attend" action.  The mesh became oversized, rotated, and severely stretched.  When switched to Rest position, the stretching went away, but it's still rotated and too big for the armature.
If your source file is messed up, the export will be messed up as well.


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
Hmm... Interesting (welcome btw).

In addition to what mikshaw said, taking a look at the file, I don't think you've done anything wrong per-say, certainly not in terms of rigging "a" character. However, yes, rigging up like that is going to cause problems because the way you've done it is quite 'abstract' (the bones and relationships) for a game character.

What I mean is this... games like everything to be pretty basic in nature, an arm has two bones for example, and it's those two bones that you use to animate. If you add more bones to that chain, say control bones and/or other surfaces, it starts to cause issues because those new bones are not directly associated with the mesh itself, there are no vertex groups associated with them so they get ignored on output (iirc this was a good way to control what bones get exported, by checking to see if they're parented with any vertex_groups, it allowed complex rigs but basic output).

That means you could be accidentally rigging in such a way that some bones and/or vertex groups have no associations or are getting miss-matched during the process.

What I would suggest is re-rigging the character and stripping it right back to only the bones you actually need to animate the mesh (or attach things to it). Also be sure that you 'set' any mirror modifiers before export and/or set the origin position of both the mesh and rig correctly in relation to each other. Also you may need to run the animation 'fix' that's mentioned on the Blender web sites and forums due to some issue associated with animation data.

I've really got to get those game animation and rigging tutorials/videos on my to-do list done!


Offline mikshaw

  • Newbie
    • Posts: 14
I never figured out what the rotation/stretching was about.  I reset the rotation and scale on the mesh, and that allowed me to make a new action, but for whatever reason I could not get the attend action to remain unscaled and unrotated...I think that action might be broken beyond repair, although for all I know it might be an issue with different Blender versions?

Anyway...I made a quick and simple action, and saw the same thing you did.  I thought it might have been related to some orphaned vertices, but didn't find any.  Kat definitely knows more about this than I do.

I should add, to answer your IK question, that the exporter can deal with some amount of IK.  I don't know how far you can go with it, but a basic human rig with simple IK chains on arms and legs seem to export without trouble.


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
This is how 'Bunneh!' is rigged (granted a simple character but you get the point);



The orange coloured bones have IK Contraints attached, but instead of locking onto a name object (another bone) I just use the chain length setting only, usually for "2" bones in a chain. That pretty much locks the chain to an "arm", "leg" or other isolated unit.

So yes, to back up what mikshaw said, you shouldn't really be having any IK specific export problems just because you've assigned them to bones in the rig; typically problems are caused because of the way IK are used, not because they are being used.

Hope the above helps.


Offline stilobique

  • Newbie
    • Posts: 4
Ho, thank you very much for the reply. I'll watch it all.


Offline stilobique

  • Newbie
    • Posts: 4
Hello :)

Thanks again for your reply, but i have a new problem ( ::) ). My character is very small in the viewer, if I change that size in the export nothing changes. It's a problem with the script ? I work with Blender 2.57.


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
At a guess, you probably worked on that character using Blenders default scale. Ideally what you should always do when making a character for use in another game (modding someone else's tech) is import or somehow get a reference block to work against.

for example, the reference pack in the downloads section contains a number of blocks that are common to games and technology based around 'BSP' and UNITS as a form of measurement. This means if you use the 256x256 block as a reference point, you then know that what you are making will be relative to that block size in game.

To fix your problem you first need to determine the scale system being used in the game you're editing and whether you can then import into Blender some form of reference object. If the script isn't properly scaling check to make sure you're using "Ctrl+A" and the "Apply Location/Rotation/Scale" options; you need to 'fix' an object before export.