Sign in to follow this  
dellos

how to sync transition and animation

Recommended Posts

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? 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

 

http://www.youtube.com/watch?v=p5ooYbN6bvM

 

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! 

Share this post


Link to post
Share on other sites

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. ?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this