Jump to content


Photo

MD5 models and animations (Blender)

md5 export import animations modeling

12 replies to this topic

#1 RPGista

RPGista

    Advanced Member

  • Member
  • PipPipPip
  • 1509 posts

Posted 11 April 2018 - 04:20 PM

Hi, I thought I should document this discussion here, for future reference, as info on this subject has become quite scattered and out of date.

 

I've been wrestling with MD5s for a while now with no success. Importing works but the meshes and armatures are problematic. I decided to start with an animated model from scratch. Followed a few instructions in videos or tutorials (most recently trying out Sotha's solution http://forums.thedar...pc/#entry325423 ) but have yet to be able to export successfully. The animation oddly enough is working correctly (on the model viewer, havent gotten into the game yet), but the mesh itself is getting horribly deformed.

 

Im using the io_scene_md5 importer/exporter. Going back to version 2.72 didnt solve it for me.

 

In blender

 

Attached File  tree1.jpg   26.5KB   0 downloads

 

After exporting

 

Attached File  Untitled.jpg   30.44KB   0 downloads

 

Any thoughts?  

 

 

 

 

 


  • Epifire likes this

#2 Arcturus

Arcturus

    Advanced Member

  • Development Role
  • PipPipPip
  • 1622 posts

Posted 12 April 2018 - 03:09 AM

Could you attach the .blend file?


It's only a model... /// My channel on YouTube /// CGtrader , Turbosquid


#3 Epifire

Epifire

    Advanced Member

  • Active Developer
  • PipPipPip
  • 526 posts

Posted 12 April 2018 - 04:10 AM

Hard to say as I haven't actually made the scary venture into MD5s, but does the game expect an explicit hierarchy for the bone setup? It would explain the strange deforming but that would be my first guess. Thing that gets me is every engine I've dabbled with animations for, have their own proprietary implementation. The result being quirks that need tending to else strange errors persist. Needless to say I'm very interested in seeing what could resolve in your case here.


You need a model? Epi does you a model.

 

Toss me a PM I promise I don't bite.

 

 


#4 HMart

HMart

    Advanced Member

  • Member
  • PipPipPip
  • 634 posts

Posted 12 April 2018 - 08:13 AM

First can you explain how you made the skeleton? Have you called the root bone "origin"? That is very important. Are you sure all vertices of your model are weighted to a bone correctly? I assume that is open3mod? Try ingame or try to see the model in another md5 viewer, like Noesis for example, in my experience Noesis can see Md5 models and animations that make open3Mod crash, imo i also think Noesis is a better tool overall.


Edited by HMart, 12 April 2018 - 08:15 AM.


#5 RPGista

RPGista

    Advanced Member

  • Member
  • PipPipPip
  • 1509 posts

Posted 12 April 2018 - 11:26 AM

HMart - thanks for the suggestion. Indeed Noesis imports the model and it looks correct! I can see the armature in there with the mesh, and I can play the animation separately, working fine. Unfortunately, it seems you cant have them both at the same time, I can only inspect the mesh or the animation at one point, would be great to see them working together. I was using open3mod and it still shows a heavily deformed mesh. Now I have no clue if the problem is in the mesh or the viewer.

 

Attached File  Untitled.jpg   34.07KB   0 downloads

 

The armature is a simple FK one from the ground up, the first bone being called origin (no parent) and 3 or 4 more bones from that. Its true, I was reading that vertex groups and weights are a problem for the exporter, but it all seems correct to me (bones and vertex groups have the same names, cant see any issues on weight painting mode, etc). Obvisouly theres something Im missing. I parented the mesh to the armature with automatic weights. Tried renaming everything with simple short names (materials, objects, bones, etc). The process I used for exporting was the one described by sotha, with the exception that I set the bones layer on 1.

 

Arcturus - Im linking the blend file, in case you have some time to take a look, thanks a bunch. https://1drv.ms/u/s!...cgfKkF6bQ179nBc

 

Epi - Tackling MD5 is kinda scary for sure. The modeler version and plugin version combo alone will keep you guessing for a while. I dont think the armature hierarchy is essential in this case, though you do need a root bone called origin located at zero, like HMart said. I think the rest is pretty much free? Hopefully as I progress with it I'll be able to post enough info to help others with this process.


Edited by RPGista, 12 April 2018 - 11:30 AM.


#6 Arcturus

Arcturus

    Advanced Member

  • Development Role
  • PipPipPip
  • 1622 posts

Posted 12 April 2018 - 04:10 PM

I exported model and animation using this plugin (Blender 2.79b):

 

Attached File  md5_plugin.PNG   18.97KB   0 downloads

 

It works fine in game. Here are md5 files.


  • RPGista, Epifire and Anderson like this

