Game Development Community

Can MS export the default torque rig?

by Sean H. · in Artist Corner · 06/02/2006 (10:33 am) · 11 replies

This may seem like a silly question but I've been having problems trying to export the mr.box character successfully. This is what I did:

1. Place default torque dts model and dsq's into show directory.(note: i'm using showtool, not Showtool Pro)
2. Place accompanying player.cs into the same directory.
3. Copy the player.cs and name the copy mrbox.cs.
4. Export mrbox character from MS to show directory and place texture file there as well.
5. Change the first line of mrbox.cs from:

new TSShapeConstructor(playerdts)
to:
new TSShapeconstructor(mrboxdts)

6. Change the next line of mrbox.cs from:

base = "player.dts"
to:
base = "mrbox.dts"

*I'm not sure if this is exactly what the line says since I'm not in front of it right now, but I did something equivalent to this using the correct path relative to the show directory.

When I take a look at the model, its a jumbled up mess. I can make out two arms but it definitely doesnt look the way it's supposed to. When I bring up the thread control, I see all the correct sequences. The model seems to be trying to do the root animation. when I click an animation it starts moving around like it's attempting the animation but the model itself looks all screwy.

From my understanding the mrbox should be using all the default sequences that the default player is using. Note that before this, I took a look at the default character and animations and everything looks fine, so it's not a problem with the dsq's or showtool. I assumed I could just drop mrbox dts and texture in there, copy the script file, change the base shape reference and name and it should work. but its not. =(

Also, I read that MS only supports 2 bones per joint. If this is true, wouldnt this mean that MS can't export the torque default model, which is a standard biped model, or something like that? Is this the reason the model looks all screwed up? I was planning on buying the Jill Pack so I could use the skeleton to export animations using the default torque skeleton, but I'm starting to wonder if this is even possible with milkshape exporter.

Any information or advice would be greatly appreciated. And oh yeah, whats a .cfg file for?

#1
06/02/2006 (10:48 am)
Sounds to me as though you've moved the Joints at some point, somewhere; or added one? Mr. box works and loads the default sequences. If you got any animations going at all to view[ShowToolPro is best, shows Nodes and much more], that means it loaded all the sequences in the Constructor script correctly. Whether or not the mesh and skeletal rig deform correctly to the data is another story... In the past before mrBox, simply naming the Joints to the Nodes in the default sequences will allow them to load, but the shape if differing from the root pose of the sequences will render horrible deformations, such as what you are viewing...

The DTSPlus! documentation explains a .cfg file, you should read up on it, and all ms3d/dts fundamentals...;).

The Jill Pack does NOT use the standard SDK default skeleton. You will never get a shape from that Scene to load the default sequences, ever.

To be honest, there is NO such thing as a Bone in Milkshape3d being assigned to a Joint[well at least that I know of]. Vertices get Assigned to Joints. A Vertex can only be Assigned to one Joint. They are refered to as Joints, and they produce Nodes when exported with the DTSPlus! exporter. The Bone object merely physically links the Joints together and doesn't really have a role in anything DTS relevent, I hope??
#2
06/02/2006 (11:07 am)
First of all, thanks for the quick response Rex. I was hoping someone would see this post here.

well I didn't change the rig at all. I've done this twice and both times I got exactly the same result. I think it's some exporter option I'm setting or neglecting to set. I don't know why the rootpose for mrbox would be any different since I haven't made any changes to it.

the reason I assumed the jill pack uses the standard torque skeleton is because it's supposed to be compatible with the ragdoll pack which is compabible with the soldier pack and adam pack which. well, at least it's supposed to be compatible with Jill. was this an incorrect assumption to make?

yeah when I mentioned bones above I wasnt referring to joints, i was actually referring to the things which connect joints to each other. =) the old exporter matrix says ms only supports two bones per joint. i just wondered if this may be the reason my models coming out screwy...

Edit: OK I looked at the export matrix again and it actually says 2 bones per vertex which I assume is related to vertex weighting. thats fine and all, but I still can't figure out what I'm doing wrong...

