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 »

I am going to go on a bit of a rant here so bear with me... I am just trying to point out the obvious issues with this new concept. take all this with a grain of salt.
synthsin75 wrote:The only problem with sharing these 'actions' is that we have no idea what sort of skeleton to match. I'll bet no ones naming conventions are exactly the same.
Of course they aren't. Sharing files is great if everyone has the same files to share with. However anything organized, anything that requires consistency will require a change of habits in how you work. AS users have never had a need to be consistent or use a specific bone name convention. They have never had a reason to NAME bones at all.

How long would it really take to rename all the MAJOR bones in a basic skeleton? 5 minutes? 10? It's not that hard. I fixed the script now so you only need to name bones that actually have keys or are needed for basic animation.
-------

There is a product called TSM (the setup machine) for Animation Master. It recently became "open source" or "free".

This program would automatically put in the coolest most amazing control system on top of your basic rigged skeleton of a 3D character. It cost $150 for AM users when it first came out. I think it's still being sold for Maya. But guess what?

YOU HAD TO NAME THE BONES EXACTLY AS THEY REQUIRED.

It wasn't "magic". Not only did you have to name the bones you really had to use their exact skeleton in order for the system to put in all the constraint and control bones.

PEOPLE LOVED IT! It saved HOURS AND HOURS. Putting in a control rig in AM was a nightmare. No one complained about strict naming of bones. No one complained about having to have specific bones. They were willing to do it to save time.

Included with Animation Master are a whole pile of saved actions for walking, running, etc. BUT YOU HAD TO HAVE THEIR SKELETON INSTALLED TO USE IT. If you made up your own skeleton and didn't bother renaming bones you couldn't use those actions. If you created your OWN skeleton and changed it across different characters you couldn't reuse actions on different characters.

Automation requires consistency. Saving animation files like this requires there to be consistency. I for one am going to make sure that ALL my characters have the same basic bone structure from now on. I will make sure to use the same bone names. I will be consistent so I can maximize my content.

Ultimately this is more about streamlining work flow first, sharing files second. If you yourself develop characters with a specific set up then you can use those animations more effectively across an entire project. This could save hours and hours and hours of redoing animations over and over.

This is a new concept for AS and it will require some time to adjust to it. I've been using actions with 3D for so long I'm already there. I love this. I FREAKING LOVE IT!

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

Post by chucky »

Yes AM's system is great for switching and saving actions.
Thats why I asked about the naming convention U use> It sin't a problem naming a few bones- as long as they get the right names , hey?:lol:
I can see from the downloaded rig, as well, of course. :)

The setup machine is free now , cooool. I always wanted that but after buying some other AM utilities that were a bit stinky, I kind of gave up buying them.
I will have to check that out.
User avatar
synthsin75
Posts: 10276
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

I meant no criticism. Until DK pointed out that he was using your provided skeleton, I just had no idea where it was coming from.

Here's one idea that would help acheive consistent naming conventions. If it is possible to add to say the add bone tool a drop down menu off the name entry that already has most the 'usual' bones in a single convention.

Or either agree upon an order in which skeletons should be constructed so that it works with AS auto-naming. That's most likely what I'll use for my own characters. At least I know I can consistently create skeletons in the same order. May even make a little diagram if need be.

Believe me, this is a non-issue as far as I'm concerned. If someone really wants to benefit from the shared work of others, they'll be happy to do a little work themself. :wink:
chucky
Posts: 4650
Joined: Sun Jan 28, 2007 4:24 am

Post by chucky »

Sorry everyone. :oops:
I'm just plain confused.
I will shut up now, until I know what the hell I'm talking about. :roll:
Last edited by chucky on Sun Jun 29, 2008 7:34 am, edited 1 time in total.
User avatar
synthsin75
Posts: 10276
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

:lol: What skeleton?! Where? :shock:
User avatar
DK
Posts: 2896
Joined: Mon Aug 09, 2004 6:06 am
Location: Australia

Post by DK »

Here's one of my characters rigged to Verns bone setup. It took a bit of fiddling but once it's done it's totally recyclable!!!!

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

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

Post by heyvern »

Here's a rig I've been using lately. It's not the same as the one in the zip file for the script. This one has the extra back bone and I've straightened some of the bones on frame 0 to account for some odd rotations. I also noticed bone locking on feet doesn't work if the bones for the feet are an "exact" opposite (for instance 90 and -90. I works best if the opposite values are more like 90 and 270).

