Game Development Community

Death animation crash

by ken · in Artist Corner · 06/20/2008 (10:49 am) · 16 replies

Hi,
I have problem and i can not solve that ,
i make my death animation in maya and i export it like other sequence,
but when my npc death the engine just crash !!!!!!!!!!!!!!!!!!
please somebody help me .

#1
06/22/2008 (8:42 am)
Any body want to help me !?
#2
08/08/2008 (8:59 am)
I am not sure, but I think the death animation needs some ground transform. I shall give it a shot. Can anybody make it sure?
#3
08/08/2008 (9:32 am)
Yes you need Ground Transform set for a death anim or it'll crash your game. And you probably need ski0 and ski1 bones/nodes if your working with a scratch built skeleton/armature.
#4
08/08/2008 (9:37 am)
Yea.. thanks for making sure :)
#5
08/14/2008 (2:04 am)
Mae sure that you sequence has ground transform (set keyframe on bounds cube at frame 1) and cycle=false
#6
03/31/2009 (12:43 am)
i know that but where is this ground transform in maya exporter
#7
10/26/2009 (1:37 pm)
guys i run into this problem earlier today. In fact I have all needed nodes like "ski0" and "ski1", ground transform to the death1...to death11 animations and the engine still crash when i kill myself via some shots.
I guess it is due to something that is missing in the script and the engine is looking for it. Is there something special that i am missing?
It would be great if someone give me and explanation about how to stop the engine crash when i kill myself.
#8
10/26/2009 (2:26 pm)
Make sure your death animations have ALL the nodes set throughout, regardless of whether they're doing anything or not. Making it the highest priority anim can't hurt either.
#9
10/26/2009 (4:34 pm)
thanks for your answer Steve,
actually the crash happens due to other things. I managed to kill the player via some functions. The death animation played without crashing the engine. First I thought that it could cause the engine to crash because I have never spent enough time to investigate what happens when the player dies.

In my situation the player spawns not one but seven projectiles. And when I am very close to a wall and fire them the engine crashes. May be somebody else has faced such a bug? By the way I've removed the Player class from the CollisionMaks of the Projectile. And the engine still crashes in these circumstances.
#10
10/26/2009 (4:41 pm)
Are you using particle emitters on the projectiles?

I've got a simple shotgun which works fine, 8 projectiles every time, slight dip in fps when they spawn all together, nothing noteable in game play though.

Try your crash occurance in Basic Lighting and see if it still does it.
#11
10/26/2009 (5:47 pm)
In fact I am always in Basic Lighting.
Yes, the projectiles have particle emitters. They are simple.
The projectiles also have explosions.
The crash only happens if I am very close to something that could be hit when i fire. In the other cases I could shoot all the day just in the air and nothing would crash the engine at all.

[EDIT - RESOLVED]
I found my pack/unpack projectile routines wrong,there was some missing network bits. I should look out with this.
#12
04/19/2010 (7:19 pm)
I am having the death animation crash. And cant seem to work out the issue. I hear a lot about ground transform and all that but nothing has explained how to do the ground transform.

I am a amature when it comes to 3dsmax so if someone can explain what needs to be done to keep my death animation from crashing I would greatly appreciate it.

If someone is willing I can send my animation to them to look at. I use 3ds max 2009 and export in collada format.
#13
04/21/2010 (8:12 am)
The death animation names are hard coded into the engine (ie. death1, death2, death3, death4, etc.) as such, you will need to ensure that your sequence names that you are exporting to use for the death animation use the same naming convention in order to work.

That is usually the first problem that people have because they name their sequence helpers "death_leftknee" or something like that and the engine cannot and willnot accept that.

Also check the Torque3D source code if you have it. I redid almost all the default stock animations for TorquePowered there complete with source files to reference against.
#14
04/21/2010 (1:03 pm)
I am using death1 death2 and so on as the names.

I have the source code but couldnt find the source animations I found the dts and dsq but not even daes(would love the max files).
#15
04/21/2010 (6:21 pm)
Chris Robertson was kind enough to look at my animation. Long story short for what ever reason the powers that be decided that death animations needed ground transforms keyframe or the engine will crash.

Traditionally this was done by animating the object bounding box, but it can now be done using TSShapeConstructor.


His instructions:

For each death animation file, create a script (in the same folder as the DAE) that looks like this:


function CharacterDeath1Dae::onLoad(%this)
{
%this.setSequenceGroundSpeed("ambient", "0 0 0");
}

singleton TSShapeConstructor(CharacterDeath1Dae)
{
baseShape = "./CharacterDeath1.dae";
};


Change CharacterDeath1DAE and "./CharacterDeath1.dae" as appropriate.



I tried this and I can now see the death animation play and the engine doesnt crash.


I hope this helps others as this was something I struggled with as things were not clear since I dont know the first thing about animation in max and I do good just open .max files and export


#16
04/22/2010 (11:22 pm)
Note that this fix will only work with Torque3D (which has the new TSShapeConstructor functionality).

Incidentally, the next beta of T3D will automatically add ground transforms for death animations that don't have them already, so the fix will no longer be required.