Save and load bone animation to any file!!!

General Moho topics.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
synthsin75
Posts: 10276
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

Ummm, that's giving screwier results than before. I'm having serious doubts as to whether this can work for sharing. It is absolutely wonderful for an individuals own work though.

The problems with sharing are these:

-It must be a standardized or explicitly defined bone rig.

-Upon loading you'd need to be able to exclude frame zero, where as now you can only do this while saving.

-The parameters included need to be defined, or an option to only load the specifically saved parameters.


I tried to load the last 'run' provided, but the bone offset is different from my own. Also without selecting overlay, it only alters whatever parameters were saved, so the rest of the animation was unchanged. Surprisingly this actually work slightly better, though still all screwed up.

Loading the 'run' into a clean (no animation) layer was the worst, but I'm loading all parameters since I'm not sure which are used in the save file.


Like I said, amazing script for an animator wanting to transfer animations to many of his characters. In this case the animator knows which parameters he wants from the original.

Maybe it should be best practices to not save frame zero for sharing purposes?

Anyway, just my two cents.

Great work Vern!

::Also it seems to be overwriting frame zero keys even when overlay is checked.
User avatar
DK
Posts: 2896
Joined: Mon Aug 09, 2004 6:06 am
Location: Australia

Post by DK »

H sythnsin75.

Could you possible upload an action for me to try on the rig?

Cheers
D.K
User avatar
synthsin75
Posts: 10276
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

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

Sure DK, there ya go. It's a walk cycle, but the original has bones the example skeleton doesn't. I can't get any of this to work in anything but my own setups though.

I don't think I fully understand all of the parameters. :roll:
User avatar
DK
Posts: 2896
Joined: Mon Aug 09, 2004 6:06 am
Location: Australia

Post by DK »

Hi systhsin75.
Thanks for that but it did'nt work :( ....it was a mess. Did you use the original default skeleton offset that was already offset at frame 0 to make this or did you do your own bone offset at frame 0?

I think the idea is to leave the original skeleton offset in place at frame 0 then bring your bones together at frame 1 and animate from there....at least that's what I did and it apparently worked fine for Vern.

D.K
User avatar
synthsin75
Posts: 10276
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

No that was from my own skeleton.

See I don't think I'd be willing to base all of my characters off of one generic skeleton just to be able to share them. If the script can't really make up for these differences, then it really only works for very similar rigs.
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

I think some people are not getting the idea of this.

It isn't a MAGICAL FAIRY SCRIPT! This is not "morphiing" software. It is export and load.

Yes yes and double triple quadrupal yes, you MUST have the same named bones, the same skeleton setup. It is not going to magically change things to make a completely different bone setup work another completely different bone setup.

That isn't going to happen. You would need magic elves living under your couch to come out at night to do that sort of thing. ;)

The sharing aspect WORKS within some simple acceptable guidelines. It is the OTHER aspect that is WAY MORE IMPORTANT. No more lost animation. If you have one character you've animated in a bunch of different files, go back and save them out, use ALL of them ANYWHERE at ANY TIME.

I'm should take the "sharing" thing off the table. Apparently that was a mistake to put that in there as a feature. I understood how it would work. I didn't think it was going to be so hard to get the idea.

I'll reiterate once again:

Sharing animation requires the same bone set up. NOT EXACTLY THE SAME, but the same basic hierarchy/parenting and a similar frame 0 orientation.

-vern
User avatar
DK
Posts: 2896
Joined: Mon Aug 09, 2004 6:06 am
Location: Australia

Post by DK »

It is absolutely soooo easy to fit this default skeleton into your own characters....I did had no problems fitting verns original bone setup to my own character here without making any major adjustments other than re-sizing a couple of bones to fit my characters limbs!

http://www.wienertoonz.com/JUMP.swf

Theoretically....any bone animation that is shared by anyone on the forum should be entirely transferrable to this base structure!!!! That's what is so cool about this script! Can someone please upload a bone animation using Verns original bone rig so I can test if it transfers please?

many thanks
D.K
User avatar
synthsin75
Posts: 10276
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

Now hold on there! I may not know what the scripting interface is capable of, but I definitely do not think that I have unreasonable expectations.

I understand that you have done much of this by modifying another script to the purpose. I'm not looking for your 'magical fairy script', and I'm not trying to minimalize this awesome script.

