Game Development Community

Death animation crashes

by Nick Kossintsev · in Torque Game Engine · 04/30/2003 (7:15 am) · 25 replies

Hi,

I'm experiencing a strange crash trying to incorporate a Death1 animation into my game. All other animation sequences are functioning correctly and even Death1 is showing up correctly in the show tool. However, dying in the game (whether ctrl+k'ing or getting killed by ai player or whatever) causes the torqueDemo to crash with unhandled exception.
The DSQ sequence does NOT ignore the ground transform (so that checkbox is UNCHECKED in exporter), it is NOT cycled, and the transforms are NOT being collapsed. It is a standard full body animation that exports correctly but fails to function in the game.

Any help or ideas will be greatly appreciated.

-Nick
Page «Previous 1 2
#1
04/30/2003 (9:01 am)
I'm not a modeller but I think that if it works in the show tool but crashes the engine that usually means that your config file animation list does match the animations you have for your model.
#2
05/01/2003 (7:29 am)
No, Matthew, that is not the case here. All of the animations were made for that model specifically. That is why they are displayed correctly in the show tool.
My best guess is that there is something special about the export of death animations that is not being mentioned in the docs/forums.

So, if anyone out there has successfully modeled and imported a death animation, could you please either inform me of the special steps you took to get it to work or email me your original animation files? Your help is greatly appreciated...
#3
05/01/2003 (6:15 pm)
Well, this might be a stupidly obvious suggestion, but why dont you use VC++ and start the game in debug mode? Hit ctrl f10 to run to cursor or something, and then when you get that error, vc++ will catch it and you can take a look at what is happening in the code.
#4
08/09/2003 (11:22 am)
I've been getting this same problem. Looking at the default player death animations it looks like they are some special kind of animation that isnt documented. They appear to not even be animated, just a new set of coordinates for the bone nodes. I tried messing with my sequences properties but couldnt figure out how to export such an animtion, did you ever figure this out? or does anyone else know? Someone really should update the docs with this info
#5
08/09/2003 (2:15 pm)
Bump!
#6
08/09/2003 (3:38 pm)
I had the same problem with some charcters that I started with. The death animations and several others were not loading. I found out it was because I did not have the dummy object's ski1 and ski0 attached to the biped. But it also gave me that error in the console.log file in the game root directory.

So with your custom models do you have all the dummy objects defined? Like eye camera, mount0 etc...? Just a question.

The docs can be found here.

www.garagegames.com/docs/torque/tools/max2dts/index.html
dummy helper objects listed below
www.garagegames.com/docs/torque/tools/max2dts/schematic.html

another snipit from the end of the docs

My animations are not loading into my shape? What is going on?

The problem is most probably either that your sequences contain nodes that are not in the DTS file OR there is a syntax error in your .CS file.
#7
08/09/2003 (3:54 pm)
Hey britton, I'm not really sure what ski1 and ski2 are, I've never used biped for any of my characters, is it a biped specific thing? I have all the mount points needed, I have all the correct nodes exporting, my cs file is fine, and I have half a dozen other animations that work fine. (the death animation shows up in showtool and is binded in the thread control just fine) those were the docs I was looking for info on exporting the death animtion in, but couldnt find anything. I believe the death animation (and things like turning the head and stuff) are some kinda special animation since in showtool they appear to be a repositioning of the characters nodes, not an actual animation. When I try and export a non cyclic animation with only one keyframe (which is what it appears that it should be) the animation doesnt seem to do anything in showtool, it works but it doesnt move the character, and it still crashes the engine in game. Britton, did you get your death animations working? and if so how did you export them?
#8
08/09/2003 (5:21 pm)
Bump!
#9
08/09/2003 (10:33 pm)
Eric - Calm down, man. Usually a bump is needed after a day or two of silence, not an hour and fifteen minutes!

The show tool is NOT a test that the model will work in-game, only that it exported OK. A lot of the C++ code relies on there being nodes in the model with names from the Biped skeleton, or with other names like ski1, ski2, etc. - and it will crash if it cannot find them!

As Britton pointed out, you need to have ski1, ski2, ski0 nodes, as the Player class has special code to make the player conform to the terrain when he's dead, which is accomplished by casting rays down from the ski nodes, I would guess.
#10
08/09/2003 (10:58 pm)
Thank you Ben, sorry about the bump, its just that I feel I have a much better chance of getting a quick response if I can keep things in the top 5, and since the contenders at the time were "could someone teach me how to model?", "I want to buy torque but I dont want to spend the money" and "think tanks is a cool game!" I honestly felt that my question should take priority. Also I'm just frustrated that I have to wait 3 days for my questions to get answered everytime I run into an area of torque that is poorly documented (since that is all the time).

