Skip to main content
gamedev.net
🔒 Locked

.smd format question

Started by Dogen 0 replies 350+ views
Original Post
Dogen
Dogen
Hello there I am about to write an .smd loader to my 3d application but i am having some problems now. First I started to read the 3d model which lookes something like this: " triangles biohazard.bmp 7 -3.7761 0.6778 61.1074 -0.9167 0.2551 0.3077 0.6934 0.1934 7 -2.6761 2.1338 62.1404 -0.7770 0.5377 0.3274 0.7227 0.1504 7 -2.8361 3.1086 61.4364 -0.6581 0.3648 0.6587 0.7051 0.1191 biohazard.bmp 7 -2.8361 3.1086 61.4364 -0.6581 0.3648 0.6587 0.7051 0.1191 7 -2.6761 2.1338 62.1404 -0.7770 0.5377 0.3274 0.7227 0.1504 7 -2.0861 3.7120 61.5280 -0.3982 0.6699 0.6266 0.7070 0.1016 ... " First i wonder if anyone knows if the format above is correct as i understood it: [bone, x, z, y, nx, nz, ny, tu, tv] You can interpret this in another order and the model would end up in another direction. There wasn''t really a problem with this but i want to make sure that i have done this correct. Anyhow soon I had the model in my application and I started with the bones and this is where i have my problems. First i read the nodes section which looks something like this: " nodes 0 "Bip01" -1 1 "Bip01 Pelvis" 0 2 "Bip01 Spine" 1 ... " It was quite easy to understand that the first value was the number of the bone and the second the name and the third its father. Now i came to the part with the position and orientation of the bones that lookes like this: " skeleton time 0 0 0.233849 -2.251689 38.192150 0.000000 0.000000 -1.570795 1 -2.276935 0.000003 -1.238186 -1.570795 -1.570451 0.000000 2 1.797145 0.711796 -0.000002 -0.000004 -0.000001 0.000739 ... " First thought that the format was like this: [nr, x, z, y, rx, rz, ry] where: x,y,z = position of the bone relatively to its fathers position rx = rotation around the x axis ry = rotation around the y axis rz = rotation around the z axis but when i opened the model terror.smd (from the arctic player where i have taken the previous examples from) in Milkshape3D it appears that this isn''t the case. Here I look at the first bone: "0 0.233849 -2.251689 38.192150 0.000000 0.000000 -1.570795" If you rotate the (0, 0, -1.570795) radians specified and the place the bone at (0.233849 -2.251689 38.192150) (x, z, y) you end up with the bone on location (2.251689, 0.233849, 38.192150)(x,z,y) and this isn''t correct if you compare it to the coordinates in Milkshape3D, there the x and z values are swapped So my question is what does all these number mean an in what order are they? /Dogen

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.