How important is ground transform really?
by Spencer Boomhower · in Artist Corner · 06/06/2004 (4:22 pm) · 16 replies
In the player animation docs it says:
"Animation sequences that move the character must have ground transform."
I built a character and animated a run, root, and side animation. Basically just trying to replace the Orc in the Torque demo. I built the run and side animations without ground transform, figuring I'd get to it later. I put it in the game, and they seem OK without ground transform.
Just now I went back to the side animation and added the ground transform. Now there's an abrupt (but small) change in the player's position relative to the root position when I transition to the side animation. I've tried everything, and I can't get rid of the pop.
So my question is, can I get by without the ground transform? The docs imply that the ground transform is used for transitioning from walks to runs. I don't have a walk, so that's a non-issue. I could also see ground transforms being useful for making the character animation slow down as the character comes to a stop (I think I see this in the Torque features demo, when the Orc runs up to the camera) but frankly I don't like the way it looks when an animation is sped up and slowed down. Also, I'm not overly concerned about things like a character skating or sliding (gasp! :). Its best, IMO, not to get too bogged down by that kind of detail when you're trying to bust out a game.
So will my character be woefully unprepared for life as a Torque game avatar if I don't have ground transform animation?
-Spencer
"Animation sequences that move the character must have ground transform."
I built a character and animated a run, root, and side animation. Basically just trying to replace the Orc in the Torque demo. I built the run and side animations without ground transform, figuring I'd get to it later. I put it in the game, and they seem OK without ground transform.
Just now I went back to the side animation and added the ground transform. Now there's an abrupt (but small) change in the player's position relative to the root position when I transition to the side animation. I've tried everything, and I can't get rid of the pop.
So my question is, can I get by without the ground transform? The docs imply that the ground transform is used for transitioning from walks to runs. I don't have a walk, so that's a non-issue. I could also see ground transforms being useful for making the character animation slow down as the character comes to a stop (I think I see this in the Torque features demo, when the Orc runs up to the camera) but frankly I don't like the way it looks when an animation is sped up and slowed down. Also, I'm not overly concerned about things like a character skating or sliding (gasp! :). Its best, IMO, not to get too bogged down by that kind of detail when you're trying to bust out a game.
So will my character be woefully unprepared for life as a Torque game avatar if I don't have ground transform animation?
-Spencer
#2
Maybe the word "must" in that phrase I quoted should be replaced with something more lenient sounding. As someone who's trying to implement a character that'll work in a Torque game (and who's never done so before), I tend to interpret the docs very literally. I'd hate to skip something like ground transform and have that omission screw up gameplay down the road.
-Spencer
06/06/2004 (9:52 pm)
Good to know. Thanks much, Ben. Maybe the word "must" in that phrase I quoted should be replaced with something more lenient sounding. As someone who's trying to implement a character that'll work in a Torque game (and who's never done so before), I tend to interpret the docs very literally. I'd hate to skip something like ground transform and have that omission screw up gameplay down the road.
-Spencer
#3
So, unless this has been fixed, literally, you may need at least one of the action thread animations to have it exported with ground transform on or you might get crashes that leave you going --> WTF?
so, if you try it and it crashes the game, turn it on and see if it fixes it.
06/06/2004 (10:07 pm)
Not sure if this has been fixed, as it has been a while since I wrote that. When the animations are loaded, if none of the animations had ground transform, the game would crash (basically the same result you get when the character has NO animations).So, unless this has been fixed, literally, you may need at least one of the action thread animations to have it exported with ground transform on or you might get crashes that leave you going --> WTF?
so, if you try it and it crashes the game, turn it on and see if it fixes it.
#4
Investigating ground transforms has been on my list for a while, but I consider it more of a minor visual bug and haven't really taken an indepth look at it yet.
06/06/2004 (10:59 pm)
@Joe: I can confirm that (at least as of last month's HEAD) it still crashes the game if you don't have a ground transform. When I export my objects from LW into Torque, they do not seem to possess ground transforms (not sure if the exporter supports them or not). Meaning I have to modify the code a bit. There's a thread on here somewhere where I talk about the necessary code changes.Investigating ground transforms has been on my list for a while, but I consider it more of a minor visual bug and haven't really taken an indepth look at it yet.
#5
And just to be clear, does the bounding box have to move in order for there to be a ground transform? Or do you simply have to export something with the "ignore ground transform" box unchecked?
I'm just confused, because based on what Joe and David are saying, my character shouldn't have worked. Looks like that chicken I sacrificed was a good investment :)
06/07/2004 (9:26 pm)
Interesting... Like I said above, I did a whole set of animations without ground transforms, and then tried adding ground transforms after the fact. I never got crashes before I added the ground transforms. Maybe one of the animations had a ground transform and I'm just forgetting about it?And just to be clear, does the bounding box have to move in order for there to be a ground transform? Or do you simply have to export something with the "ignore ground transform" box unchecked?
I'm just confused, because based on what Joe and David are saying, my character shouldn't have worked. Looks like that chicken I sacrificed was a good investment :)
#6
I do know that older versions of the TGE would crash if there were no animations in the player, and the reason for the crash was that the player is looking for ground transform (hence the requirement)..
As i never try to load an animationless player without ground transform.. I never know if this little bug is still there.
And the bounding box does not need to move for it to have ground transform.. it just needed 'something' in one of the animations in order for it to work. If it is working for you and not crashing, I say don't worry about it. If you do run into issues, this would be one of the things to check.
I myself use the chicken bone dance, and it is very helpful in getting around some the stranger exporter mojo.
06/08/2004 (7:25 am)
Spencer, no idea.. I always use ground transform.. so I do not know what the deal is..I do know that older versions of the TGE would crash if there were no animations in the player, and the reason for the crash was that the player is looking for ground transform (hence the requirement)..
As i never try to load an animationless player without ground transform.. I never know if this little bug is still there.
And the bounding box does not need to move for it to have ground transform.. it just needed 'something' in one of the animations in order for it to work. If it is working for you and not crashing, I say don't worry about it. If you do run into issues, this would be one of the things to check.
I myself use the chicken bone dance, and it is very helpful in getting around some the stranger exporter mojo.
#7
I exported a death animation that played fine in the viewer, but (I didn't realize until I set up a deathmatch game to pit my character against himself) this animation would crash when a character actually died. Strangely, when I saved the death anim as celsalute.dsq - so that it would play when I hit ctrl-s - it worked fine. Most curious.
Then I remembered this thread, and decided to try adding a small amount of animation to the bounding box. That fixed it. I mean "fixed" it. More of a hack.
I wonder how many of these other animations might not work when it comes time to use them. It probably seems strange that I'm not able to test out animations in game. The reason for this, however, is that I'm simply replacing all the animations that come with the demo, whether I've seen them in the demo or not. Like the demo has a Scout cockpit animation, and I don't see any Scouts in this demo. Therefore I just have to pray (and sacrifice another chicken) in hopes that the scout animation works when I get to try it out in an actual vehicle.
Joe, thanks once again. I shudder to think how long it would've taken to figure this out without your contribution to this thread.
-Spencer
07/26/2004 (9:36 pm)
Here's a little update. It looks like I wasn't as successful in avoiding the exporter bad mojo as I thought. I exported a death animation that played fine in the viewer, but (I didn't realize until I set up a deathmatch game to pit my character against himself) this animation would crash when a character actually died. Strangely, when I saved the death anim as celsalute.dsq - so that it would play when I hit ctrl-s - it worked fine. Most curious.
Then I remembered this thread, and decided to try adding a small amount of animation to the bounding box. That fixed it. I mean "fixed" it. More of a hack.
I wonder how many of these other animations might not work when it comes time to use them. It probably seems strange that I'm not able to test out animations in game. The reason for this, however, is that I'm simply replacing all the animations that come with the demo, whether I've seen them in the demo or not. Like the demo has a Scout cockpit animation, and I don't see any Scouts in this demo. Therefore I just have to pray (and sacrifice another chicken) in hopes that the scout animation works when I get to try it out in an actual vehicle.
Joe, thanks once again. I shudder to think how long it would've taken to figure this out without your contribution to this thread.
-Spencer
#8
07/26/2004 (10:27 pm)
Glad I could help. Maybe I should start selling sacrificial chickens here on garagegames. Might be a good idea to add an interesting error message to the TGE to warn artists of this. Maybe something like, "NO GROUND TRANSFORM! Get your chicken!"
#9
I'm adding this to my lists of fixes. Don't have time (since I'm at meltdown) to deal with it now, but hopefully sometime after I get back.
07/26/2004 (10:32 pm)
Hey guys.I'm adding this to my lists of fixes. Don't have time (since I'm at meltdown) to deal with it now, but hopefully sometime after I get back.
#10
07/27/2004 (8:17 am)
I was just going to add as a note. From my own experience you can get by without ground transforms usually (or at least I did using the blender exporter). But when stuff dies you need it. Players processTick() calls updateDeathOffsets(). updateDeathOffsets assumes that there are ground transforms and goes along its merry way, which quickly results in an illegal memory access. So, ground transforms aren't neccesarily important for most animations, but at least for death animations they are crucial...
#11
The ground transform is just a delta, right? Ben, you've told me that my running animations would look better if I were using a ground transform. How, exactly, does that work? Does the engine set animation speed based on how far the character moves per frame?
07/27/2004 (9:22 am)
I shoulda clarified -- Monki is right. The only time that a lack of ground transforms in my animations caused me any grief is when a death animation is playing. You can either patch the code, or appearently just renaming your death sequences to "killed1" or such will work too.The ground transform is just a delta, right? Ben, you've told me that my running animations would look better if I were using a ground transform. How, exactly, does that work? Does the engine set animation speed based on how far the character moves per frame?
#12
Yes, it scales it, and this scaling can is capped in code and can be adjusted by adding a datablock parameter to player.cs
maxTimescale =;
I think the default is 1.5. This will scale the time so the feet 'stick'
07/27/2004 (9:28 am)
Quote:Does the engine set animation speed based on how far the character moves per frame?
Yes, it scales it, and this scaling can is capped in code and can be adjusted by adding a datablock parameter to player.cs
maxTimescale =
I think the default is 1.5. This will scale the time so the feet 'stick'
#13
07/29/2004 (1:52 pm)
Basically the ground transform tells the engine how far the character moves in each frame of animation. Then the animation can scale the frames properly based on how far the character has moved.
#14
08/17/2004 (1:51 pm)
Ok, I've fixed this. The engine will now happily run a player shape without any animations at all (it will give you some errors in the console, though).
#15
03/22/2005 (6:17 am)
Hello guys.....I have a problem here. Can you show me how to export the "Ground Transformation" in milkshape? It is because when i put my death animation model in the Torque Show Tool Pro, I view the sequence there, the GndFrm is set to 0. Actually if I want it load this animation in the game, it is not set to 0. So, can you show me how to export the "Ground Transformation" in milkshape? thanks....
#16
03/23/2005 (9:40 pm)
You need to download the latest milkshape dts exporter...it's called ms2dtsExporterPlus.zip. I think you can get it off the milkshape site, don't remember though. It does blend animations, dsq, and ground transforms
Associate Kyle Carter
Ground transforms are there so that the character matches up with the ground when it runs. If you don't want that, then there's no reason to use ground transforms. The orc in the demo actually has its move animations capped at a certain replay speed, so it ends up skating.
Er... I mean... No! We'll sue you if you don't make your animation just like we want it to be! We have a hidden checklist and we'll hold you to it!