is there some export option i should be checking before I export? I just export the model as is.
#3
06/02/2006 (11:12 am)
I just exported mrBox the other day...or very recently. Ah...check you finished shape's DMP file or in the ShowToolPro for ANY extra Nodes, such as Root, __mainTree, __meshes. Run the shape with a .cfg file with those in the Never Export: list.

I have found the Root Node the most troubling one when dealing with ms3d....if it ends up in a shape.
#4
06/02/2006 (11:29 am)
Thanks! I'll try that when I get home. and I guess I should read about the .cfg file as well. =)
#5
06/03/2006 (5:10 pm)
I'm still having trouble with this. I'm using the cfg file now, and checking the dump file but the cfg file doesn't seem to make any difference on the export process. this is what i have in my .cfg file:

+Error::AllowUnusedMeshes

-Materials::NoMipMap
-Materials::NoMipMapTranslucent
+Materials::ZapBorder

+Param::SequenceExport
-Param::CollapseTransforms

=Params::AnimationDelta 0.0001
=Params::SkinWeightThreshhold 0.001
=Params::SameVertTOL 0.00005
=Params::SameTVertTOL 0.00005
=Params::weightsPerVertex 1

+Dump::NodeCollection
+Dump::ShapeConstruction
+Dump::NodeCulling
+Dump::NodeStates
+Dump::NodeStateDetails
+Dump::ObjectStates
+Dump::ObjectStateDetails
+Dump::ObjectOffsets
+Dump::SequenceDetails
+Dump::ShapeHierarchy

NeverExport
__mainTree
__meshes
Root

I just added Root to the bottom of it and saved it. and this is what im seeing in the dump file:

Adding node "__mainTree" with parent "__mainTree" to subtree rooted on node "__mainTree".
Adding node "__meshes" with parent "__mainTree" to subtree rooted on node "__mainTree".
Adding node "Bip01 Pelvis" with parent "__meshes" to subtree rooted on node "__mainTree".
Adding node "Bip01 Spine" with parent "Bip01 Pelvis" to subtree rooted on node "__mainTree".
Adding node "Bip01 Spine1" with parent "Bip01 Spine" to subtree rooted on node "__mainTree".
Adding node "Bip01 Spine2" with parent "Bip01 Spine1" to subtree rooted on node "__mainTree".
Adding node "Bip01 Neck" with parent "Bip01 Spine2" to subtree rooted on node "__mainTree".
Adding node "Bip01 Head" with parent "Bip01 Neck" to subtree rooted on node "__mainTree".
Adding node "Eye" with parent "Bip01 Head" to subtree rooted on node "__mainTree".
Adding node "Bip01 L Clavicle" with parent "Bip01 Neck" to subtree rooted on node "__mainTree".
Adding node "Bip01 L UpperArm" with parent "Bip01 L Clavicle" to subtree rooted on node "__mainTree".
Adding node "Bip01 L Forearm" with parent "Bip01 L UpperArm" to subtree rooted on node "__mainTree".
Adding node "Bip01 L Hand" with parent "Bip01 L Forearm" to subtree rooted on node "__mainTree".
Adding node "Bip01 R Clavicle" with parent "Bip01 Neck" to subtree rooted on node "__mainTree".
Adding node "Bip01 R UpperArm" with parent "Bip01 R Clavicle" to subtree rooted on node "__mainTree".
Adding node "Bip01 R Forearm" with parent "Bip01 R UpperArm" to subtree rooted on node "__mainTree".
Adding node "Bip01 R Hand" with parent "Bip01 R Forearm" to subtree rooted on node "__mainTree".
Adding node "Mount0" with parent "Bip01 R Hand" to subtree rooted on node "__mainTree".
Adding node "Mount2" with parent "Bip01 Spine2" to subtree rooted on node "__mainTree".
Adding node "Mount1" with parent "Bip01 Spine2" to subtree rooted on node "__mainTree".
Adding node "Bip01 L Thigh" with parent "Bip01 Spine" to subtree rooted on node "__mainTree".
Adding node "Bip01 L Calf" with parent "Bip01 L Thigh" to subtree rooted on node "__mainTree".
Adding node "Bip01 L Foot" with parent "Bip01 L Calf" to subtree rooted on node "__mainTree".
Adding node "Ski0" with parent "Bip01 L Calf" to subtree rooted on node "__mainTree".
Adding node "Bip01 R Thigh" with parent "Bip01 Spine" to subtree rooted on node "__mainTree".
Adding node "Bip01 R Calf" with parent "Bip01 R Thigh" to subtree rooted on node "__mainTree".
Adding node "Bip01 R Foot" with parent "Bip01 R Calf" to subtree rooted on node "__mainTree".
Adding node "Ski1" with parent "Bip01 R Calf" to subtree rooted on node "__mainTree".
Adding node "Unlink" with parent "__meshes" to subtree rooted on node "__mainTree".
Adding node "Cam" with parent "Unlink" to subtree rooted on node "__mainTree".
Adding node "Root" with parent "__meshes" to subtree rooted on node "__mainTree".

