MD2 export problem
Moderators: jesterKing, stiv
Hi, i'm using version 0.17.4 of the md2-exporter in blender 2.41 and it destroys my simple model. Can you take a look on it? I have a UV-mapped version where the same problem happens, but the main problem is, that some of the vertex-points are in the wrong position.
Blender-Model -> http://netster.de/public/rupee.blend
Blender-Model -> http://netster.de/public/rupee.blend
Ok - I was wrong. The exporter is messing up a model I'm trying to export: http://arkfamily.org/MZ/Animated_man.blend.
Any ideas?
Any ideas?
I'm assuming you want to export the first model (however all of them have the same issues). There are several problems with it, it is not centred, the object (not the mesh verts) are scaled and rotated. The new script moves the model, and since the armature is not moved with the model, it screws it all up. You need to select your model (not the armature) and go into it's modifier stack. You need to press the "make real" button for the parent armature since this is an old blender file. Since the model and the armature are not at the same location or at the origin, plus the model isn't animated, you need to press the "apply" button in the armature modifier (which will remove it-keeping the model). Then you need to press the "N" key in the 3d window and change all the location/rotation to 0.0 and all the size values to 1.0. Then try exporting it. It works for me that way.
There is a tutorial in the works for this exporter, but it may be a while.
Cheers,
Bob
There is a tutorial in the works for this exporter, but it may be a while.
Cheers,
Bob
Halfway down the trail to hell....
i hope somebody can help me...
my mesh getting destroyed after exporting...
klick for an before/after-image
i used the Armature Modifer and Bones for an 80 Frames Animation...
The Games Convention came near and i have to export some more models so i hope somebody can help me soon
my mesh getting destroyed after exporting...
klick for an before/after-image
i used the Armature Modifer and Bones for an 80 Frames Animation...
The Games Convention came near and i have to export some more models so i hope somebody can help me soon

i also got some problems with the export. it seems the bounding-box stuff doesn't work. the min- and max-values are wrong so the translate and scale values for each frame.
replacing the bounding-box code from line 844 to 860 works for me.
there is one more bug in line 1190 and 1191: a casting to float is required otherwise the pure integer division will return an integer. it would be always 0.
Peter
replacing the bounding-box code from line 844 to 860 works for me.
Code: Select all
frame_min_x=mesh.verts[0].co[1]
frame_max_x=mesh.verts[0].co[1]
frame_min_y=mesh.verts[0].co[0]
frame_max_y=mesh.verts[0].co[0]
frame_min_z=mesh.verts[0].co[2]
frame_max_z=mesh.verts[0].co[2]
for vert_counter in range(0, md2.num_vertices):
if frame_min_x>mesh.verts[vert_counter].co[1]: frame_min_x=mesh.verts[vert_counter].co[1]
if frame_max_x<mesh.verts[vert_counter].co[1]: frame_max_x=mesh.verts[vert_counter].co[1]
if frame_min_y>mesh.verts[vert_counter].co[0]: frame_min_y=mesh.verts[vert_counter].co[0]
if frame_max_y<mesh.verts[vert_counter].co[0]: frame_max_y=mesh.verts[vert_counter].co[0]
if frame_min_z>mesh.verts[vert_counter].co[2]: frame_min_z=mesh.verts[vert_counter].co[2]
if frame_max_z<mesh.verts[vert_counter].co[2]: frame_max_z=mesh.verts[vert_counter].co[2]
Code: Select all
cmd.s=float(s)/md2.skin_width
cmd.t=float(t)/md2.skin_height