It's only a model... /// My channel on YouTube /// CGtrader , Turbosquid


#7 Epifire

Epifire

    Advanced Member

  • Active Developer
  • PipPipPip
  • 526 posts

Posted 12 April 2018 - 11:08 PM

I've really wanted to animate stuff for a while, I just didn't wanna bite the bullet and learn Blender. However, I think I could settle for importing a finished model and animating it from there. Thanks for linking the tool Arcturus!


You need a model? Epi does you a model.

 

Toss me a PM I promise I don't bite.

 

 


#8 RPGista

RPGista

    Advanced Member

  • Member
  • PipPipPip
  • 1509 posts

Posted 13 April 2018 - 12:38 PM

Yeah, thanks a lot Arcturus, I guess the process is actually working then, should be able to test more stuff in game soon now. And Epi, yes, if you cant find an exporter for your favourite modeler, Blender is always there, and it has pretty good animation capabilities. A bit of a learning curve to get there, but nothing you havent seen before.



#9 HMart

HMart

    Advanced Member

  • Member
  • PipPipPip
  • 634 posts

Posted 13 April 2018 - 01:10 PM

I remembered that i have a old viewer for model/animations made specially for idtech 4, is called "modelviewer093a" and I made a link for it here https://drive.google...hZp7OaLbk4-UgjZ.  Is old so to make it work well in W10, you need to set it to start as administrator and perhaps even set the compatibility mode for windows XP sp2/sp3. You also need to edit the file "scene.txt" and give it the link for the base folder.
 
The good thing about this old model viewer is that it supports basic Doom 3 shading capabilities, (stencil shadows, per-pixel lighting, normal mapping, specular) so you can see the models almost like they look ingame. 
 
About Noesis i also don't know how to make it play MD5 animations with the models, it does that for collada and fbx models, it seems it needs the animations to reside inside the same file has the models, but i could be wrong. Noesis also has a nice extra tool in the "tools" menu option called Data viewer, in there you can, not only change program settings but also see the bones names, nice to see what naming convention idSoftware used for their bones and you can also edit the bones xyz values directly in Noesis!


Edited by HMart, 13 April 2018 - 01:12 PM.

  • RPGista likes this

#10 RPGista

RPGista

    Advanced Member

  • Member
  • PipPipPip
  • 1509 posts

Posted 14 April 2018 - 11:24 AM

I was using that modelviewer before but it was so unstable, cheers for the reminder, I completely forgot to set it to compatibility mode. It seems a bit more workable now. It loads the tree model and animation successfully. 
 
Arcturus, sorry to be a pain, but do you mind posting the def file you used to test the tree in game? I have been using the flag and your tree ones as examples, but I cant get the model to appear in game. They look fine in DR but wont show up once I load the map.

 

Heres the one I tried last:

 

Spoiler

 

Im getting a NULL JOINTS on the mesh warning.


Edited by RPGista, 14 April 2018 - 12:00 PM.


#11 Arcturus

Arcturus

    Advanced Member

  • Development Role
  • PipPipPip
  • 1622 posts

Posted 14 April 2018 - 12:46 PM

Sure, def file is:

model tree_anim_test2a1exp1
{
mesh models/md5/nature/tree_anim_test2a1exp1.md5mesh
anim idle models/md5/nature/tree_anim_test2a1exp1.md5anim
}
entityDef atdm:tree_anim_test2a1exp1
{
"editor_displayFolder" "Nature"
"spawnclass" "idAnimated"
"model" "tree_anim_test2a1exp1"
"start_anim" "idle"
}

  • Anderson likes this

It's only a model... /// My channel on YouTube /// CGtrader , Turbosquid


#12 RPGista

RPGista

    Advanced Member

  • Member
  • PipPipPip
  • 1509 posts

Posted 16 April 2018 - 02:26 AM

*
POPULAR

Good news boys, I was able to get the hang of it, Im bringing several test models in game - so far, I found Keless exporter to be quite reliable, been using it with the 2.72 version to do the exporting. Will do more testing with the Arx one later.

 

Attached File  startmap_2018-04-15_00.33.26.jpg   88.6KB   0 downloads

 

Attached File  startmap_2018-04-16_04.02.44.jpg   52.63KB   0 downloads

 

Will be posting a quick guide soon, with the needed details. Thanks again. 

 

 

 


  • Springheel, Dram, Bikerdude and 5 others like this

#13 Bikerdude

Bikerdude

    Mod hero

  • Member
  • PipPipPipPipPip
  • 19857 posts

Posted 16 April 2018 - 03:43 AM

Nice one!





Reply to this topic



  



Also tagged with one or more of these keywords: md5, export, import, animations, modeling

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users