Game Development Community

Timing animation Sequences

by Tornado · in Artist Corner · 01/26/2008 (11:12 am) · 7 replies

Hey All!

My question is pretty easy. I'm trying to time multiple animation sequences on a song (much like video editing ;-). Think as in a dancing character with multiple animations during the song. What would you advice is the way to go about doing this? Is it possible to link multiple sequences in ShowTool Pro?

Thx!

Tornado

#1
01/26/2008 (1:58 pm)
Hmm this topic interests me too, i plan on needing a way to string multiple animations together into one sequence.

Too bad i know so little about torques animation system.
#2
01/26/2008 (6:06 pm)
Does anyone know?

Of course you can string animation sequences together in any modeling app (Milkshape, Max), but I'm actually looking to do it in the world or with script.
A couple years ago I used the Genesis3D engine and it came with a little software to string animations together, scale them, and so on.
There has to be a way to do it with Torque, being far more developed than anything else I know...

Tornado
#3
01/26/2008 (6:37 pm)
Hello.


Just a quick thought, check out the VMPlayer -resource (http://tdn.garagegames.com/wiki/Audio/VMPlayer). I recalled it being able to call torquescript based on the position of the music track:

"Synchronize Your Game with Your Music - Ever notice how background music in movies perfectly match events in the movie? VMPlayer gives the programmer this same ability by automatically calling user specified functions at user defined points in a song. This could allow you to flash a bolt of lightning in front of the player exactly when your background music hits its cresendo, or spawn a monster directly behind the player when your music is especially scary."


Really don't know what are your exact needs, but I think you could use this method to call something like:

%player.playThread(0,"sequence");
#4
01/26/2008 (6:44 pm)
Well I guess you could also try to sync the animations by hand with scheduling.
Something like:
%time1st = 5000;    // time in miliseconds for the first dance movement
%time2nd = 3000;   // time in miliseconds for the second dance movement
%time3rd = 4000;    // and so on...

// executing first dance step
%player.setActionThread("animationName1"); 

//second after 5s.
%scheduleId1 = %player.schedule(%time1, setActionThread, "animationName2");

// third after 4s.
%scheduleId2 = %player.schedule(%time2, setActionThread, "animationName3"); 

// and so on...

This way your avatar can dance the song, as good as you can sincronize in miliseconds the dance step changes.
#5
01/26/2008 (6:55 pm)
@Novack
Is there any script funtion which defines time duration for animation transition when the 'time1st' animation changes to 'time2nd' one.

For instance:
%scheduleId1 = %player.schedule(%time1, setActionThread, "animationName2", [b]100[/b]);

So the changes are not occur instantly at the end of the time1st's sequence, but the transition will be going smoothely during the time range '100' millisecond.

Do know any similliary way or other suggestions?

Thank you.
#6
02/08/2008 (7:46 am)
@HW Kim, sorry, never saw your question.

You should read this article on TDN, Animation Setup, Transitions, this forum thread: Animation Transition not working., and this one: SetActionThread() and smooth transitions.

Also, this TGB doc page on TDN explains a function called "playAnimation" which has exactly what you need, but I dont know if it exists in TGE.

Hope it helps.
#7
02/08/2008 (7:34 pm)
@Novak
Thank you for the reply. I'll look into all the aboves. Thank you again.