Save and load bone animation to any file!!!

General Moho topics.

Moderators: Víctor Paredes, Belgarath, slowtiger

User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

rogermate wrote:Hi Vern,

1. Are you currently selling any character packs?
Not yet but very very soon... ish. ;)

2. I'm still new to AS, but am trying to understand the significance of this new tool of yours. If we had designed a robot character to have a certain walk, or actions to throw a ball, or swing a golf club - with your tool we could:
copy a repeatable, and modifiable "macro" ("action" in AS) which causes the character to move a certain way
A) between files
B) between different animatable characters / objects.

I'm guessing there must be some sort of similarity in the bone structure between these characters?
Yes to all points you mention. A robot character would have actions, like running, walking, etc. These actions are based on bone rotation, translation scale etc.

You save out that animation information just for the bones. You could load that into a copy of the same character, or one that uses the same or VERY similar bones. People have been making a bigger deal about using the saved animations on different files than I expected. They think it should be more flexible but that just isn't possible yet. The bone set up should be as close as possible to the original saved file bone set up.

One area that causes trouble specifically is bone locking. Because bone length, scale, angle variations have a huge impact on bone locking it is difficult to get that to work well when copied to a character whose skeleton is a bit different.

Maybe there will be a way to figure out how to adjust the bone lock import based on the angles and lengths of the parent bones... but not yet.

-vern
User avatar
mkelley
Posts: 1647
Joined: Fri Nov 02, 2007 5:29 pm
Location: Sunny Florida
Contact:

Post by mkelley »

Um, now that I have the time to look at this I must be missing something.

I'm using the version Vern posted dated 7/4 at 1:40pm (I have to identify it this way because the only version number in the file is .1). It's the one in this thread that he says to use.

With this version and with my bones all named I can't get all the stuff to save and/or load properly, even with the same skeleton setup. It appears to load the spine bones, for example, but not my limbs at all. I've checked and all my bones are named properly (like I said, I can't get it to work even loaded back on the same skeleton).

I am not saving frame 0 -- do I have to do that? And I'm only loading in rotations and translations (because that's all I use) -- do I need to check more boxes?

It's weird because earlier versions worked a lot better for me.
User avatar
mkelley
Posts: 1647
Joined: Fri Nov 02, 2007 5:29 pm
Location: Sunny Florida
Contact:

Post by mkelley »

More info:

It didn't make any difference to check all the boxes, BUT when I saved frame 0 at least I was able to load it back into the same skeleton. However, it's not then possible to use this to load into any different skeleton, no matter how similar.

I'm wondering if there was a version control problem somewhere along the line. Perhaps Vern posted the wrong version to us -- if anyone has the right one I'd love to try it again (I'm rebuilding all my characters the same way now and want to see if this script will make animation sharing viable).
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Sorry about the confusion.

I went back a version (the one there now) but apparently that wasn't far enough back.

I have "real work" and had to take a break from this. As soon as i get back into it I am sure it will get back on track.

-vern
User avatar
mkelley
Posts: 1647
Joined: Fri Nov 02, 2007 5:29 pm
Location: Sunny Florida
Contact:

Post by mkelley »

No problem, Vern -- I just wanted to make sure I was trying the right thing.

So, if I understand you correctly, I should just wait a bit until you get back on track, correct? Or is there a version I should try posted here somewhere?

Don't worry about it if you are hip deep in work, though -- I well understand what that is like (I'm just now in a breathing period, although I'd love to get my stuff all straightened out).
User avatar
synthsin75
Posts: 10276
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

Well here's the earliest version I have (1.0b).

http://www.mediafire.com/?uz4wd1i1vhe

I think this is the one before Vern tried the frame zero rotation offset. But I'm not for sure. I haven't been testing this too much yet. :wink:

::Hope you don't mind Vern. I figured you were too busy to hunt for this.
User avatar
mkelley
Posts: 1647
Joined: Fri Nov 02, 2007 5:29 pm
Location: Sunny Florida
Contact:

Post by mkelley »

Yeah, I might just wait a bit and see what he comes up with -- I've got at least two or three days work ahead of me just getting my characters straightened out (and tomorrow is our premiere so I'm busy all day anyway).

But thanks.
chucky
Posts: 4650
Joined: Sun Jan 28, 2007 4:24 am

Post by chucky »

When you get get back to this one Vern, I was wondering if the script will be able to be loaded into an action?
I hope this one hasn't been asked before on this thread as I don't want to be part of a nag campaign. :?
If it can ( at the moment the button is greyed out in an action) then certainly for me it will have the most benefit. :D
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

It really want it to work in actions. The version up now has that code removed that gave those annoying errors while working in actions.

I don't know if it will work "directly" in an action. I haven't even tried it yet to see what happens. If it doesn't work, it will just be a two step process, load in the main timeline, copy to action, delete keys from main timeline.

I sooooo want to work on this again... but I'm jammed up at the moment. If I get my brain into it again I will miss my other deadlines. I already dropped the ball on my brother's play poster... he needed it like... today and I completely zoned out. Of course he doesn't pay me so I have an excuse. ;)

-vern
chucky
Posts: 4650
Joined: Sun Jan 28, 2007 4:24 am

Post by chucky »

No worries Vern, I'll keep a eye out for when this kicks off again.
Funny I've been scarce round here recently for the same reason- a poster (on top of the regular stuff):lol: I hope it all works out with the deadlines 8)
User avatar
mkelley
Posts: 1647
Joined: Fri Nov 02, 2007 5:29 pm
Location: Sunny Florida
Contact:

Post by mkelley »

I wouldn't worry too much about it working on actions, Vern -- as you said, it's easy to just load up the action on the timeline and save it out. As much as I love and use actions I just want to be able to load and save the bone animations from the main timeline properly.

As someone whose major deadline came (and made it :>) and now I'm relatively relaxed I can well appreciate being under the gun. Funny thing is I now feel I have to much time I don't quite have the motivation to get at it again (and yet another deadline will be approaching in a few weeks).
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

This is really exciting for me. It's my FIRST animation job I'm getting paid for. I'm having an absolute BLAST! This is TEN TIMES more fun than doing web design or print work.

When I was working on a web site or laying out an ad for a client, all I could think about was when I could take a break and use Anime Studio. NOW, I'm working in Anime Studio AS MY JOB!!

How cool is THAT?!?

I hope this won't be the last one.

-vern
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

I made a small fix to the load script file. The file format has not changed just the load script.

A small change but you know how it goes... a small mistake can cause huge problems. What was happening is I was doing a check for the name of the bone. A bone called "back" would effect a bone called "back1" because it FOUND the word "back" in back1. I fixed this. I also took out the frame 0 import completely. It no longer brings in any bone 0 information. I did that for now till I figure out how to deal with that particular issue.

This should put me back on track. The script works now with the same skeleton. It also works relatively okay with a similar skeleton.

Download just the load script here:

http://www.lowrestv.com/anime_studio/sc ... mation.lua

or the whole thing here (same as before from my bone scripts thread)

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

-vern
Last edited by heyvern on Fri Jul 11, 2008 10:36 pm, edited 1 time in total.
User avatar
synthsin75
Posts: 10276
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

I'm guessing there is one too many underscores in that last link, Vern.
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Ooops!!!

I am usually so careful. ;)

Heads up... I didn't remove frame 0 import like I thought. The fix I made though makes it work better. It doesn't do the bone offsetting for 0 so the bones don't go wacky.

<sigh>

Wish I had more time to focus on this.

-vern
Post Reply