more animation easing on AnimatorSimple

If there is something important you think is missing in the current version of ZGameEditor then you can post a feature request here!

Moderator: Moderators

Post Reply
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

more animation easing on AnimatorSimple

Post by jph_wacheski »

I was just doing my morning random surfing and coffee,. and got into some animation easing links,.

http://kendsnyder.com/sandbox/easing/index.html
http://theinstructionlimit.com/?p=401
http://www.timotheegroleau.com/Flash/ex ... erator.htm

wondering if on the current AnimatorSimple we could replace the Smooth tick box with a pulldown featuring the likes of; linear, sin, cubic, quartic, quadratic, power, elastic, bounce, etc. and whatever the hell else you want to throw in there,. and then a new value like amount/attenuation to tweek the effect of the easing.

The 'back' modifier (seems to apply to any curves) is also desireable, but at that point perhaps just a integrated curve editor begins to make more sense,. i don'know.

some visuals;
Image
iterationGAMES.com
User avatar
Kjell
Posts: 1910
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Hmm ..

A F-Curve Component makes more sense then a collection of pre-defined curves. And as long as you can set the position and tangent of points ( using Scripts ) you don't really need a visual editor.

In the meantime you can always create your own Curve library. Attached is a basic 2d cubic Bezier-ish implementation.

K
Attachments
Curve.zgeproj
(3.06 KiB) Downloaded 1087 times
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Post by jph_wacheski »

Thanks for the curve codes Kjell, cool! This may be usefull for some stuff I have though of, I will have to mess around with what you show here,. and see what I can create using this example. I do appreciate your code releases and examples.. and currently do use a bunch of the technices you have shared,. used that key handeling stuff today! needed pressed/held..,

My feature request was for an expantion to the functionality of the current component. I had been working with some animations created with models built from a number of meshes and animated using the AnimatorSimple component,. is occured to me that some more options for generating motions would be very usefull, and usable by many people. I use the animator for many things,. Features I request for are things I can use, but also beyond that, things that I think will just make ZGE a better system for more people,. I would like to see more release of creations from more people,. and, well sure, more features for me to play with,. ;)
iterationGAMES.com
User avatar
Kjell
Posts: 1910
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Hi jph,

Maybe I should have been a little more elaborate.

Of course you would want to add a FCurve property to the Animation Components as well, so you can select which curve you want to use for the animation. That way you can also share curves between different components ( just like Meshes ) .. keeps things modular / object-oriented.

And everybody likes new features :) I just think the focus should be on features that are impossible / insane to do with Libraries first.

K
User avatar
rrTea
Posts: 475
Joined: Sat Feb 15, 2014 9:54 am

Post by rrTea »

I wanted to ask for this too, I use Simple Animator a lot and having a few other options (like from the link at the end of this post) other than "Smooth" would be super useful. Also the current "Smooth" sometimes barely makes any difference (or at least I have to look really hard to see it).

Right now it is perfectly possible to apply a curve by using libraries but in the case of Simple Animator it is a bit bothersome having to follow it every time with a ZExpression - it'd just be neat to drop in a Simple Animator, define the curve and move on. Compare it to first adding a library, dropping in the Simple Animator, adding the ZExpression, typing it all in, closing it... and I end with two Project Tree entries instead of one for every Simple Animator (plus the Library).

Kjell: Nice example (thanks for the examples below too, really well put together and informative!). The idea of sharing and reusing curves through "F-Curve component" sounds great but at my current skill I'd be just happy if the Simple Animator had a few predefined transitions other than "Smooth".

Using Libraries for easing:
viewtopic.php?t=1063&highlight=easing&s ... 76f8c92a7e
User avatar
Kjell
Posts: 1910
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Hi rrTea,
rrTea wrote:The idea of sharing and reusing curves through "F-Curve component" sounds great but at my current skill I'd be just happy if the Simple Animator had a few predefined transitions other than "Smooth".
In hindsight i wouldn't be opposed to a easing drop-down on the Animator component either. Solving f-curves is in most cases significantly more computational intensive ( unless you bake* them ) than a simple easing equation .. so if that's what you're after then taking the f-curve route can be undesirable.

*Which is probably what you want to do for a f-curve implementation anyway .. or at least offer the option, so the developer make the trade-off between processor intensive & high-fidelity versus memory intensive & low(er)-fidelity.

K
Imerion
Posts: 200
Joined: Sun Feb 09, 2014 4:42 pm

Post by Imerion »

+1 to this. In many cases, using Simple Animator saves lots of time. I only write code for the cases when Simple Animator doesn't do the job. But having a drop-down for some more alternatives would certainly help make prettier results here and there. :)
Post Reply