You're doing all this based on the values of the individual keys, as I assume the Macton script was designed to. I've just been thinking that, instead of using key values, if you could somehow get global absolute values, it wouldn't matter how the skeleton was arranged on frame zero. It would just move it to the same absolute angle/position/scale as the donor file.


Maybe this isn't possible. If that's the case then just say so.
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

I'm doing a preemptive strike so to speak. I am working on a change to the last script I uploaded. I made a change to it that isn't working as well as I hoped. I was going to make it an option... later... but... I really really really need to add the option to "add" the rotation to the default frame 0 rotation or leave it out.

Right now the script automatically figures out the exact change of rotation based on frame 0 as a zero point. So if frame 0 is 128º and frame 20 is 175º, the difference is.... uh.. pi times... 7 + 3 carry the 1.... er...

It's math okay? Don't ask me about math I let the computer do it.

Anyway, the script "normalizes" that rotation value and just "adds" it to each key based on frame 0 as the "base".

Sometimes this is not goood.

The problem arose with a very specific and "personal" situation.

DK and I were working together for a while on a character "template". I had the arms oriented down on frame 0. Then I start on this script and I was dong all this experimenting with a DIFFERENT rig with the arms oriented straight out (technically that's how I would normally do it. DK was a bad influence ;) ).

So I wanted to upload all these cool animations but they are based on the arms down and won't load properly with the current script due to the likelyhood that many rigs are going to have the arms out straight... or not... or... whatever they are.

All I have to do is eliminate the "auto adding" or offsetting of the bone rotation. I don't know WHAT I was thinking when I made that automatic. It was just craaaazy.

I am having soooo much fun with this. You have no idea.

-vern
User avatar
synthsin75
Posts: 10276
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

Well I just ran and downloaded every version, just in case the latest has trouble. :wink:
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Dagnabbit!

The last version was busted. It appeared to work... but not so. I fixed the link. You should go back to this one:

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

This is the most annoying thing... I am trying to strip out line breaks and returns to process the animation file as a string. It worked perfectly... except... for no apparent reason I can fathom it would strip out any line with a single digit along with the offending return character.

This is were the problem came in. I didn't notice but it was removing the "key count", the number of keys for each bone. This wreaked havoc... sometimes.... sometimes not depending on how you import the files. During my testing I never saw it.

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

Post by mkelley »

Yeah, I always build my characters on frame 0 with the arms down -- only way I can actually visualize them.

In 3D, of course, we build them in the Da Vinci pose, more or less, which is probably what you're used to in AM. But for my limited drawing skills it's a whole lot easier to draw the arms at the side (and the legs together).

Even if your script can't translate "shared" files I think it will be hugely valuable to those of us who will be building actions we want to load into other characters. Sometimes I really dread adding a new sneak or run to one character just *knowing* I will want to use it on someone else (and hate to think of the work redoing it). As long as it will take the same *sort of* rig (which is to say, if I build my rigs my way but they aren't exactly placed the same -- every character will have different heights and limb lengths, not to mention how some are built stooped over, etc) and allow me to apply the motion to another of my same built (but differently drawn) rigs that will be fantastic.
User avatar
InfoCentral
Posts: 935
Joined: Fri May 26, 2006 8:35 pm
Location: Los Angeles, CA

Post by InfoCentral »

Keep up the good work Vern! Its progressing along nicely. Sooner or later your going to come to a major break and everything will start to work just as you planned it. Good luck...
rogermate
Posts: 298
Joined: Mon Jun 02, 2008 5:53 am
Location: Mars

Post by rogermate »

Hi Vern,

1. Are you currently selling any character packs?

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?

heyvern wrote: I always planned to give away the scripts for use with my character packs.
These scripts are going to be instrumental in streamlining character creation. I have one to start with so far with a couple of different outfits and various head shapes.

I still have to do a bunch of animated actions for it, walk cycles, running, sitting, different poses, but now with these scripts it is SOOOOO much easier to transfer them from one file to another.

-vern
User avatar
slowtiger
Posts: 6256
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post by slowtiger »

I'm guessing there must be some sort of similarity in the bone structure between these characters?
It must be exactly the same bone rigging, complete with naming.
Post Reply