Something you said worried me a bit, you mentioned that the engine required some nodes to have the name of nodes in the biped object, is there any chance you could tell me what they are? the docs say nothign about this, and I have been making my own custom skeletons for everything. This is the first I've heard that your animations wont work unless you use the biped frame. As for the ski nodes, could you tell me a little about what they do exactly? the docs just had a diagram of the skeleton with them listed, and they were commented out of the never export list on the example cfg file (like I said, poorly documented). Any insight into any of this would be greatly appriciated :)
#11
08/10/2003 (11:40 am)
The code casts a ray down from each of them to determine the plane that the player should lay on. There are three nodes, because three point define a plane :)

I am guessing here, but it seems like this is how things ought to be working. If my advice doesn't add up, I'll investigate more thoroughly.

I would suggest grepping player.cc, if your C++ skills are up to it, for Biped, which will bring up all the hardcoded references to the biped skeleton and looking through the Death animation stuff, too.
#12
08/10/2003 (2:43 pm)
Hey, it looks like the biped references are

// Resolve spine
spineNode[0] = shape->findNode("Bip01 Pelvis");
spineNode[1] = shape->findNode("Bip01 Spine");
spineNode[2] = shape->findNode("Bip01 Spine1");
spineNode[3] = shape->findNode("Bip01 Spine2");
spineNode[4] = shape->findNode("Bip01 Neck");
spineNode[5] = shape->findNode("Bip01 Head");

thats all I could find anyway. I also looked through the death stuff, it was a bit over my head, I tried to make sense of it but there are several funcitons and I'm afraid I couldnt really identify what some of them even did. I tried putting the ski nodes on my model... didnt help with the crashing, I guess I'll probably need the spine nodes as well.

I have a question Ben, do you know if its it would be easy to just reasign the death animation as the same type as say the running animation? or is it to integrated with all the aspecs of a characters death? I dont care if my character conformes to the terrain when it dies, I just want it to work :P
#13
10/04/2004 (2:45 pm)
I'm having this same problem, I do have a ski0, ski1, and ski2 nodes in each of my scenes. I'm exporting 1 dts and 3 dsq's. I have the same setup in each scene. Can anyone explain why it would still crash even with the ski nodes there?

Please help! :D
#14
10/04/2004 (2:52 pm)
What modeling program / exporter are you using?

The crash on death animation was (if I remember right) due to the lack of a Ground Transform in the animation.
#15
10/04/2004 (3:07 pm)
Oops, sorry, I guess I should've mentioned that.

I'm using Max 5, and the I guess default exporter for max.

Ground Transform? I'll sound like a newbie, but what's that?
#16
10/04/2004 (5:13 pm)
Do you think perhaps this is a similar reason as to why I am crashing when trying to play custom melee animations?

(as seen in this thread)

http://www.garagegames.com/mg/forums/result.thread.php?qt=21845
#17
10/05/2004 (12:30 am)
The crash does not come from the death animations .
The most important thing is the ground transform keys on the move directions.
so what you basicly need is to have the boundingbox move with the animation and set 2 animation keys on the it .
#18
10/05/2004 (7:43 am)
Dang, I'm still lost. "ground transform keys on the move directions"? I don't animate the bounding box at all. Am I supposed to? Should it be linked to the Bip01? Do the keyframes I set on the bounding box, on the rotation, or do I actually move it?

I guess I'll experiment with it. Just a bit frustrated. ;)
#19
10/05/2004 (7:55 am)
Link the bounding box to bip01 or pelvis .
so it moves when the player moves.
add 2 keyframes to it.
#20
10/05/2004 (8:05 am)
Silly question... how many death animations do you have? Because in the player.cs script file, it's hard coded to 11. if you have less, and you haven't changed the script to reflect this, it will crash the engine. Here's what I am talking about.

At the top of player.cs you will see:

$PlayerDeathAnim::TorsoFrontFallForward = 1;
$PlayerDeathAnim::TorsoFrontFallBack = 2;
$PlayerDeathAnim::TorsoBackFallForward = 3;
$PlayerDeathAnim::TorsoLeftSpinDeath = 4;
$PlayerDeathAnim::TorsoRightSpinDeath = 5;
$PlayerDeathAnim::LegsLeftGimp = 6;
$PlayerDeathAnim::LegsRightGimp = 7;
$PlayerDeathAnim::TorsoBackFallForward = 8;
$PlayerDeathAnim::HeadFrontDirect = 9;
$PlayerDeathAnim::HeadBackFallForward = 10;
$PlayerDeathAnim::ExplosionBlowBack = 11;

Around the bottom of the file you will see:

function Player::playDeathAnimation(%this)
{
if (%this.deathIdx++ > 11)
%this.deathIdx = 1;
%this.setActionThread("Death" @ %this.deathIdx);
}

If you have less than 11 death sequences, Boom... crash.

Hope this helps.

Robert
Page «Previous 1 2