"Back" , "Run" animation sequences

Level design, models, animations, physics, etc.
  • 1
  • 2
13 posts Page 1 of 2
fLUnKnhaXYU
Posts: 129
Joined: Wed Nov 15, 2017 8:19 am
  by fLUnKnhaXYU » Fri Feb 07, 2020 10:54 am
Ive made this new character , I export all actions from blender , set them up using the shape editor in version 3.9 . Its been working great except for a problem I'm having with the run and back sequences . It worked fine before I added the back animation and was using "run" in reverse for backward movement . After adding back animation it wants to use "back" , in reverse , for forward movement . Both are priority 1 . So far the model has , root , run , back sitting and a t-pose , all are set to priority 1 .. These sequences aren't on a single ambient track with markers , Torque just imports the actions from the DAE . Its a BVH rig and mocap animations but I don't think that really matters .
fLUnKnhaXYU
Posts: 129
Joined: Wed Nov 15, 2017 8:19 am
by fLUnKnhaXYU » Sat Feb 08, 2020 1:56 am
UPDATE
the side left and right movement is using the run sequence . while pressing the forward and right keys the model is using the run sequence , While pressing forward and Left keys together the model uses the back sequence ..
I'm in the process of adding animations . I noticed the "forward + side" thing after adding a crouch forward that didn't work correctly , I removed the crouch root , added crouch which worked fine then afterward re-added the crouch forward . After that crouch and crouch_forward worked fine . My workflow with this is rather quick now so Ill add more animations and see if its some sort of dependency issue .
for anyone interested , its a BVH Hacker with CMU Hahne MOCAP files , Make Human , Blender ,Torque3d 3.9 workflow .
fLUnKnhaXYU
Posts: 129
Joined: Wed Nov 15, 2017 8:19 am
by fLUnKnhaXYU » Sun Feb 09, 2020 12:34 am
UPDATE
So today , after I'd added "side" , the side animations are right , however , still forward is "back " in reverse and forward + right = "run" moving in a forward right diagonal as if a strafe sequence might be expected but , none are mentioned in the documentation Ive looked at , so far . All animations I have so far are these , in this order in the models CS file saved from the shape editor , in fact heres a copy of it so far in TorqueScript syntax , no less
function frozen_character_BigS_tstanceCDAE::onLoad(%this)
{
   %this.setSequenceCyclic("FrozbigS_walk2", "1");
   %this.renameSequence("FrozbigS_walk2", "__backup__FrozbigS_walk2_1");
   %this.addSequence("__backup__FrozbigS_walk2_1", "run", "1", "43", "1", "0");
   %this.setSequencePriority("run", "1");
   %this.setSequenceCyclic("Frozbigsroot01", "1");
   %this.renameSequence("Frozbigsroot01", "__backup__Frozbigsroot01_1");
   %this.addSequence("__backup__Frozbigsroot01_1", "root", "0", "150", "1", "0");
   %this.removeSequence("__backup__FrozbigS_walk2_1");
   %this.removeSequence("__backup__Frozbigsroot01_1");
   %this.setSequencePriority("root", "1");
   %this.setSequenceGroundSpeed("run", "1 1 1", "0 0 0");
   %this.setNodeTransform("mount0", "-0.771502 0.0319379 1.43147 -0.548273 0.534602 -0.643116 1.99253", "1");
   %this.renameSequence("Frozsitting_01", "sitting");
   %this.setSequenceCyclic("sitting", "1");
   %this.setSequenceCyclic("FrozbigSback_01", "1");
   %this.renameSequence("FrozbigSback_01", "back");
   %this.setSequencePriority("back", "2");
   %this.setSequencePriority("sitting", "1");
   %this.setSequenceCyclic("FrozbigS_CrouchR", "1");
   %this.renameSequence("FrozbigS_CrouchR", "crouch_root");
   %this.renameSequence("FrozbigS_CrouchF", "crouch_forward");
   %this.setSequenceCyclic("crouch_forward", "1");
   %this.setSequenceCyclic("Frozproneroot", "1");
   %this.renameSequence("Frozproneroot", "prone_root");
   %this.setSequenceCyclic("Frozbigs_side", "1");
   %this.renameSequence("Frozbigs_side", "side");
   %this.setSequencePriority("prone_Root", "1");
}
So , if I need mention , I'm not following any any special pattern for adding things here and I screw up , forgetting to rename or set the priority ,etc then have to redo things . The first couple of animations that you see ,the shape editor made backup copies of the sequences , perhaps due to changing the in and/or out frame and adds the frame numbers and padRot and PadTrans values while the animations after are simply renamed with the other values omitted .
I hope I haven't bored or annoyed or wasted any ones time , often times my problem is some minute error on my part ..Sooo , Preesh (<-an English colloquial meaning Thanks..
Jason Campbell
Posts: 355
Joined: Fri Feb 13, 2015 2:51 am
 
