@ GOM and Casuir
I took your and Caliban's advice and looked at the
.smd format (documented thank goodness!)
I've got my script so it outputs all the uv, vertex weights,
primary bone and secondary bone, plus the vertex normals
in the .smd format by triangles.
I'm confused by the node tree and skeleton pose data though.
I just copied the bonestrings part of the .mesh file and put
it in .smd format like
Code:
version 1
! Node tree or bone ID assignment section
nodes
0 "bone_pelvis" -1
1 "bone_rthigh" 0
2 "bone_rlowerleg" 1
3 "bone_rfoot" 2
4 "bone_abs" 3
5 "bone_torso" 4
6 "bone_head" 5
7 "bone_jaw" 6
8 "bone_eyebrow" 7
9 "bone_rclavical" 8
10 "bone_rupperarm" 9
11 "bone_relbow" 10
12 "bone_rhand" 11
13 "bone_lclavical" 12
14 "bone_lupperarm" 13
15 "bone_lelbow" 14
16 "bone_lhand" 15
17 "bone_lthigh" 16
18 "bone_llowerleg" 17
19 "bone_lfoot" 18
20 "bone_weapon01" 19
20 "bone_weapon" 20
21 "bone_weapon02" 20
22 "bone_weapon03" 21
22 "bone_shield01" 22
22 "bone_shield" 22
end
but this probably isn't right since the first number is supposed to
be the bone id and the second number is the parent id. Should
the first number just go up monotonically or should I just remove
duplicate weapon and shield entries?
Second question is the skeleton pose block which is
ID Posx Posy Posy Rotx Roty Rotz
The spec says bones that are children of other bones
report position and rotations in their parent's local space.
The rotations are spec'd as Euler rotations in radians.
I'm assuming this means body frame roll, pitch, and yaw (for x, y, and z).
For now I'm just putting in 0's but this probably won't work.
Can't test until I get home.
Code:
!Skeleton pose data
Skeleton
Time 0
0 0.0 0.0 0.0 0.0 0.0 0.0
1 0.0 0.0 0.0 0.0 0.0 0.0
2 0.0 0.0 0.0 0.0 0.0 0.0
3 0.0 0.0 0.0 0.0 0.0 0.0
4 0.0 0.0 0.0 0.0 0.0 0.0
5 0.0 0.0 0.0 0.0 0.0 0.0
6 0.0 0.0 0.0 0.0 0.0 0.0
7 0.0 0.0 0.0 0.0 0.0 0.0
8 0.0 0.0 0.0 0.0 0.0 0.0
9 0.0 0.0 0.0 0.0 0.0 0.0
10 0.0 0.0 0.0 0.0 0.0 0.0
11 0.0 0.0 0.0 0.0 0.0 0.0
12 0.0 0.0 0.0 0.0 0.0 0.0
13 0.0 0.0 0.0 0.0 0.0 0.0
14 0.0 0.0 0.0 0.0 0.0 0.0
15 0.0 0.0 0.0 0.0 0.0 0.0
16 0.0 0.0 0.0 0.0 0.0 0.0
17 0.0 0.0 0.0 0.0 0.0 0.0
18 0.0 0.0 0.0 0.0 0.0 0.0
19 0.0 0.0 0.0 0.0 0.0 0.0
20 0.0 0.0 0.0 0.0 0.0 0.0
20 0.0 0.0 0.0 0.0 0.0 0.0
21 0.0 0.0 0.0 0.0 0.0 0.0
22 0.0 0.0 0.0 0.0 0.0 0.0
22 0.0 0.0 0.0 0.0 0.0 0.0
22 0.0 0.0 0.0 0.0 0.0 0.0
end
It seems like we would lose the triangle mesh type names
and mesh group names in this format. Would this matter?
Bookmarks