Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

avmotion 0.4.1 - save and load keyframes in animations

Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
04-05-2006 22:57
Vince Plunkett's Avmotion is a really great simple SL animation editor. I've seen people create some fairly impressive animations with it. It's fairly simple, but it gets the job done... the only problem is, if you save your animation to a .bvh and load it again, you lose all of your keyframes. It's pretty much impossible to work with an animation you've saved and then loaded. That means you kind of have to get everything done right the first time all at once without sleeping, which just isn't possible in many cases.

Since Vince was kind enough to open source it, I got inspired today and hacked in rudimentary support for saving the keyframes with your animation. My new version of avimator can save to a new format, ".avm", which will store the keyframes with the animation. At this point, it doesn't yet store IK data, but that's just because I need to sleep and wanted to get this out ASAP.

Here's the 0.4.1 version of the avmotion executable:

http://www.lexneva.name/avimator/avmotion.exe

Just drop that into your avmotion folder, replacing your old avmotion.exe. When you want to save your project, make sure you save it with a .avm extension. Note that .avm files aren't compatible with SL, so you'll need to ALSO save a copy as a .bvh to upload into SL. So long as AvMotion remains open, you won't lose your keyframes even if you save as a .BVH. However, before you close avmotion, always save your animation as a .AVM, even if you've already saved it as a .BVH. When you start editing the animation again, always load the .AVM.

In summary, .BVHs should only be used when you're ready to upload to SL, and in all other cases, you should use .AVMs.

For those who want to see the code I changed:

http://www.lexneva.name/avimator/avmotion-0.4.1.patch

This patch should apply cleanly against the avmotion-0.4-src.tar.gz from Vince's site.

I hope to try to hack in the ability to see where keyframes exist in an animation and delete them, but as I don't know the GUI system that avmotion uses, this may be difficult. With this version, it's at least possible to delete keyframes manually by saving to a .AVM, editing the .AVM in a text editor, and reloading the .AVM in avmotion.

The .AVM format is suspiciously similar to the .BVH format. At the end are a series of lines that denote which frames are keyframes. AvMotion deals with separate keyframes for each individual joint. After the BVH frame data, there will be one line of keyframes for each joint in the heirarchy, in the same order as the skeleton at the top of the file. The first number is the number of keyframes, and following that are the keyframe numbers themselves. You can remove a keyframe by deleting one of the numbers and then reducing the first number on the line by one. Make sure the keyframes are always in sorted order.

I hope you like this. I wrote it for me, but I hope you all enjoy it. If you feel especially grateful, I wouldn't mind a few Lindens... ;) Of course, before you donate to me, consider donating to Vince.
Vince Plunkett
Registered Geek
Join date: 2 Jan 2006
Posts: 91
04-06-2006 08:23
This is great! Thanks Lex! BTW, I looked at the patch and it looks good so I'll add it to the source repository for future releases.

Also, regarding IK, that information does not need to be stored, so it will work fine when you reload an .avm file.
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
04-06-2006 09:49
True, it doesn't necessarily need to be stored, which is why I didn't bother in the first place. However, it might be cool to be able to glue the feet down, save, go out and grab dinner, come back, load, and pick up right where you left off. Might also be cool to save the current frame or something, so that .avm files are truly "project files", saving everything you were doing.

I think if I work on this again, though, I'll try to hack in the ability to delete keyframes before I try to save IK data and all that.
Gwyneth Llewelyn
Winking Loudmouth
Join date: 31 Jul 2004
Posts: 1,336
04-07-2006 02:05
And so the Avimator community grows... :) Thanks for that patch, Lex! Now I'm curious to see if it works well for the Mac OS X version...
_____________________

Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
04-07-2006 10:16
From: Gwyneth Llewelyn
And so the Avimator community grows... :) Thanks for that patch, Lex! Now I'm curious to see if it works well for the Mac OS X version...


I don't see why it shouldn't. If you're up for it, grab the source and patch and try building it for MacOSX... I don't have a mac to build it on. If you need build instructions, IM me.
Beatfox Xevious
is THOUSANDS OF PEOPLE
Join date: 1 Jun 2004
Posts: 879
04-07-2006 11:20
I was hoping something like this would be added eventually. :) Will have to try it out when I get the chance. Thanks a bunch, Lex!
_____________________
My Beatworks: Zephyr Chimes wind chimes, the KanaMaster Japanese kana tutor, and the FREE Invisibility Prim Public. Look for them at the Luskwood General Store in Lusk (144, 165).

"You have been frozen. You cannot move or chat. A pony will contact you via instant message (IM)."
- mysterious system message I received after making off with Pony Linden
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
04-07-2006 20:39
From: Beatfox Xevious
I was hoping something like this would be added eventually. :) Will have to try it out when I get the chance. Thanks a bunch, Lex!


Yeah, so was I ;)
Thadicus Caligari
Registered User
Join date: 23 Apr 2005
Posts: 5
04-17-2006 19:46
How do you get a copy of AVImotion 0.4.0 now as I can't get working links?

The site seems to be down.
Ingrid Ingersoll
Archived
Join date: 10 Aug 2004
Posts: 4,601
04-19-2006 10:29
Hi! Was hopping to be able to download this as well but I get "this application has failed to start because glut32.dll was not found. Re-installing the application may fix this problem"
_____________________
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
04-19-2006 10:52
From: Ingrid Ingersoll
Hi! Was hopping to be able to download this as well but I get "this application has failed to start because glut32.dll was not found. Re-installing the application may fix this problem"


Ah, since that was just a quickie half-release, I only posted the executable, not all of the other stuff you'd need to download to get avimator working. I intended peopel to just replace the executable in an existing install. Go grab the full 0.4.0 version from http://www.avimator.com , and then download the avmotion.exe I posted and replace the one in the 0.4.0 install. A "real" release is forthcoming soon, I just have to figure out a bug I introduced.
Crunchy Darkholme
Registered User
Join date: 30 Dec 2004
Posts: 2
05-09-2006 21:00
i still cant get my animations to initialize when uploading into sl.... can anyone possibly point me in the right direction.