Game Editing > Scripts & Support
[MD5] EXPORT script for Blender 2.6x (OPEN)
kat:
Personally I'm glad to see you writing out what you are, so few people do this so it actually makes what they're doing more difficult to follow. So... keep doing it if you have a mind to ;)
On the extra verts... so if the script reads that a vert is on the border of both a smoothing and UVW split it introducing extra vertices per each dataset? Meaning you end up with three vertices at any given junction?
With the panda character... how old is it and what version of Blender was used to originally make it? And has it been through any iterations in different versions of Blender up to and including 2.5?
I say this because that looks like a Blender 'data' problem that happens occasionally when working with old files that have been passed through and saved in a number of different versions of Blender, this is **especially** so with Armatures. To test the output as an MD5 it might be worth stripping the current rig and replacing it with a simple two bone set up, that way you can see if there's an issue with it or not on re-export. Cute characters btw ;)
Not tested the new script yet but will post when done so, I've got a couple of rigged characters including the old version of Bob I can cross-test this with.
keless:
re:verts -- I think technically you could end up with N verts per junction, where N = number of unique UV + normal pairs associated with that vertex. Average case will probably result in 1-n_faces verts per junction depending on whether or not the normals are same, and more on UV texture seams. In short: yes.
re:panda -- I think it was modeled in 2.48 and animated in 2.50, so it's probably worth remaking the skeleton.
meanwhile, I think I'm ready to move on to exporting md5anims next.
EDIT: Replaced the armature and the panda looks good now. Thanks for the tip, Kat; I might have been chasing my tail in the script code forever without it.
keless:
Okay so I was never 100% clear on this in blender, and I want to make sure I have my head on straight about animations before interpreting their API.
When an artist is finished rigging, they select the armature and go into "Pose Mode". There they can modify bone positions and insert key-frame data (as a combination of Loc/Rot/Scale) per-bone at given time frames.
When this is done, it seems to automatically create an "Animation" child of that Armature (visible in the Outliner window), with an "Action" default named 'ArmatureAction'.
* I can delete or rename the action in the DopeSheet view (but no where else?)
* I cant seem to add other 'actions'
* I cant seem to add other 'animations'
* clicking the "snowflake" icon in the red strip found in the NLA Editor causes Bad Things to happen (seems to bake the action into an NLA track object which cant be edited? is this actually a Good Thing?)
* after creating a few of these, the animations seem to be floating around in memory not really attached to the 'armature' or the 'animation', however selecting one in the DopeSheet drop down and then playing it a few times seems to cause that 'action' to replace the single 'action' child of the 'Animation'
* I can create new NLA tracks, and have them consume the currently active 'action' in the NLA Editor, such that an 'Animation' object can have one "active" child 'action' and a number of NLA tracks each with their own 'action' (that might or might not also be the active 'action')
* in python, one can access the 'Animation' object from bpy.context.object.animation_data while an armature is selected in object mode (cant currently select it from bpy.data.armatures['armature name'].animation_data for some reason)
* from the animation_data, one can access a singular .action object, or a list of .nla_tracks which seems to correspond to the results above.
THE QUESTION:
How does an artist that knows what they're doing set up character animations? To they simply have one long 'action' with all animations inserted in a row (keyframes 1-99 are 'idle', 100 - 199 are 'walk', 200 - 299 are 'kick') or do they somehow set up a series of separate NLA tracks each with their own 'action' child, meaning that the single 'action' child of the 'animation' object is just the 'currently selected action'
I need to know this so that I pull the animation(s) from the right place, instead of forcing animators to mess up their .blend to squeeze out .md5anim file(s)
kat:
The engine you're exporting to or working with determines which animation process you use. There are basically two types or ways to animate.
* 1) individual animations
* 2) included or grouped animations1) Most games work this way, meaning that you create separate animation tracks - 'run', 'walk' and so on - each of which is then exported out as a separate animation file, in this case you could have ten separate *.md5anim files and one *.md5mesh file.
2) Tech like Unity3D use this approach whereby all the animations are included into a single track which is exported out. In the engine you then set up the animations doing what you said - 1-99 = 'walk', 100-199 = 'run' and so on
Now with regards to the 'structure' they've changed that again. In previous versions you'd have the 'Armature' at the top and then the animations as a child connections;
* Armature
* >> animation 1
* >> animation 2
* >> animation 3But they appear to have changed that so in the OOPS/Outliner view its now listing animations only on being actively selected like this;
* Armature
* >> animation 1And again if a different action/animation is active;
* Armature
* >> animation 2That's bound to change the internal data structure but at the same time it does mean that Blender is dealing with only the data that selected/active?
You can change the name of animations in the OOPS/Outline be Ctrl+LMB clicking the name to active 'edit' mode on that, you can only change user generated data though and not 'core' data - "Animation" as a named datablock can't be changed.
For the other stuff you mentioned, the "Action" editor is now a sub-editor of the main "Dopesheet" editor, so you have to go into Dopesheet and select "Action" from the dropdown menu in the header. Once there you can do all the usual edit/delete/new functions previously available.
keless:
Okay, I'm starting to see how I can go in to the NLA Editor and select an animation (or add a new one) in the "animation data" section of the properties panel (hotkey 'N') of that window.
1) you dont mention NLA Tracks at all; useful? ignore them?
2) if not NLA tracks, then actions are basically floating in memory and only the "active" one is really visible at any one time, so I wouldn't be able to export more than one action at a time it seems?
Aside: Blender seems to have a couple of places (this, and texture image links come to mind) where stuff can be created and just floats around in memory unless its also attached to something, which bugs the carp out of me. Stupid myTexture.001, myTexture.002 IDs that I don't know exist and cant get rid off once I do. In my mind, EVERYTHING data wise should be accessible from the Outliner tree.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version