More scripted physics - SPRINGS!

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

More scripted physics - SPRINGS!

Post by heyvern »

Yeeeeeehaaaaa!

http://www.lowrestv.com/moho_stuff/scripts/springs1.mov

http://www.lowrestv.com/anime_studio/sc ... prings.zip


Name bones with ".spring" at the end.

For now make sure you create them IN ORDER from top to bottom. You can add more to this chain. I will fix this later by adding in a check for a number in the name of the bone designating the order in the chain.

I am continuously amazed at how easy this is.

-vern
Last edited by heyvern on Sat Mar 07, 2009 5:57 pm, edited 1 time in total.
User avatar
funksmaname
Posts: 3174
Joined: Tue May 29, 2007 11:31 am
Location: New Zealand

Post by funksmaname »

sweet! nice work vern. :)
User avatar
Banterfield
Posts: 138
Joined: Tue Aug 03, 2004 10:40 pm
Location: Colorado

Post by Banterfield »

Vern! You are phenomenal. You need to get a job with Lost Marble.
Dave
tinnycan
Posts: 28
Joined: Mon Nov 13, 2006 5:46 pm

Post by tinnycan »

Hi Dude! Really great scripts! The only request I would have is some sort of keyframable thing to turn them off and on for looped animations. Is this possible in some way for this and your physics scripts? Keep up the awesome work!
User avatar
jahnocli
Posts: 3471
Joined: Fri Oct 29, 2004 2:13 pm
Location: UK

Post by jahnocli »

You ROCK, bonedaddy!
You can't have everything. Where would you put it?
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

I'm still working on these scripts. I am also taking a stab at converting the Box2D stuff... much more complex. I am taking a short break while I work on my ASP Advanced Techniques web site.

Yes, I do plan to put in some way to key frame or "turn off" the physics. I was thinking of a "start physics key" and and "end physics key" for the bone. Everything between the two frames would be controlled by the script. The only problem is the last key would not be "exact". The last keyed position would be the result of the last position of the physics.

What I mean is, if you are on frame 0 and jump to frame 12 that is where the physics would start. But if you play the animation from frame 1 it starts there. The physics are based on the current position and it doesn't know what has happened before that frame. I don't even know if it would be possible to calculate the previous positions... yikes!

This could realy mess up a "stop physics" frame. It would keep changing if you scrub through the animation, constantly changing the last position unless you always play through from the first frame. I would like it to be "fixed". If you scrub backwards the physics still run forwards if you follow me.

I am thinking that it might be best to have an option to use at the very end to "bake" the physics into key frames (probably a menu script). Then remove the physics script and they wouldn't be used anymore and it would work like an "ordinary" animated bone layer.

You could always go back and delete the key frames and start over without losing anything.

So many issues to resolve.

-vern
tinnycan
Posts: 28
Joined: Mon Nov 13, 2006 5:46 pm

Post by tinnycan »

Yes! Baking the keys would be a perfect solution! I look forward to these developments :)
Post Reply