Author Topic: Blender io_export_md5 (new)  (Read 1726 times)

0 Members and 1 Guest are viewing this topic.

motorsep

  • Hero Member
  • *****
  • Posts: 905
  • Karma: +72/-126
  • Artist
    • View Profile
    • Kot in Action Creative Artel
Re: Blender io_export_md5 (new)
« Reply #15 on: March 04, 2016, 07:39:36 AM »
motorsep How about bounding box (blue lines) around exported model?

Some time ago I had some issue with it.

http://www.katsbits.com/smforum/index.php?topic=167.msg4091#msg4091

Why don't you try it and see if it works for you? I never had any issues with md5s exported with my addon.

bitterman

  • Full Member
  • ***
  • Posts: 192
  • Karma: +8/-5
  • Doom Newbie
    • View Profile
Re: Blender io_export_md5 (new)
« Reply #16 on: May 08, 2016, 10:35:01 AM »
motorsep

How to use md5, camera and ASE exporters from your github repository?

I downloaded these scripts and Blender 2.76.

motorsep

  • Hero Member
  • *****
  • Posts: 905
  • Karma: +72/-126
  • Artist
    • View Profile
    • Kot in Action Creative Artel
Re: Blender io_export_md5 (new)
« Reply #17 on: May 08, 2016, 09:33:46 PM »
MD5Cam is a bit complex, I need to make a sample .blend file

ASE is easy - add Triangulate modifier to the model(s), make sure model(s) has UV map and default material with material's name exactly how it will be in the .mtr file (e.g. my/awesome/material in .mtr and exactly like that in the material's name in Blender). Vertex color is optional. Select objects to be exported, Export > idTech 4 ASE (I forgot the exact name), tweak settings and export. ASE output is usable right out of the box - no need to manually edit model file.

MD5Model/Anim is a bit more complex. Make sure you have a mesh (or several meshes) weighted to an Armature. Mesh needs to have UV map and material (same as ASE). At least one Action should be created, with local markers marking beginning and end of the Action. Select Armature in Object mode and click Init button in the Properties panel to initialize exporter. All bones with weight/vertex groups will be automatically included to the "list". If you need to export non-deformation bones, or any bones that don't have vertex groups (bones for attachments or effects, etc.) you need to select those manually in Pose mode and tick box Export.

Once that is done, go into Object mode, then select all meshes that belong to the Armature, then select Armature (must be selected last!), Export > idtech 4 MD5 something > Type in model name, select Actions to be exported, check some extra options if necessary, export. It will save md5model and md5anim, which can be used out of the box (that's if you rigged and weighted your model correctly).

Nothing should be in any specific layers, however, layers with exported items should be visible at the time of export (e.g. if you have mesh1 in layer1, mesh2 in layer2 and Armature in layer3, all 3 layers must be visible).

Note that for proper rigging and animation character needs to face -Y or +Y in Blender, but it has to face +X when exporting to Doom 3. It's a royal pita, but you can add an Empty, and use one of the constraints (forgot which one I used :? ) to "parent" armature to the Empty. This way you can animate in Blender with character facing -Y or +Y, and when you are ready, you can rotate Empty around Z axis to make character face +X, export it, test it in Doom 3, come back to Blender and turn character (again using Empty) to face -Y/+Y, rinse/repeat.

bitterman

  • Full Member
  • ***
  • Posts: 192
  • Karma: +8/-5
  • Doom Newbie
    • View Profile
Re: Blender io_export_md5 (new)
« Reply #18 on: May 09, 2016, 12:50:57 AM »
Thanx. About empty - it's great.

Some add:


1. Extract .zip to folder.
2. Run Blender, choose File->User preference->Import-Export->Install from File.
3. Choose and check export script, Save User Settings.
4. Restart Blender.

Appropriate script must be available in File->Export.

Upd:
Quote
local markers marking beginning and end of the Action

What do you mean? Some special sintax?
« Last Edit: May 09, 2016, 01:30:28 AM by bitterman »

Arl

  • Newbie
  • *
  • Posts: 25
  • Karma: +4/-2
  • Doom Newbie
    • View Profile
Re: Blender io_export_md5 (new)
« Reply #19 on: May 09, 2016, 02:14:26 AM »
Quote
local markers marking beginning and end of the Action

What do you mean? Some special sintax?

I think he means markers in the timeline, as such:



Example: "walk_start" at the beginning of the animation, and "walk_end" at the end of the animation.

kordex

  • Newbie
  • *
  • Posts: 12
  • Karma: +1/-1
  • Thermostellar Bomb #20
    • View Profile
    • github-kortemik
Re: Blender io_export_md5 (new)
« Reply #20 on: May 09, 2016, 05:51:02 AM »
Note that for proper rigging and animation character needs to face -Y or +Y in Blender, but it has to face +X when exporting to Doom 3. It's a royal pita, but you can add an Empty, and use one of the constraints (forgot which one I used :? ) to "parent" armature to the Empty. This way you can animate in Blender with character facing -Y or +Y, and when you are ready, you can rotate Empty around Z axis to make character face +X, export it, test it in Doom 3, come back to Blender and turn character (again using Empty) to face -Y/+Y, rinse/repeat.

If this is valid for the exporter in the repo, I would like to fix it as it's nothing fancy to do

motorsep

  • Hero Member
  • *****
  • Posts: 905
  • Karma: +72/-126
  • Artist
    • View Profile
    • Kot in Action Creative Artel
Re: Blender io_export_md5 (new)
« Reply #21 on: May 09, 2016, 08:17:45 AM »
If this is valid for the exporter in the repo, I would like to fix it as it's nothing fancy to do

If you are talking about your OpenTech exporter, I don't really know what state it's in.

As for mine, it doesn't need to be an option for exporter as it's move flexible to use scene setup instead of an option in the exporter's UI.

motorsep

  • Hero Member
  • *****
  • Posts: 905
  • Karma: +72/-126
  • Artist
    • View Profile
    • Kot in Action Creative Artel
Re: Blender io_export_md5 (new)
« Reply #22 on: May 09, 2016, 08:20:33 AM »
@Arl @bitterman: Markers on the local time line  (for each Action), not the global one. Naming doesn't matter.

bitterman

  • Full Member
  • ***
  • Posts: 192
  • Karma: +8/-5
  • Doom Newbie
    • View Profile
Re: Blender io_export_md5 (new)
« Reply #23 on: May 09, 2016, 09:39:40 AM »
Thanks.

May l clear: if I anim in Blender along X - is there no need to manipulate with empty, rotation and others?

Arl btw nice legs ))
« Last Edit: May 09, 2016, 09:51:57 AM by bitterman »

