Details about stock torque player skeleton
by Chris Calef · in Torque Game Engine · 12/30/2004 (10:20 am) · 4 replies
[EDIT -- I figured it out. thanks]
---------------------------------------------
Hey all you dts/3ds experts out there...
I'm writing a dts exporter from ODE, using dtsSDK. It's working great; I can make my own models and export animations as dts or dsq. However, the remaining hurdle is to hook up the dsq to work with the player skeleton. I can write one that loads into the player model in show tool, but the problem is I don't understand how the initial player model is set up.
When I print out the default Translations from tsShape on loading the model, they look very strange. apparently all bodyparts are oriented more or less along the X axis, before rotations. Here's a sample:
0 Bip01 Pelvis (-0.000081 0.000008 1.281183)
1 Bip01 Spine (0.117738 -0.000117 0.006952)
2 Bip01 Spine1 (0.149188 -0.000155 0.000006)
3 Bip01 Spine2 (0.202462 -0.000163 0.000029)
4 Bip01 Neck (0.209867 -0.000049 -0.000021)
5 Bip01 Head (0.067264 -0.000000 -0.000000)
The only one there that makes sense to me is the pelvis, as it's set at its global starting point. In my model, the spine, spine1, etc. would be set up on the Z axis, not the X. But even if that made sense (say the model was initially oriented laying down on the X axis), it still doesn't work to have, for example, the R and L upper arms also (both) oriented on positive X:
8 Bip01 L UpperArm (0.358891 -0.000000 0.000000)
12 Bip01 R UpperArm (0.358891 -0.000000 0.000000)
Can anyone explain to me how this works?
thanks!
chris
---------------------------------------------
Hey all you dts/3ds experts out there...
I'm writing a dts exporter from ODE, using dtsSDK. It's working great; I can make my own models and export animations as dts or dsq. However, the remaining hurdle is to hook up the dsq to work with the player skeleton. I can write one that loads into the player model in show tool, but the problem is I don't understand how the initial player model is set up.
When I print out the default Translations from tsShape on loading the model, they look very strange. apparently all bodyparts are oriented more or less along the X axis, before rotations. Here's a sample:
0 Bip01 Pelvis (-0.000081 0.000008 1.281183)
1 Bip01 Spine (0.117738 -0.000117 0.006952)
2 Bip01 Spine1 (0.149188 -0.000155 0.000006)
3 Bip01 Spine2 (0.202462 -0.000163 0.000029)
4 Bip01 Neck (0.209867 -0.000049 -0.000021)
5 Bip01 Head (0.067264 -0.000000 -0.000000)
The only one there that makes sense to me is the pelvis, as it's set at its global starting point. In my model, the spine, spine1, etc. would be set up on the Z axis, not the X. But even if that made sense (say the model was initially oriented laying down on the X axis), it still doesn't work to have, for example, the R and L upper arms also (both) oriented on positive X:
8 Bip01 L UpperArm (0.358891 -0.000000 0.000000)
12 Bip01 R UpperArm (0.358891 -0.000000 0.000000)
Can anyone explain to me how this works?
thanks!
chris
About the author
#2
this makes it seem more like a "root position" thing where 3ds starts everything aligned with the X axis, but then there are exceptions to this theory as well.
Hmm.
Anyway, thanks for the input, I'll keep plugging away.
12/30/2004 (1:27 pm)
Yeah, I'd expect the bone initial translations to set them up in the default pose as well, hence my confusion with the fact that the right and left upper arms, for example, have identical default translations. Not one axis flipped, like you'd expect for "right and left" anything.this makes it seem more like a "root position" thing where 3ds starts everything aligned with the X axis, but then there are exceptions to this theory as well.
Hmm.
Anyway, thanks for the input, I'll keep plugging away.
#3
12/30/2004 (4:33 pm)
I just checked to see how biped aligns it's bone transforms, and indeed, when the skeleton is first created the arms transforms are oriented nearly identically. It looks like everything above the pelvis has the positive Z pointing to the left with x pointing down, and everything below has the positive Z pointing to the right with X pointing down. Also it's default pose is standing straight up, but with arms down against the body.
#4
I think I'm doing okay... when I started this conversation part of my problem was confusion over the rotations, which I've partially solved. Hopefully it will all put itself together the way it's supposed to go when I get it all combined. Got a few things to do between here and there but I'll come back here and post results when it works.
12/30/2004 (8:18 pm)
Hey, thanks for verifying that! Kinda weird starting position, but whatever works...I think I'm doing okay... when I started this conversation part of my problem was confusion over the rotations, which I've partially solved. Hopefully it will all put itself together the way it's supposed to go when I get it all combined. Got a few things to do between here and there but I'll come back here and post results when it works.
Torque 3D Owner Martin "Founder" Hoover
What I mean is, that when the mesh was built (Most likely in 3dsMax) it was set in whatever arbitrary pose the artist chose (usually standing straight up, arms stretched out to either side at shoulder level). The bone structure is then built to fit the model, and aligned to the mesh. Then each mesh object is linked to the appropriate bone , if it is a segmented mesh. A skin mesh does something similar, but it's only the vertex's that get linked to a particular bone.
Once linked, the mesh objects always maintain the same position relative to the bone they are linked to. So as the bone is moved, the mesh objects (or vertices) move the same amount/direction. Now I say there are no rules because you can use any type of bone for the setup. Be it a biped skeleton, a custom made bone skeleton, or simply a set of nodes (or dummy objects) You can use as many or as few bones as needed, and there is no requirement for naming conventions.
It is probably worth noting that the orientations that you are getting may very well be from the root pose of the mesh, and not from the pose/postions at which the mesh was linked. Also the bone orientation for a root pose will be different then it's creation orientation.
I hope this helps some. If I am flat out wronge about it I apologize in advance, but that's my understanding of it FWIW.