so not only is root being added, but _meshes and _maintree is being added too. am I doing something wrong? oh yeah, and I know that the cfg file is being used in the export process:

Begin reading config file "mrbox.cfg".

is the first line. Any suggestions?
#6
06/03/2006 (5:26 pm)
As you read further along in the .DMP file, you'll see the Third Pass where the Nodes are culled as needed by the .cfg file...post the bottom portion of the file, where the hierarchy is listed...

Yep. Works fine here, just exported mr.box again and it loaded all the sequences and he looks 'normal' in the viewer...?!?

Oh, that's not how to set the line for the .cfg file, I now see you've never really used one. Put the
NeverExport:
__mainTree
__meshes
Root
above the parameters, end the List correctly[:], and see what happens. You are actually 'coding' the shape, so punctuation matters...;).
#7
06/03/2006 (6:18 pm)
Yes I've never used a .cfg file before so I have no idea what I'm doing. I just copied what was in the documentation and added Root at the bottom.

I still don't understand how the .cfg file is configured for never export nodes. you say put that above the "parameters" what do you mean by that? the entire file looks like parameters. should it go at the top? and what do you mean by end the list correctly? are you just talking about the colon after "NeverExport"?
#8
06/03/2006 (7:09 pm)
Every .cfg file I've seen or written has the 3 Node lists first, AlwaysExport:, NeverExport:, and NeverAnimate:.

Yes, include the colon after the list title/heading/whatever...

The Shape is first constructed, then later in the process, it will remove the 'unneeded' Nodes...from the NeverExport: list...or I believe if you check collapse transforms, any Nodes not assigned vertices or animations, get culled. That's usually for exporting sequences, but still then you might get unwanted Nodes included, then use the Lists to trim to taste.
#9
06/03/2006 (10:46 pm)
This is really frustrating me. this is what I have in the .cfg file now:

NeverExport:
__mainTree
__meshes
Root

+Error::AllowUnusedMeshes

-Materials::NoMipMap
-Materials::NoMipMapTranslucent
+Materials::ZapBorder

+Param::SequenceExport
-Param::CollapseTransforms

=Params::AnimationDelta 0.0001
=Params::SkinWeightThreshhold 0.001
=Params::SameVertTOL 0.00005
=Params::SameTVertTOL 0.00005
=Params::weightsPerVertex 1

+Dump::NodeCollection
+Dump::ShapeConstruction
+Dump::NodeCulling
+Dump::NodeStates
+Dump::NodeStateDetails
+Dump::ObjectStates
+Dump::ObjectStateDetails
+Dump::ObjectOffsets
+Dump::SequenceDetails
+Dump::ShapeHierarchy

the model is still coming out screwy.
#10
06/03/2006 (11:37 pm)
Success! i finally got it working. it was the scale. by default it's set to 0.1 it should be 1. thanks for your help Rex.
#11
07/02/2006 (3:55 pm)
Yeah i got caught out with that just now. i happened to notice the tiny little man when i was testing it thought :)