Jump to content

  • Log In with Google      Sign In   
  • Create Account


how to sync transition and animation


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 dellos   Members   -  Reputation: 113

Like
0Likes
Like

Posted 25 February 2013 - 03:44 AM

Hi all.

I started to write a class ( use lua ) obj with methods: rotation , transition, scale.

 

then I use this class to create all character's packge like head, arm,.....

 

now I have a character obj with each part of character have rotation, transition and scale method.

 

but my problem is:

 1. how to one action sync with other ? example; rotation head sync with swing arm,.....

2. what is best way to wirte all action sequence for call when i need? 



Sponsor:

#2 bollµ   Members   -  Reputation: 354

Like
1Likes
Like

Posted 25 February 2013 - 05:46 AM

I personally have a set of classes whose only job is to provide different interpolation types (Easing Equations) these are the popular ones and are easy to implement. I then have another class to which you can pass these interpolators which are "chained" together in the right order.

 

So, for example, I might have 

1)opacity-> 0 to 255 in 2.5 seconds using the linear interpolatr AND size-> 0 to 1 in 2.5 seconds using the out cubic interpolator

2)(the 2nd step starts after the first one) rotate the effect from 0 degrees to 180 degrees in 1 second using the sine interpolator

3) size from 1->0 in 0.5 seconds using the in quadratic interpolator

 

 

and so on. I use angelscript (a scripting language) to control these transitions. you could use lua to do the same. 

Hope this gives you a fair idea on how to implement something similar :)

 

~Bollu


a WIP 2d game engine: https://code.google.com/p/modulusengine/

English is not my first language, so do feel free to correct me :)


#3 dellos   Members   -  Reputation: 113

Like
0Likes
Like

Posted 25 February 2013 - 07:49 AM

thank for reply, but as I was presented .

I was make all transition , rotation , scale. Each of it I can controll Time , radius and scale ratio ,

now I focus on How to sync all trasition and How to make
something like a action Type , in each action Type have many of
transition, rotation, scale of each part of Character object.

 

I think I need bester structure(architecture) . please advice



#4 ddn3   Members   -  Reputation: 1269

Like
0Likes
Like

Posted 25 February 2013 - 02:44 PM

The way some games do it is to create a very detailed hierarchical state machine for all the states of the characters animation this includes transition states. They use a combination of procedural animation like Inverse Kinematics with motion targeting and mixed with hand animation overlaid. 

 

See this video for example

 

 

See this page

 

http://aigamedev.com/open/editorial/animation-revolution/

 

I'm sure you can adapt a simpler from for your use case, but that's the idea.

 

Good Luck! 



#5 dellos   Members   -  Reputation: 113

Like
0Likes
Like

Posted 25 February 2013 - 09:58 PM

It seem not easy like I was think.



#6 dellos   Members   -  Reputation: 113

Like
0Likes
Like

Posted 28 February 2013 - 02:45 AM

I personally have a set of classes whose only job is to provide different interpolation types (Easing Equations) these are the popular ones and are easy to implement. I then have another class to which you can pass these interpolators which are "chained" together in the right order.

 

So, for example, I might have 

1)opacity-> 0 to 255 in 2.5 seconds using the linear interpolatr AND size-> 0 to 1 in 2.5 seconds using the out cubic interpolator

2)(the 2nd step starts after the first one) rotate the effect from 0 degrees to 180 degrees in 1 second using the sine interpolator

3) size from 1->0 in 0.5 seconds using the in quadratic interpolator

 

 

and so on. I use angelscript (a scripting language) to control these transitions. you could use lua to do the same. 

Hope this gives you a fair idea on how to implement something similar smile.png

 

~Bollu

hi Bollu

can you explain some function in your link. i understand how it work but not sure about what I need to change. example I want to transition with time is 100ms. from x =0 to x =100. ?






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS