Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Project to improve animation "optimization"

Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
05-04-2008 16:45
As many animators have noticed, when you upload an animation to SL, it gets changed, and often this change causes serious problems with the animation. In particular, subtle movements get filtered out.

I'm working on an alternative optimization algorithm that would hopefully preserve more detail, with the goal of avoiding an increase in the amount of information transferred per animation.

Another possibility would be to optimize less for smaller animations. Most of my animations are under 5K without optimization, being relatively short loops with a low frame rate (10 to 15 FPS). The amount of data in these is so small that the optimization is pretty much pointless.

My first approach will be to use a mathmatical algorith known as Douglas-Peucker Line Simplification, often called DPsimp for short. This is an algorithm that would be used to draw a map at lower resolution after zooming out, for example. However, it'll take some work to (a) upgrade from 2 axes to 3 (b) adapt to spherical motion, and possibly (c) enhance to take into account the cascading effects of joint motions.

I'll appreciate any help I can get, especially from folks with a good math background and an understanding of quaternions. I'll admit I'm a bit over my head in the math, but as an engineer I think I can struggle through it.

Another area where I'll need help is with example animations in BVH format, especially longer and complex ones like dances (which are way over my head as an animator!) The quality/usefulness of the animations is not important, as long as it will be easy to see flaws in the optimization and measure the difference betwen LL's optimization and any proposed one.

I'll appreciate any help! Thanks!
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
05-04-2008 16:51
I've been looking at the current optimization code and it looks like a good attempt at balancing good animations against data reduction. I'm confident that data reduction was the only purpose for optimization; it doesn't have anything to do with making the client run faster once the animation is loaded.

I'm hopeful that it can be improved.
Johan Durant
Registered User
Join date: 7 Aug 2006
Posts: 1,657
05-05-2008 07:18
So you're modifying the open-source client or something? Sounds cool, I wonder if anything you figure out would be adopted into the server code.
_____________________
(Aelin 184,194,22)

The Motion Merchant - an animation store specializing in two-person interactions
Dylan Rickenbacker
Animator
Join date: 11 Oct 2006
Posts: 365
05-06-2008 01:57
Wow, if you can make any headway on that front, every animator in SL will kiss your feet!
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
07-22-2008 18:04
bump. No offers yet.

In particular, I need example bvh files. They don't have to be good animations, just typical of the amount of motion, number of key frames, lenght, etc.
Johan Durant
Registered User
Join date: 7 Aug 2006
Posts: 1,657
07-22-2008 19:32
Well a good place to start would be the examples LL offers for download; BVH files of all the default animations built into SL:
http://secondlife.com/community/avatar.php
_____________________
(Aelin 184,194,22)

The Motion Merchant - an animation store specializing in two-person interactions
spinster Voom
Registered User
Join date: 14 Jun 2007
Posts: 1,069
07-23-2008 03:31
I understand hardly any of what you said except that you are working on a way to stop upload breaking things lol.

I have a couple of longish animations you could use, one of which uploaded ok, but could probably look better, the other I abandoned in frustration. They are 30fps, though, I don't know if that would be a problem.

How do I get them to you?
Deira Llanfair
Deira to rhyme with Myra
Join date: 16 Oct 2006
Posts: 2,315
07-23-2008 06:09
From: Lear Cale
bump. No offers yet.

In particular, I need example bvh files. They don't have to be good animations, just typical of the amount of motion, number of key frames, lenght, etc.


I can provide you with some complex, maximum SL length bvh files Lear - either IM me or send a PM to let me know how you want to progress with this.
_____________________
Deira :)
Must create animations for head-desk and palm-face!.
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
07-23-2008 08:50
Wow, thanks all!

John, I didn't know those were available, great -- they'll be good benchmarks.
I will be in touch with the others who offered, as well.

Spinster, you got the right idea, and I'd be interested in both animations. 30 FPS isn't a big problem, but I believe you'll get better results in general using a lower frame rate. For keyframe-based animations, it's definitely true. For mocap, I'm not sure, but I suspect that quality software to convert frame rates will do a lot better job than SL's optimization method or mine.

Oh shit, this means i'm gonna have to roll up my sleeves and learn the math.



Anyone who wants to send BVF files can send them to me by email:

lear dot cale at gmail dot com

please forgive the anti-spam format.

Include any restrictions, which I'll be happy to honor, but by default, I will not share BVH files or resulting uploads without explicit permission.

For the uploads, I'll make a comparison place where people can go and compare before/after, where I'll also post the upload size differences somehow. The goal is better animations while minimizing the increase in upload size. (Upload size and download size are the same.)

Warning: it's summer, work is busy, I have other SL projects, and I have a bit to learn to do this, so don't hold your breath. Plus, it's summer!
Valradica Vale
Registered User
Join date: 8 Oct 2006
Posts: 11
gladly help
07-28-2008 08:24
Lear,

Iwould love to help - animations are what I do here, it turns out - though I am a code hacker, i have not ventured into the client code here - way over my head -

however, I have good deal of experience with SL animations and am particularly fruatrated by having invested in a exquisite animation, having to compromise it to get it to upload. for example, not being able to do subtle motions because the inter frame angle increment is less tha .5 degrees - some of the most realistic moton we need is in that range (e.g. simple breathing for the avatar witout it looking like he is gasping.)

I have experimented extensively with frame rates and agree that I get a lot more quality out of lower frame rates. some of my best amations are 5 fps in the .BVH fle

I was not aware that this was in the viewer code, although this makes sense

While we are at it, can we fix the priority assignment for joints? This broke about a year ago ad was entered in the JIRA but is yet unassigned. I need this functionality for many of my projects. (see my post above)

I also am n engineer, with a pretty solid math backgrond but no professionl coding experiece - some C, solid in VB6, very good in LSL..., SO I am guessing that the viewer is over my head, but contact me at valradica at yahoo dot com or find me inworld as Valradica Vale - I live near -Boston, so 9-10 evenings or 4:30-6:00 am (ESDT) wll be good - wold love to collabrate on this.