by Jason Campbell » Sun Feb 09, 2020 12:43 am
So you can't get 'back' to work or did you fix it?
fLUnKnhaXYU
Posts: 129
Joined: Wed Nov 15, 2017 8:19 am
by fLUnKnhaXYU » Sun Feb 09, 2020 8:41 am
"back " is doing what its supposed to do for backward movement , but , torque is using the "back" sequence for forward movement instead of the previously added "run" animation .
Also the combination of forward key plus right side key is the only thing which uses the "run" sequence , a forward animation
fLUnKnhaXYU
Posts: 129
Joined: Wed Nov 15, 2017 8:19 am
by fLUnKnhaXYU » Sun Feb 09, 2020 10:30 am
GEE WIZ , I deleted the .CS and and .DTS . Then reloaded The model , re-did the sequence set-ups and everything works perfectly . here's a copy of the new CS file . I added the setSequenceGroundSpeed though . So I guess its more like "SOLVED SORTA" I dont know what the problem was but re-loading worked this time . Come to think of it , Its worked before ! :o majic?
function frozen_character_BigS_tstanceCDAE::onLoad(%this)
{
%this.setNodeTransform("mount0", "-0.771502 0.0319379 1.43147 -0.548273 0.534602 -0.643116 1.99253", "1"); //just pasted this from the old one
   %this.setSequenceCyclic("FrozbigS_CrouchF", "1");
   %this.renameSequence("FrozbigS_CrouchF", "crouch_forward");
   %this.setSequenceGroundSpeed("crouch_forward", "1 1 1", "0 0 0") ;//added this
   %this.setSequenceCyclic("FrozbigS_CrouchR", "1");
   %this.renameSequence("FrozbigS_CrouchR", "crouch_root");
   %this.renameSequence("Frozbigsroot01", "root");
   %this.setSequenceCyclic("root", "1");
   %this.setSequenceCyclic("FrozbigS_walk2", "1");
   %this.renameSequence("FrozbigS_walk2", "__backup__FrozbigS_walk2_1");
   %this.addSequence("__backup__FrozbigS_walk2_1", "run", "1", "43", "1", "0");
   %this.setSequenceCyclic("Frozbigs_side", "1");
   %this.setSequencePriority("Frozbigs_side", "1");
   %this.renameSequence("Frozbigs_side", "side");
   %this.setSequenceCyclic("FrozbigSback_01", "1");
   %this.renameSequence("FrozbigSback_01", "back");
   %this.renameSequence("Frozproneroot", "prone_root");
   %this.setSequenceCyclic("prone_root", "1");
   %this.renameSequence("Frozsitting_01", "sitting");
   %this.setSequenceCyclic("sitting", "1");
   %this.removeSequence("__backup__FrozbigS_walk2_1");
}
fLUnKnhaXYU
Posts: 129
Joined: Wed Nov 15, 2017 8:19 am
by fLUnKnhaXYU » Tue Feb 11, 2020 12:14 am
!NEW DEVELOPEMENT!
So, I have a little to add to this today . After I edit the models CS file , with setSequenceGroundSpeed , problems occurred as before , with very mixed up
movement sequences . If I remove the edited line things return to normal . It looks as if Ill need delete the DTS again and do everything at once in the shape editor . I think that seems a bit odd and I am wondering what could be going wrong with editing the CS file . Heres the file , as you see all i had to to was REM out the new line for it to work properly again . If I un-REM it things become mixed up again .
function frozen_character_BigS_tstanceCDAE::onLoad(%this)
{
%this.setNodeTransform("mount0", "-0.771502 0.0319379 1.43147 -0.548273 0.534602 -0.643116 1.99253", "1");
   %this.setSequenceCyclic("FrozbigS_CrouchF", "1");
   %this.renameSequence("FrozbigS_CrouchF", "crouch_forward");
   %this.setSequenceGroundSpeed("crouch_forward", "1 1 1", "0 0 0");
   %this.setSequenceCyclic("FrozbigS_CrouchR", "1");
   %this.renameSequence("FrozbigS_CrouchR", "crouch_root");
   %this.renameSequence("Frozbigsroot01", "root");
   %this.setSequenceCyclic("root", "1");
   %this.setSequenceCyclic("FrozbigS_walk2", "1");
   %this.renameSequence("FrozbigS_walk2", "__backup__FrozbigS_walk2_1");
   %this.addSequence("__backup__FrozbigS_walk2_1", "run", "1", "43", "1", "0");
   %this.setSequenceCyclic("Frozbigs_side", "1");
   %this.setSequencePriority("Frozbigs_side", "1");
   %this.renameSequence("Frozbigs_side", "side");
   %this.setSequenceGroundSpeed("SIDE", "0.2 0 0", "0 0 0");
   %this.setSequenceCyclic("FrozbigSback_01", "1");
   %this.renameSequence("FrozbigSback_01", "back");
   %this.renameSequence("Frozproneroot", "prone_root");
   %this.setSequenceCyclic("prone_root", "1");
   %this.renameSequence("Frozsitting_01", "sitting");
   %this.setSequenceCyclic("sitting", "1");
   %this.removeSequence("__backup__FrozbigS_walk2_1");
  // %this.setSequenceGroundSpeed("run", "0.5 0 0", "0 0 0");
}
Duion
Posts: 1500
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Tue Feb 11, 2020 1:19 am
Maybe the issues results from you using the cs file generated from the shape editor. I wrote my file by hand and everything worked fine.

