Footprint sequence triggers ---- PLEASE HELP!!
by Injae Jeong · in Torque Game Engine · 09/25/2003 (3:36 pm) · 14 replies
Hi guys,
I have been banging my head on the footstep triggers for quite some time now. I have tried everything on the forums but to no avail. I made sure the ignore ground transform unchecked but it didn't help. I set the trigger values to 1 , -1 for Left foot and 2, -2 for right foot. There was no error in exporting. I checked the dump.dmp, it didn't mention anything about the triggers. I definitely would like to know if the dump.dmp should have anything about the triggers if they're exported successfully.
I looked further into the engine code, and found out the "flags" variable of that sequence object didn't have the TSShape::MakePath bit set, which basically skipped the calling of animateTriggers() which checks the trigger states. So, I'm wondering if the triggers had not been exported at all.
Does anyone have any clue?
I would appreciate if someone can send me a 3dmax file which has the triggering work in torque so that I check what's wrong with my file. Thanks a lot !!
I have been banging my head on the footstep triggers for quite some time now. I have tried everything on the forums but to no avail. I made sure the ignore ground transform unchecked but it didn't help. I set the trigger values to 1 , -1 for Left foot and 2, -2 for right foot. There was no error in exporting. I checked the dump.dmp, it didn't mention anything about the triggers. I definitely would like to know if the dump.dmp should have anything about the triggers if they're exported successfully.
I looked further into the engine code, and found out the "flags" variable of that sequence object didn't have the TSShape::MakePath bit set, which basically skipped the calling of animateTriggers() which checks the trigger states. So, I'm wondering if the triggers had not been exported at all.
Does anyone have any clue?
I would appreciate if someone can send me a 3dmax file which has the triggering work in torque so that I check what's wrong with my file. Thanks a lot !!
About the author
#2
to get it work ?
My problem was that i not started my animations from the root position .
09/26/2003 (5:10 am)
Do you mean that you must set triggers on the boundingboxto get it work ?
My problem was that i not started my animations from the root position .
#3
However, just having the triggers added, the engine will still not check the timing of the triggers at all during the game without animating the bounding box (or ground transform) which the documentation didn't mention. Might be everyone will move the bounding box when they do the animation in 3ds, just my 3D guy doesn't have that habit, he always set a fixed bounding box for the whole sequence.
09/26/2003 (10:44 am)
No. The triggers are added to the sequence object exactly as instructed in the documentation.However, just having the triggers added, the engine will still not check the timing of the triggers at all during the game without animating the bounding box (or ground transform) which the documentation didn't mention. Might be everyone will move the bounding box when they do the animation in 3ds, just my 3D guy doesn't have that habit, he always set a fixed bounding box for the whole sequence.
#4
I did move the boundingbox in the animation but no trigger was
set for it, now i can do my animation like i want to .
This is great !
I only put triggers on the boundingbox at start and end of the animation .
09/26/2003 (12:26 pm)
Helped alot thx you gave me a hint !I did move the boundingbox in the animation but no trigger was
set for it, now i can do my animation like i want to .
This is great !
I only put triggers on the boundingbox at start and end of the animation .
#5
this was driving me crazy, (and should be in the docs for common problems)
so for anybody else here is my current setup that is working,
* I have the run animation created in it's own max file (runAnim.max).
* I reference all of the main mesh and bones using a 3dsmax xref object
* I have a single run sequence helper object that begins at 0 and ends at 20
* I have 4 triggers on the run sequence object,
with values 1.0, -1.0, 2.0, -2.0
* I have two keyframes for my bounding box, one at the beginning, and another at the end.
* I do not move my bounding box, just have the two keyframes.
my run animation plays in place in max.
* I have two nodes attached to my feet, ski1 and ski0
and it works, foot puffs, and footprints galore.
12/07/2004 (12:11 pm)
Thank you Injae Jeong!this was driving me crazy, (and should be in the docs for common problems)
so for anybody else here is my current setup that is working,
* I have the run animation created in it's own max file (runAnim.max).
* I reference all of the main mesh and bones using a 3dsmax xref object
* I have a single run sequence helper object that begins at 0 and ends at 20
* I have 4 triggers on the run sequence object,
with values 1.0, -1.0, 2.0, -2.0
* I have two keyframes for my bounding box, one at the beginning, and another at the end.
* I do not move my bounding box, just have the two keyframes.
my run animation plays in place in max.
* I have two nodes attached to my feet, ski1 and ski0
and it works, foot puffs, and footprints galore.
#6
04/01/2005 (9:31 pm)
I just found this very helpful in fixing this same bug, thanks.
#7
07/31/2005 (3:16 am)
Ditto, this was allot of help. Thanks
#8
I'm a little confused then about this: When I look at the default sequences in ShowToolPro and view the Nodes involved in the sequence I have never seen a Bounds Node....and yet; it's involved in the sequence in a very important way, but not present? That's the confusing bit, why the dsq doesn't show this data anywhere, seems to be in the background, hidden.
Thanks, thanks a lot, for exposing more information not contained anywhere viewable.
07/31/2005 (7:11 am)
Verrrry interesting....in that if I'm reading this correctly, putting a keyframe on the Bounds[Node??] and exporting the sequence works in helping establish proper Ground Transforms?I'm a little confused then about this: When I look at the default sequences in ShowToolPro and view the Nodes involved in the sequence I have never seen a Bounds Node....and yet; it's involved in the sequence in a very important way, but not present? That's the confusing bit, why the dsq doesn't show this data anywhere, seems to be in the background, hidden.
Thanks, thanks a lot, for exposing more information not contained anywhere viewable.
#9
just a note that the girl pack has a complete set of animations and that we set up this file to be dissected so that people can learn from looking at it. If you find yourself struggling with the player character setup, this pack will help to ease some of that pain.
07/31/2005 (7:30 am)
Interesting.. never thought to add this to the docs because I never animated this way. When I animate a character running, I animate the actual run cycle with the bounding box following the character in order to give it ground transform. The thought of animating a movement cycle 'in place' is just counter intutive for me. It is harder to set up and do correctly.. just a note that the girl pack has a complete set of animations and that we set up this file to be dissected so that people can learn from looking at it. If you find yourself struggling with the player character setup, this pack will help to ease some of that pain.
#10
I also do the run animation with the bounding box following the character but the Maya docs (see below) suggest parenting bounds to the character to do this. Parenting bounds does provide a transform for the character but it would seem that a ground transform for triggers (and death anims) does need keyframes setting on bounds.
This would be useful to add to the docs as it has had me stumped twice, firstly with death anims and this week with triggers.
The current Maya dts exporter reference says:
07/31/2005 (9:08 am)
@JoeI also do the run animation with the bounding box following the character but the Maya docs (see below) suggest parenting bounds to the character to do this. Parenting bounds does provide a transform for the character but it would seem that a ground transform for triggers (and death anims) does need keyframes setting on bounds.
This would be useful to add to the docs as it has had me stumped twice, firstly with death anims and this week with triggers.
The current Maya dts exporter reference says:
Quote:
Ground animation (ground transform) is based on the animation of the bounding box. For example, if you want to export a running person, you would place the bounding box around the person at time 0, with the origin of the box at the persons feet. As the person runs, you would animate the bounding box to keep pace with the person.
The easiest way to do this would be to parent constrain the bounding box to the hips (or root) of the character, and set it to only constrain along the Maya world axis (not the bounding box axis) corresponding to the forward and backwards motion of the character.
#11
I have purchased Jill and store her within a glass box for viewing, :), and Ground Transforms were a part of a few questions I had for Matt F. a bit ago....I remember you telling me he was very busy[and I understand Milkshape to be a low priority...], and I decided not to 'pester' him about ground transforms in Milkshape3D during that phase. This seems to answer a LOT of questions....Thanks all for sharing.
07/31/2005 (9:32 am)
It's not seeing the Node in the DSQ when I view animations within a 'shape viewer' that throws me off, Joe, ;)[especially default SDK material, ;)]. I can read something out of a written, aged document, and then when 'observe' this data in RealTime, it's a little 'different', this leads me to begin a string of what-ifs/whys....;).I have purchased Jill and store her within a glass box for viewing, :), and Ground Transforms were a part of a few questions I had for Matt F. a bit ago....I remember you telling me he was very busy[and I understand Milkshape to be a low priority...], and I decided not to 'pester' him about ground transforms in Milkshape3D during that phase. This seems to answer a LOT of questions....Thanks all for sharing.
#12
as for the milkshape characters.. yikes.. it was a royal pain to get the jill pack working at all. We don't use that tool as our main tool and it is kind of clunky to work with (compared to say max or maya).
on the maya bounds needing keys.. I will look into that. It *shouldn't*, as the 3dsmax one does not, but, we did not get a lot of bug reports from the beta, and the workflow of the artists creating the shapes might have something to do with it.
I usually add keys to the bounding boxes instead of linking. I do that because it gives me more control (at the expense of setting a few new keys). Things like this are just part of my workflow, so workflows that do not match the workflow of the creators of the exporters can expose bugs and/or non intuitive ways of working.
Tool creation is a hard thing. I have been at this for a long time and it is hard to put myself in the mind of someone who is new to this and does not know what I know. BUT, we are listening, and hopefully topics like this will help us to make better docs when TDN goes live.
07/31/2005 (9:54 am)
I agree it can be confusing. The ground transform was created as it was in order for us to animate without having to go through a bunch of hoops in order to animate the characters 'in place'. We were all used to just animating, and having it so you could animate a walk normally was on the list of desires when the exporter was created. The information of the distanced traveled IS exported, but the motion itself is not. In game, the character has to be 'in place', and since the motion is relative to the bounding box (which is also moving) the character won't move in the showtool (even though the bounding box is giving the character motion by way of ground transform). as for the milkshape characters.. yikes.. it was a royal pain to get the jill pack working at all. We don't use that tool as our main tool and it is kind of clunky to work with (compared to say max or maya).
on the maya bounds needing keys.. I will look into that. It *shouldn't*, as the 3dsmax one does not, but, we did not get a lot of bug reports from the beta, and the workflow of the artists creating the shapes might have something to do with it.
I usually add keys to the bounding boxes instead of linking. I do that because it gives me more control (at the expense of setting a few new keys). Things like this are just part of my workflow, so workflows that do not match the workflow of the creators of the exporters can expose bugs and/or non intuitive ways of working.
Tool creation is a hard thing. I have been at this for a long time and it is hard to put myself in the mind of someone who is new to this and does not know what I know. BUT, we are listening, and hopefully topics like this will help us to make better docs when TDN goes live.
#13
This is not something I'm going to unlesh on the General Public.....without putting it up as a Resource...and seeing if it's truely valid.
I'll be in touch with some data about the process.....
07/31/2005 (10:04 am)
Thanks, Joe, ALL. Psssst...I can demonstrate a secret to adding Nodes[with 'normalized' orientations to Jill[in Ms3d] and keeping her Transforms from resetting...;). I just did this to the default rig up to the maximum of 8 mountpoints, and the rig still loaded & ran all the defaults perfectly, it'd be interesting to see if it would work with her Ms3d file and it's animations....a neat trick. Took me back to some modeling from the 90's, ;), hint, hint.This is not something I'm going to unlesh on the General Public.....without putting it up as a Resource...and seeing if it's truely valid.
I'll be in touch with some data about the process.....
#14
07/31/2005 (10:11 am)
Having that secret would be sweet. that little 'feature' of ms3d is something that, in my opinion, makes it really hard to work with. make a resource out of it. At BraveTree, and at garagegames now, we really don't have an ms3d 'expert'.. and we want to support as many tools as we can. I certainly don't have the time (or patience) to deal much with it.
Torque Owner Injae Jeong
In short, the problem is due to I didn't move (or add key positions for) the bounding box. I need to add 2 position key frames(haven't tried rotation and scaling) for the bounding box to have the triggers work. Even though I have a bounding box nicely set and the animation working flawlessly, I still have to add 2 dummy position key frames (not moving at all) for the bounding box at the beginning and the end of the sequence, so that the exporter will set the MakePath bit.
In the function TSThread::advancePos(F32 delta), it checks if TSShape::MakePath bit was set in the sequence's flag. If it's not set, the engine won't bother to check any trigger, even if there are triggers nicely exported in the sequence file. So, my problem was the triggers were in the sequence file, but the MakePath bit was not set.
I further looked into the max2dtsexporter code, and in the function ShapeMimic::generateGroundAnimation(), it checks the "Ignore Ground Transform" flag and any ground animation. If Ignore Ground Transform is checked in the 3dmax or the sequence doesn't animate the bounds node, it will NOT set the MakePath bit. So, I guessed the problem was the bounds node.
My 3D guy told me the bounding box was fixed in the sequence, luckily I didn't listen to him, spent a night playing with 3ds and figured out the bounding box's position can be changed during the sequence.