Anyone who cannot get a model working in-game read this
by Daniel 'Dufus' Rogers · in Torque Game Engine · 10/24/2001 (9:35 am) · 5 replies
Ok, after ages and ages of trying, finally, we (my group etc) have working player models in-game that work with run animations etc.
First off let me say anyone who reads this tutorial and benefits, please post a big hearty thankyou in the 'A quick thankyou to Joe Mauschak' thread, as this would not have come to pass without his knowledge.
Ok, here is what i have working. USE com_skin + biped.
Physique will make your DTS' absolutly huge!! not to mention about 3 hr export for 85 frames of animation...
The scene has:-
(X is a number for the detail thing)
model X
biped
bounds
dummies - eye, cam, mount0, detail X, unlink.
sequences - root, run.
Hirachy is as follows:-
Leave the model unlinked floating at the scene root
dont link anything to the model either
bounds, cam, unlink -> bip01 pelvis
detail X -> bip01
dont link anything else to bip01
mount0 -> whatever, usually bip01 right hand(?)
you can have mount0 - mount7 (8 pts)
sequences do not need to be linked to anything
File Saving:-
**filename are just examples**
ok, once you have set that up, go to save as and save as player_root.max then save as again and player_run.max.
Tricky Stuff:-
goto the player directory
Rename the player.dts to player.dts.old and the player.cs to player.cs.old
open your shape in max. save as player_root. max (or whatever) save as again, save as player_run.max (or whatever) goto the original shape, delete the sequence helpers and export it into the player directory as player.dts. make sure whenever you want to export a model with no sequences, you untick enable sequence export. remember to turn it back on when you do though as the exporter saves the settings.
open the player_root.max, delete the 'run' sequence helper, and export as root.dsq
open player_run.max, and delete the root sequence helper. Turn on the animate button, and goto the end of the sequence, grab the bip node, and make sure that it is moving forward from it's start position at least 3
meters. Animate the legs or something so you can see it in the tool when it plays, and then export it as run.dsq
Create a new player.cs in the player directory and make it look like this
datablock TSShapeConstructor(PlayerDts)
{
baseshape = "./player.dts";
sequence0 = "root.dsq root";
sequence1 = "run.dsq run";
};
do all the above, chuck it in the right dirs and load it up, then feel the bliss of finally getting it to work!!!=)
This isnt the be all and end all. but i have exactly that and it works. if it helps your model, thank Joe.
I'd be happy to answer questions if anyone is having problems, just go ahead and email me, or post replys.
HAPPY DAYS!!! =)
- Dufus
First off let me say anyone who reads this tutorial and benefits, please post a big hearty thankyou in the 'A quick thankyou to Joe Mauschak' thread, as this would not have come to pass without his knowledge.
Ok, here is what i have working. USE com_skin + biped.
Physique will make your DTS' absolutly huge!! not to mention about 3 hr export for 85 frames of animation...
The scene has:-
(X is a number for the detail thing)
model X
biped
bounds
dummies - eye, cam, mount0, detail X, unlink.
sequences - root, run.
Hirachy is as follows:-
Leave the model unlinked floating at the scene root
dont link anything to the model either
bounds, cam, unlink -> bip01 pelvis
detail X -> bip01
dont link anything else to bip01
mount0 -> whatever, usually bip01 right hand(?)
you can have mount0 - mount7 (8 pts)
sequences do not need to be linked to anything
File Saving:-
**filename are just examples**
ok, once you have set that up, go to save as and save as player_root.max then save as again and player_run.max.
Tricky Stuff:-
goto the player directory
Rename the player.dts to player.dts.old and the player.cs to player.cs.old
open your shape in max. save as player_root. max (or whatever) save as again, save as player_run.max (or whatever) goto the original shape, delete the sequence helpers and export it into the player directory as player.dts. make sure whenever you want to export a model with no sequences, you untick enable sequence export. remember to turn it back on when you do though as the exporter saves the settings.
open the player_root.max, delete the 'run' sequence helper, and export as root.dsq
open player_run.max, and delete the root sequence helper. Turn on the animate button, and goto the end of the sequence, grab the bip node, and make sure that it is moving forward from it's start position at least 3
meters. Animate the legs or something so you can see it in the tool when it plays, and then export it as run.dsq
Create a new player.cs in the player directory and make it look like this
datablock TSShapeConstructor(PlayerDts)
{
baseshape = "./player.dts";
sequence0 = "root.dsq root";
sequence1 = "run.dsq run";
};
do all the above, chuck it in the right dirs and load it up, then feel the bliss of finally getting it to work!!!=)
This isnt the be all and end all. but i have exactly that and it works. if it helps your model, thank Joe.
I'd be happy to answer questions if anyone is having problems, just go ahead and email me, or post replys.
HAPPY DAYS!!! =)
- Dufus
#2
10/24/2001 (2:56 pm)
When i try to export i get an error message "assertion failed on skin object" and then the .dts file is empty. Any ideas how i got about fixing this?
#3
Thanks
10/24/2001 (4:35 pm)
Can you take a snapshot of the schematic view and paste it up here? A good visual of the linkage might help.Thanks
#4
On the assertion failed, im not quite sure what that means. if you send me the max file, id be happy to look it over. just quickly skim the tut above to see if you missed something, if not, send away.
One thing i forgot to mention is that the model must all vertices weighted at least a bit by some bone. otherwise on export you get an obvious error, vertex XX missing weight or something.
heres the schematic view, hope it helps.
www.geocities.com/dufus_83/schematic1.jpg
see yas :)
- Dufus
10/24/2001 (5:40 pm)
heya.On the assertion failed, im not quite sure what that means. if you send me the max file, id be happy to look it over. just quickly skim the tut above to see if you missed something, if not, send away.
One thing i forgot to mention is that the model must all vertices weighted at least a bit by some bone. otherwise on export you get an obvious error, vertex XX missing weight or something.
heres the schematic view, hope it helps.
www.geocities.com/dufus_83/schematic1.jpg
see yas :)
- Dufus
#5
10/24/2001 (8:01 pm)
Make sure you unlink your skin mesh - it should have scene root as its parent.
Torque Owner Karsten "Clocks" Viese
// Clocks out