Here is my example:
https://github.com/Duion/Uebergame/blob ... _player.cs

Notice all animations are on the same ambient track and I define which frames is which animation, so I don't know how your setup looks like, but maybe it would be helpful if you would show it. I would be interested in where the engine loads the animations from and how that works etc.

Maybe you are missing the part where it defines which shape to use.

Also notice in the default full template with the soldier model each animation file is individually specified. Like here: https://github.com/Duion/Uebergame/blob ... _rigged.cs

So as you say you don't have the animations on one ambient track and are not specifying the frames to use and also not specifying which files to use I really wonder how you set everything up.
fLUnKnhaXYU
Posts: 129
Joined: Wed Nov 15, 2017 8:19 am
by fLUnKnhaXYU » Tue Feb 11, 2020 6:41 am
Duion -
before I retartget a BVH file , I set the model to a T-pose using a T-pose action I saved earlier . then clear the action field . Re-targeting a file will create a new action in the stack . youll have to save the blend file in order to save any new actions .
Image

export with the options "Export Animations" and "All Actions" checked
Image


I cleared out the characters folder in order to show the process start to finish . This is just after the export . I exported to the characters folder in Torque3D
Image

I already have a spawn sphere for this character and this is the first import .It shows the crouch position which is one of the first sequences listed in the shape editor . The character stays in this static pose throughout all of the movements .Nevermind the mess , Duion , some sorta city scape
Image




This is the first look at the model in the shape editor . It shows that all of the actions have been imported from the DAE file.
Image

I exited without changes and nothing was saved to the CS file . restarted in a different level . Nothing has changed
Image
Image

then I made changes to all of the sequences . The names that Torque3D engine uses , the loop box and priority then save the changes one at a time . Check to be sure that the name has changed , if you type in a name then do other things like check a box the name will revert to its original .
Image
Image

after going through and saving them all in the shape editor , I leave the level , start a new level and they are ready for action!. :)
.
root
Image
run
Image

and since this was all done froma fresh start it all works nicely , now some ground speed changes are necessary ,,, TO BE CONTINUED

Thank you for your files as examples Duion , I used to make animations for TGE and I remember the timeline method and Im learning what I can about the Torque3D method .
Duion
Posts: 1500
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Tue Feb 11, 2020 11:22 am
Thanks for the explanation, I may want to try the actions method some time later, but for now I was too lazy to learn how to do it and just used the old method that was already documented and proven to work.

But I think there is not much advantage to using actions comparing to using a single timeline, if all is saved in the same model file anyway, the real advantage of this method would be, if you had a file with all the animations and multiple 3D models with no animations saved in them, that then use the animations from the animations file. That way the game would be more modular and you would not have to animate each character individually, but can load in animations from another file. The default template is a bit set up like this, but it exported each animation into a different file and it still uses the timeline method, so it just makes things more complicated again.

So maybe you want to try this out, make a default model that has the animations in it and the model you actually use in game comes from a different file, I think this would be the most elegant solution.
  • 1
  • 2
13 posts Page 1 of 2

Who is online

Users browsing this forum: No registered users and 2 guests