Animation export with DSQ files
by University of Gotland (#0009) · in Torque Game Engine · 04/06/2006 (2:37 am) · 2 replies
I have not managed to make my DSQ animations load together with the shape,
though the character mesh with bones exports fine both in ShowTool and ingame.
Wasn't sure what to include in the CFG files for the DSQs, so I went with the same one as for the mesh (probably including some unnecessary nodes, but this shouldn't result any other problem than slowing the playing down, should it?).
Made separate MAX files for each animation (only two so far), and deleted the mesh in them. Created an animation with Auto Key, made a Sequence object and set its begin and end frame. Then chose Export > Sequences and named them player_walk.dsq respectively player_root.dsq.
Lastly I created this CS file:
datablock TSShapeConstructor(PlayerDts)
{
baseShape = "./player.dts";
sequence0 = "player_root.dsq root";
sequence1 = "player_walk.dsq run";
};
This did not work, no sequences was loaded in ShowTool. Could it be any name referencing that I missed out, or did I do some step entirely wrong or not at all? I would greatly appreciate if you have any ideas on what it might be!
(My DTS is named player.dts, the CFG player.cfg and the CS player.cs. All files are put in the same folder.)
though the character mesh with bones exports fine both in ShowTool and ingame.
Wasn't sure what to include in the CFG files for the DSQs, so I went with the same one as for the mesh (probably including some unnecessary nodes, but this shouldn't result any other problem than slowing the playing down, should it?).
Made separate MAX files for each animation (only two so far), and deleted the mesh in them. Created an animation with Auto Key, made a Sequence object and set its begin and end frame. Then chose Export > Sequences and named them player_walk.dsq respectively player_root.dsq.
Lastly I created this CS file:
datablock TSShapeConstructor(PlayerDts)
{
baseShape = "./player.dts";
sequence0 = "player_root.dsq root";
sequence1 = "player_walk.dsq run";
};
This did not work, no sequences was loaded in ShowTool. Could it be any name referencing that I missed out, or did I do some step entirely wrong or not at all? I would greatly appreciate if you have any ideas on what it might be!
(My DTS is named player.dts, the CFG player.cfg and the CS player.cs. All files are put in the same folder.)
#2
Thanks for the information anyway, it was good to know!
04/17/2006 (2:57 am)
I found the problem to be a very simple one: I had accidentally set the exporter to only take N = 2 frames... of course it could not get the keyframes for the animation then.Thanks for the information anyway, it was good to know!
Torque Owner Rex
BrokeAss Games
...and for this process[building a .dts shape & .dsq files uses the .cfg], the .cfg file is not needed, IFRC. Only the Constructor datablock[.cs], sequence files[.dsq{s}], and the baseShape[.dts] are needed to load the shape. Now, the ShowToolPro does the Constructor compiling[IFRC], so if you're trying to accomplish this with the engine/SDK only, the Constructor datablock file needs to be executed from some point, generally in the script describing the object.
Also, producing .dsq files with more Nodes than actually used/needed, will begin to bite you hard when it comes to blending sequences together, which is a good portion of the NLA schema. Take a close look at the armThread sequences[looks, heads, recoils etc] and see what Nodes are included within the sequence. Unless the non-needed used bones are close to the root sequence, there will begin to be visual conflicts as two separate sequences[being blended] fight for control of the node...causing twitching, jittering...etc...bad rotations.