Exporting animations from Gamespace
by Danner Jones · in Artist Corner · 07/24/2004 (9:26 pm) · 2 replies
I know people are using Gamespace to export animation characters - specifically, player models. While I'm getting pretty good (intermediate level) at using Gamespace, I'm having trouble getting the clips to work right in the scene editor, especially when it comes to loading some default animations.
In this thread, Jason Toubia seems to have gotten players to export with animation as long as he's created the animations himself and embedded them in the character (not exporting DSQs).
I'm having one heck of time trying to get ANY player animation into Torque from Gamespace using the "default" tools. I'll quickly mention that I bought the Darkmatter pack, but the models do NOT have skeletons so I've left these alone for now.
Ideally, here's what I'd like - not sure if I'm barking up the wrong tree or just not spending enough time:
Create a default mesh and 2 animations: the equivalent of idle and run. Hook them up in Torque so that idle plays while standing still and run plays while running - don't really care what happens on jumping, landing, dieing, etc.
Also "ideally", I'd be able to pull in some default mesh, skeleton and animation just to prove out the flow of getting a model with animation into the game and not rig the skeleton manually or do the animations manually.
My first attempt was to use puppeteer and place a dummy mesh/skeleton (the red and green guy) into Gamespace and load in two puppeteer animations. According to the exporter docs, I need the animations in separate clip files. Try as I might, I can't quite figure out how to get the loaded animations into separate clips. I've read through the PDF docs three times and I still can't get it.
I then copied the DTS into the data/shapes/player folder (replaced player.dts with mine). I modified that player.cs file to only have one animation: sequence0 set to my new dsq file (just one clip, a running animation I *think*) and ran. The player shows up but never animates. I tried various takes on what was in the clip in scene editor and exporting various DSQs but none of the animations seemed to work. I also tried checking "export animation" and that didn't seem to work in Torque either (when checking this box, I did NOT run the player.cs script in the data... folder).
I quickly tried renaming all the bones and joints to match those that the engine expects (the names used by 3DS such as "Bip01 Pelvis" instead of Puppeteer's "Bip01 Pelv". I then tried exporting just the DTS with no animation in the blind hope that the default player DSQ files would work. As expected, that didn't really take off :)
The exporter seems like it's finding the animation clip just fine:
I've even tried some very "simple" tests, such as:
1. New Scene
2. Add a mesh/skeleton from Puppeteer
3. Add the Run animation
4. Rename the clip from NoName to "root"
5. Add eye and mount0 nodes.
6. Verify all objects (mesh, nodes, and bounds) exist in the proper layers.
7. Export with animation
8. Remove exec to player.cs in data... folder
Still no luck getting the DTS in game, animated.
Add step 9. Rename bones (according to this thread). Still no luck.
(continued)
In this thread, Jason Toubia seems to have gotten players to export with animation as long as he's created the animations himself and embedded them in the character (not exporting DSQs).
I'm having one heck of time trying to get ANY player animation into Torque from Gamespace using the "default" tools. I'll quickly mention that I bought the Darkmatter pack, but the models do NOT have skeletons so I've left these alone for now.
Ideally, here's what I'd like - not sure if I'm barking up the wrong tree or just not spending enough time:
Create a default mesh and 2 animations: the equivalent of idle and run. Hook them up in Torque so that idle plays while standing still and run plays while running - don't really care what happens on jumping, landing, dieing, etc.
Also "ideally", I'd be able to pull in some default mesh, skeleton and animation just to prove out the flow of getting a model with animation into the game and not rig the skeleton manually or do the animations manually.
My first attempt was to use puppeteer and place a dummy mesh/skeleton (the red and green guy) into Gamespace and load in two puppeteer animations. According to the exporter docs, I need the animations in separate clip files. Try as I might, I can't quite figure out how to get the loaded animations into separate clips. I've read through the PDF docs three times and I still can't get it.
I then copied the DTS into the data/shapes/player folder (replaced player.dts with mine). I modified that player.cs file to only have one animation: sequence0 set to my new dsq file (just one clip, a running animation I *think*) and ran. The player shows up but never animates. I tried various takes on what was in the clip in scene editor and exporting various DSQs but none of the animations seemed to work. I also tried checking "export animation" and that didn't seem to work in Torque either (when checking this box, I did NOT run the player.cs script in the data... folder).
I quickly tried renaming all the bones and joints to match those that the engine expects (the names used by 3DS such as "Bip01 Pelvis" instead of Puppeteer's "Bip01 Pelv". I then tried exporting just the DTS with no animation in the blind hope that the default player DSQ files would work. As expected, that didn't really take off :)
The exporter seems like it's finding the animation clip just fine:
Beginning to scan scene for animation information 1 animation clips found Clip: name=root start=0 end=24 length=25 toggle=0 loop=0 Searching root for tags... Done searching. End animation scan
I've even tried some very "simple" tests, such as:
1. New Scene
2. Add a mesh/skeleton from Puppeteer
3. Add the Run animation
4. Rename the clip from NoName to "root"
5. Add eye and mount0 nodes.
6. Verify all objects (mesh, nodes, and bounds) exist in the proper layers.
7. Export with animation
8. Remove exec to player.cs in data... folder
Still no luck getting the DTS in game, animated.
Add step 9. Rename bones (according to this thread). Still no luck.
(continued)
#2
The puppeteer biped is made of individual objects instead of one solid mesh. The current version of the exporter does not support skeletal animation using rigid objects. If you take the puppeteer simple biped and copy the skeleton and then delete the one linked to the objects. Then union all the objects into one mesh and then reattach the skeleton you can then import the animations that come with puppeteer and export an animated object.
Version 2.0 of the gameSpace DTS exporter handels skeletal animation on rigid objects properly so these extra steps are not required.
We will be releasing a simple animated character object for gameSpace shortly after the next release of the gameSpace DTS exporter. I'm sure this will help out many people.
Later...
07/24/2004 (10:45 pm)
Hello Dan,The puppeteer biped is made of individual objects instead of one solid mesh. The current version of the exporter does not support skeletal animation using rigid objects. If you take the puppeteer simple biped and copy the skeleton and then delete the one linked to the objects. Then union all the objects into one mesh and then reattach the skeleton you can then import the animations that come with puppeteer and export an animated object.
Version 2.0 of the gameSpace DTS exporter handels skeletal animation on rigid objects properly so these extra steps are not required.
We will be releasing a simple animated character object for gameSpace shortly after the next release of the gameSpace DTS exporter. I'm sure this will help out many people.
Later...
Torque 3D Owner Danner Jones
I'm really a programmer, not an artist. I do love to dabble and I'm about intermediate at using Gamespace. I'd really just like to get a simple, animated player in the game so that I can do some more tweaking of the engine to support some new animations (such as crawling and swimming). I've already heavily documented the use of the player class for setting up animations and was starting on bones and such (what's hard-coded, what can change) when I ran into trouble getting a custom player in the game.
Once I have the "flow" of exporting players and animations down, I'll finish writing up what I have and hand it off to the modellers (just friends of mine, they have other things to do in the meantime).
ANY input or hints/tips would be greatly appreciated.
-ner