http://www.lowrestv.com/anime_studio/bo ... leton.anme

Sorry, I guess I didn't expect the "sharing" part to start up so soon. I would have made sure there was a skeleton to play with. ;)

The naming conventions are listed here in a previous post. If any skeleton is set up in that way with names intact I plan to fix this "rotation" problem whcih should make it work very well across different characters and slightly different bone rigs.


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

Post by chucky »

Superb
User avatar
funksmaname
Posts: 3174
Joined: Tue May 29, 2007 11:31 am
Location: New Zealand

Post by funksmaname »

Vern, you are a legend.
Who cares if you have to name bones (i've never named bones but now i'll start!) this script is unbelieavable - you've out done yourself.

Even though sharing skeletons and animation is a cool idea, i think the real power will be in animators creating their own 'banks' of reusable motion... we all have different animation styles so doing our own will always be best overall... its something we can do in down time, with just bones or throwaway characters, and now, thanks to you, that time isnt jsut written off as a complete waste!

People can get to grips with the central bone naming, or - im guessing - they could just rename all the bones on downloaded actions themselves to suit their existing rigs?? not the end of the world is it? but like you say - if theres going to be a big sharing repository there should be an agreed naming convention to follow...

Vern - THANK you for all the time you spend on making our lives easier.

------

edit: the other thing is you dont have to do/use a whole skeleton - often i just rig depending on the situation rather than having a fixed 'swiss army' rig, but this 'bank' could consist of just a graceful arm movement, or a punch, or any 'mini' animation for a single chain - you could even intentionally misname bones and see what happens when you apply animations to other places :P
Last edited by funksmaname on Sun Jun 29, 2008 8:55 am, edited 1 time in total.
User avatar
synthsin75
Posts: 10276
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

Good idea. You can run down the saved bone file finding 'bonename' and change each to suit. This may be even faster than doing it in AS.
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Thanks funk and everyone helping out! I appreciate it! All your input will make it better.

Funk, what you said is exactly what I feel is the big power of this. I can also see Content Paradise vendors using this to their advantage as I hope to do. Create actions for the characters sold. Sharing actions etc.

----------

DK, the saved file that you posted won't work with the new version of the script that is online right now. I even tried fixing it "by hand" and just couldn't do it. Sorry about that. It may be a few days before I lock down the file structure.

The other wierd thing is the file type. It has no extension and came in as something weird. I think I will use the ".txt" extension for future files just to be safe. I don't know about creating extensions for support files. Are there any rules for that?

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

Post by DK »

I just uploaded a new version using the latest copy of your script:
http://www.wienertoonz.com/JUMP.zip

Cheers
D.k
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Genete? Are you reading this? I just need a tiny little math help.

If a bone is at 1º on frame 0, and is then rotated on a later key frame to -20º it works fine. The shortest distance is the correct rotation intended by the animator.

However the same bone in a different file is just a tiny bit off, and set to 358º on frame 0, then the rotation to -20 is ALL THE WAY AROUND THE WRONG WAY!

How do I find that alternate value in radians? How do I figure out if the rotation is going to go around the wrong way and correct the key frame rotation values?

In the above example I need to change the -20º to 340º. I need a way to fix keys when a bone is just around that "0-360" area that causes the keys to spin around. I am clueless at the moment.

I think I can do this converting back and forth from degrees to radians but that is not... good programing. I think if the distance to the key is more than 180º it should be "flipped". But I don't know exactly what would happen if the intention is to SPIN a bone on purpose. Say to 680º.

It's all so confusing.

If any one else knows more math than me... I will accept all suggestions.

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

Post by heyvern »

Oh crapola!

DK,

I noticed this problem. Sometimes the script won't overwrite the existing file. I have to look at it and see why.

It looks like the file you just uploaded is created by the same old script (that "booger" reference is in there... that's how I know. ;) )

Make sure you reloaded the scripts (restart AS) and probably save to a different file name.

It's weird... sometimes the files overwrite but I've had a few situations where they didn't. I just assumed it was due to having them open in my text editor.

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

Post by DK »

Ok Vern...try downloading it again to see if it's any better.

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

D.K
Post Reply