Ground frame problem
by Demolishun · in Artist Corner · 06/04/2006 (8:17 pm) · 10 replies
I am having a ground frame problem as I am creating this tutorial:
tdn.garagegames.com/wiki/DTS/Blender/Creating_an_Advanced_Character
The animations get messed up when I set the ground frame to enabled for run, back or side. I there may be something wrong with my blend or the problem is the exporter for Blender. To check out the problem download this file:
tdn.garagegames.com/wiki/Image:NonblendPlayerMesh.blend.zip
Notice that I have disabled the ground frame for the run, back, and side animations. Everything seems to work fine except when I enable those for the ground frame. I only add the first frame and it just messes it up.
I am nearly finished with this fully functional player and I am hoping to resolve the ground frame issue.
Thanks for any insight,
Frank
tdn.garagegames.com/wiki/DTS/Blender/Creating_an_Advanced_Character
The animations get messed up when I set the ground frame to enabled for run, back or side. I there may be something wrong with my blend or the problem is the exporter for Blender. To check out the problem download this file:
tdn.garagegames.com/wiki/Image:NonblendPlayerMesh.blend.zip
Notice that I have disabled the ground frame for the run, back, and side animations. Everything seems to work fine except when I enable those for the ground frame. I only add the first frame and it just messes it up.
I am nearly finished with this fully functional player and I am hoping to resolve the ground frame issue.
Thanks for any insight,
Frank
About the author
I love programming, I love programming things that go click, whirr, boom. For organized T3D Links visit: http://demolishun.com/?page_id=67
#2
fosters.realmwarsgame.com/maxdts/section3.html
This is the way I understood the issue. Animation are supposed to be develed in place as far as I know. However, it may have
given me an insight that the ground frame may need to be at least 2 frames.
06/05/2006 (7:20 pm)
From:fosters.realmwarsgame.com/maxdts/section3.html
Ground Transform: Animation sequences that move the character must have ground transform. The engine knows that the character has a specific velocity in all directions (this is set in script). When the animations are being played, the engine is aware of what the distance covered is and plays the appropriate animation. If, for instance, the forward velocity of the character increases past the point of a walk animation to the speed of a run, it will transition to the run. The exporter figures out the ground transform (meter per second over a given distance) by determining how much the bounding box has moved over the course of the animation in the 3DSMAX file. This is done automatically on export. You can allow the exporter to set the keys (use frame rate) or you can set it to sample the distance covered explicitly by telling the sequence to use N frames and sample at the beginning and end of the animation. Use N frames is one by default (with N=2) and should be sufficient for most applications. If you have no ground transform, the animation will not play when the character moves. In the Torque Engine with the default character, the forward ground transform is approx=4m/sec.
This is the way I understood the issue. Animation are supposed to be develed in place as far as I know. However, it may have
given me an insight that the ground frame may need to be at least 2 frames.
#3
06/05/2006 (7:40 pm)
I just tried setting the ground frame to 2, but had the same results. I then tried animating the block in a sideways direction as well as a frontward direction and it seemed to kind of help. I wonder if the Bounds block needs to be animated differently for different directions of movement. Attached to a bone or something.
#4
For instance:
I create a run animation so the "Bounds" object needs to be animated to move forward some distance.
If I create a back animation I need to re-animate the bounds object in the reverse distance.
Now, this kind of sucks if you want to export multiple objects because the Bounds object needs to be re-animated for each sequence. I tried putting an armature modifier on the Bounds obect and having each sequence animate the Bounds object as needed. Well, this does not work at all. At least I could not get it to work.
So I ask the exporter developers, could this be a nice little tweak so that a DTS could be made with all animations in it with the Bounds movement for each ground frame/transform animation having control of the bounds object using a armature modifier? Does this make sense to anyone but me? I like having all my animations in one DTS file rather than DSQs. Right now it seems the exporter is the limitation.
Also, if someone could point to me where in the code I would go to change this and provide suggestions I could make the change myself. I found some ground frame/transform stuff, but was not quite sure what was what.
Thanks,
Frank
06/06/2006 (8:50 pm)
It looks like the way the exporter handles ground frames is by looking at the animation of the Bounds in relation to the absolute keyframe animation step. This causes problems if trying to export multipleanimations that use the Bounds object at the same time. It looks like I need to create DSQs instead of having the animations in the shape because of the way the bounds object is used during animation. For instance:
I create a run animation so the "Bounds" object needs to be animated to move forward some distance.
If I create a back animation I need to re-animate the bounds object in the reverse distance.
Now, this kind of sucks if you want to export multiple objects because the Bounds object needs to be re-animated for each sequence. I tried putting an armature modifier on the Bounds obect and having each sequence animate the Bounds object as needed. Well, this does not work at all. At least I could not get it to work.
So I ask the exporter developers, could this be a nice little tweak so that a DTS could be made with all animations in it with the Bounds movement for each ground frame/transform animation having control of the bounds object using a armature modifier? Does this make sense to anyone but me? I like having all my animations in one DTS file rather than DSQs. Right now it seems the exporter is the limitation.
Also, if someone could point to me where in the code I would go to change this and provide suggestions I could make the change myself. I found some ground frame/transform stuff, but was not quite sure what was what.
Thanks,
Frank
#5
Thanks for your updates.
IMHO, it would be better to save animations as DSQs, where you can re-use the DSQ for different character model (provided that they have same armature structure)
I didn't know that we need to keyframe BOUNDS box, somewhat I keyframed the box by accident. I'd love to send you a copy of my previous project file but that would conflict with my the university's policy.
I keyframed the box twice on the same spot, i didn't translate it.
I'm guessing that you are trying to create a multiple BOUNDS for different parts of the body? I could be mistaken but we need only 1 BOUNDS for every character.
I do pologise, couldn't help you much.
06/07/2006 (12:43 am)
@ Frank:Thanks for your updates.
IMHO, it would be better to save animations as DSQs, where you can re-use the DSQ for different character model (provided that they have same armature structure)
I didn't know that we need to keyframe BOUNDS box, somewhat I keyframed the box by accident. I'd love to send you a copy of my previous project file but that would conflict with my the university's policy.
I keyframed the box twice on the same spot, i didn't translate it.
I'm guessing that you are trying to create a multiple BOUNDS for different parts of the body? I could be mistaken but we need only 1 BOUNDS for every character.
I do pologise, couldn't help you much.
#6
Dang it! It sounds like I will probably have to do both!
06/07/2006 (6:31 pm)
You only have to keyframe the bounds box if you are using it to provide a distance reference for moving ground transform animations. You could completely ignore it, but your animation will not scale with speed. This is of very large importance for a mecha game I am working on. If the legs do not match the speed of the vehicle it looks very bad. Because the code I am using right now can use DTSs without DSQs I was hoping to get the walking part working without them. It looks like either way I will have to code the exporter to account for multiple ground transform animations or modify the vehicle code to use DSQs. Both have appeal to me as I don't like seperate files, but obvious benefits would be gained using DSQs as you point out. Probably better to just fix the code for the vehicle in the long run. It would still be nice to be able to create all your animations without having to rekey the bounds box for each moving animation though. Dang it! It sounds like I will probably have to do both!
#7
06/07/2006 (8:38 pm)
That is exactly the problem. You cannot export all ground transform based animations using the same translation on the Bounds object. The only way I can get it to work is to export each ground transform based animation as a DSQ that is linked to the object via an cs script file the way the player does it. For each ground transform based animation I have to rekey the Bounds object. It definitely would be a time saver to have this setup another way like off a bone that reevaluate the bounds object transforms for each animation. For now I can get it to work with a player object so I can finish my tutorial, but it is slightly annoying. Will have to add the exporter enhancement to my todo list.
#8
10/29/2006 (12:10 pm)
...
Torque Owner Gustavo Munoz