1. Off-by-1 bug in nex_smd_mesh_export.py
The script does'nt export animations correctly. Line 809 of nex_smd_mesh_export.py should be:
- Code: Select all
self.file.write( '%i "%s" %i\n' % ( bone.index, bone.name, bone.parent.index ) )
instead of
- Code: Select all
self.file.write( '%i "%s" %i\n' % ( bone.index, bone.name, bone.parent.index + 1 ) )
2. Wrong error message in zmodel
zmodel is reporting a wrong bone name on certain errors with the sceleton definition. Line 484 should be
- Code: Select all
printf("warning: duplicate global bone definition ...", bone[i].name, bone[i].parent, parent);
instead of
- Code: Select all
printf("warning: duplicate global bone definition ...", name, bone[i].parent, parent);
3. Animation names messed up
The animation names/names of the smd files are not correct. For me, the following smd files are mapped to thes animations:
backleft.smd -> backleft
backright.smd -> backright
dead1.smd -> dead1/2
dead2.smd -> dead1/2
die1.smd -> draw
die2.smd -> duck
draw.smd -> duckwalk
duckidle.smd -> jump
duckjump.smd -> idle
duck.smd -> duckjump
duckwalk.smd -> duckidle
forwardleft.smd -> forwardleft
forwardright.smd -> forwardright
idle.smd -> die/1/2
jump.smd -> pain1/2
pain1.smd -> pain1/2
pain2.smd -> shoot
runbackwards.smd -> runbackwards
run.smd -> die1/2
shoot.smd -> ? (taunt is the only one left, but I didn't see anything)
strafeleft.smd -> strafeleft
straferight.smd -> straferight
taunt.smd -> run
4. Weights other than 0/1?
The sources of zmodel say that it would be the smd format which only knows weights 1 and 0 of vertixes being assigned to bones:
zmodel.c wrote:// the origin is relative to the bone and scaled by percentage of influence (in smd there is only one bone per vertex, so that would be 1.0)
But that's not true: One vertex in an smd file (or at least the smd file the smd exporter creates) is given in the following way:
- Code: Select all
1 -39.999996 40.000000 0.000000 0.000000 0.000000 40.000000 0.502972 0.502972 2 1 0.600000 0 0.400000
Where the columns are:
1: BoneID
2-4: Coords
5-7: Normal coords
8-9: UV coords
10: Number of Bones this vertex belongs to
11+: Bone ID/weight pairs
The zmodel reads only the columns 1-9, thus no weights. Or at least that's what I can find in the zmodel source, line 639. Now the question is: Can the zym format handle weights? The comment in zmodel.c sort of gave me hope that such a thing could be possible...