motorsep

  • Hero Member
  • *****
  • Posts: 905
  • Karma: +72/-126
  • Artist
    • View Profile
    • Kot in Action Creative Artel
Re: Blender io_export_md5 (new)
« Reply #24 on: May 09, 2016, 10:11:18 AM »
May l clear: if I anim in Blender along X - is there no need to manipulate with empty, rotation and others?

It's not about animating along X or any other axis (if your character is looking +X, but doing side step - you are animating along Y). It's about +X being "forward" for Doom 3 (and any engine pretty much) and Blender's "forward" is -Y. Animation tools (symmetry pose, etc.) in Blender only work when your character has -Y as "forward" (looking down that direction).

I animated characters looking down +X (to avoid messing with rotating it) and it was a horrible mess. Poses can not be copied and mirrored, which creates more work for walk/run/etc. cycles where poses need to be mirrored. It can be done, but it's not worth the effort.

bitterman

  • Full Member
  • ***
  • Posts: 192
  • Karma: +8/-5
  • Doom Newbie
    • View Profile
Re: Blender io_export_md5 (new)
« Reply #25 on: May 09, 2016, 10:17:12 PM »
May I clarify again:

In engine space: if bone moves along +X - it's means bone moves forward.

In Blender space: if bone moves along +X - it's means bone moves sideways.

Otherwords, in engine eyes look forward along X, in Blender - along Y, right?

I remember something to do with OpenGL orientation, but don't remember what exactly :(

Btw what anim tools do you mean? SHIFT+CTRL+V?
Or some add-ons?
« Last Edit: May 09, 2016, 10:21:44 PM by bitterman »

motorsep

  • Hero Member
  • *****
  • Posts: 905
  • Karma: +72/-126
  • Artist
    • View Profile
    • Kot in Action Creative Artel
Re: Blender io_export_md5 (new)
« Reply #26 on: May 10, 2016, 09:09:22 AM »
I doesn't matter how individual bones move. It's the whole object facing certain axis on export. I think you are getting caught up in minor details on everything related to this engine :/

By anim tools I mean animation tools Blender provides (Blender's animation capacity).

The Happy Friar

  • Happy Happy Joy Joy
  • Administrator
  • Hero Member
  • *****
  • Posts: 772
  • Karma: +30/-4
  • Semi-Newbie.
    • View Profile
    • EarthQuake
Re: Blender io_export_md5 (new)
« Reply #27 on: May 10, 2016, 10:50:33 AM »
I always just imported a model & made sure mine was facing the same way.  :)

It is very annoying though. 

bitterman

  • Full Member
  • ***
  • Posts: 192
  • Karma: +8/-5
  • Doom Newbie
    • View Profile
Re: Blender io_export_md5 (new)
« Reply #28 on: May 10, 2016, 11:39:06 AM »
Ok, thanks.

kat

  • Newbie
  • *
  • Posts: 13
  • Karma: +2/-0
  • Doom Newbie
    • View Profile
Re: Blender io_export_md5 (new)
« Reply #29 on: September 15, 2016, 11:16:18 AM »
What's the status on this exporter? Just trying to get something to export in 2.77a and whilst mesh and anim export, the objects UV's are all over the place and nothing I've tried has fixed it (deleted, rebuilt, flipped, split etc.). There is still interest in a simpler export script like this BTW even though there are a number of other more complex ones available (the only thing it could do with is selectable export rather than exporting the contents of the Scene, other than that, there is demand/interest in it).
« Last Edit: September 15, 2016, 12:19:40 PM by kat »