Another crazy idea... scripted "easing"

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Another crazy idea... scripted "easing"

Post by heyvern »

As I am learning more math... and physics... converting all kinds of fun stuff to ASP layer scripts I discovered another really cool thing:

Scripted easing!

I know many of you don't like the limited motion interpolation settings in ASP (me included) so I am going to research this and figure out how to apply all kinds of cool easing to a bones motion or rotation.

Or should I just wait for efrontier to do it for us? ;)

Any thoughts on this? Specific thoughts on why the easing isn't correct currently or how you would like this to be implemented?

My thought would be to have a script or function that would apply to all bones motion or to specific bones. I am thinking the key frames would be set to linear and the script would "override" the motion between keys to create "easing". It would use the linear motion on each frame and recalculate a "new" bone position till the next key frame.

Will let you know how this comes along.

scripts are so cool... I want to write one next to have ASP make a pot of coffee and then wash my car.

-vern
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

Check out this and good luck.

http://www.cubic.org/docs/hermite.htm

-G
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

I just had a brainstorm!

A while back I think it was Fazek who created this "fake" bezier curve tool for testing purposes. You could use this tool to "draw" bezier splines in AS. I was thinking I could use a tool script to "draw" the motion curves, then the layer script would use that information to change the locations of the bones based on the that.

The only problem is once again... where to store the dang information... another darn preference file. Maybe all this "physics" stuff could be stored in one file... all of my scripts could just use the same text file for storage.

ASP desperately needs some way of storing this type of information in the file. Man that would kick some arse!

One of the reasons I like this idea of better ease controls is to reduce the number of keys needed for "simple" motion. If you just wanted a nice little "bounce" at the end of a bone translation or rotation you shouldn't have to add all those keys. With something very much like a graph editor you could do that with just the two key frames.

Hmm... this sounds like I'm creating a graph editor script... yeehaaa!

I have to wonder if a graph editor like this might end up in a new version of ASP before I finish my script. ;)

-vern
User avatar
rylleman
Posts: 750
Joined: Tue Feb 15, 2005 5:22 pm
Location: sweden
Contact:

Post by rylleman »

I hope you succeed, this will be great if it works out.
User avatar
funksmaname
Posts: 3174
Joined: Tue May 29, 2007 11:31 am
Location: New Zealand

Post by funksmaname »

heyvern wrote:I just had a brainstorm!
I have to wonder if a graph editor like this might end up in a new version of ASP before I finish my script. ;)

-vern
lol - i doubt it. you work faster than entire payed workforce it seems...
Post Reply