|
|
|
[
Permlink
| « Hide
]
Lex Neva added a comment - 12/Dec/07 09:50 AM
Now that I read your succinct description of this problem, I know I've seen it before. I think it also throws off calculations of percentages for loop in/out values.
To demonstrate this bug I have produced a short movie clip showing how it makes it impossible to make a low fps walk animation loop smoothly - this bug actually forces animators to use the highest fps possible to reduce it's effect! For these reasons I believe the bug's priority should be increased from 'Normal'.
The movie is available here: http://www.davedub.co.uk/downloads/too_many_frames.avi The attached bvh file is a loop of exactly one second without it's reference (t-stance) frame. When the first frame (t-stance) is added, the length becomes 1.125 seconds. I would expect the SL animation uploader to ignore the first frame when calculating the length of the animation. However, on upload we see that the uploader reports the animation length to be 1.13 seconds long instead of the expected 1.0 seconds. When the animation is played in SL, the first (or maybe last?) frame appears to be played twice, producing a break in the otherwise smooth animation. Steps to reproduce using the attached animation (female_poser_walk_8fps.bvh): Verify the animation length is exactly one second long + one frame (125mS for the t-stance) using any bvh file editor. Dave's video made me realize something else: When I've made looping animations in the past, I've chosen a total number of frames that led to an even whole-number percentage for each frame. For example, I'd choose 20 total frames (including the magic first frame), and then when looping, I'd set the "in%" to 5%. Without skipping that first frame, I'd see exactly what dave has shown.
Update: After reading Lex's comment, I tried uploading the same file using various In(%) and Out(%) values.
I tried: In(12.5%) (i.e. skip first frame, 100/8), None of these values did anything more than reduce the problem slightly. None of them actually made the problem go away. yep, i agree. Its getting worse as the viewers advance.
I might have found a workaround.. at least it looks all right in the animation upload window, in a few tests.
Someone else please try it out. I will try uploading and playing at least one on an avatar very soon. One of my test animations was 14 frames long (this includes the count of the reference frame, frame 1). My intent is to loop frames 3-14 (if frame 1 is the reference, and frame 2 is the actual first frame of animation. Frame 14 is the exact copy of frame 2.) So, what I did to get this looking right is: I'm getting kind of confused about why it works the way it does, but at least it seems to work.. I found my 13-FPS version of a different 14-frame animation looks better when setting the In % to 14.29 instead of what QAvimator told me, 21%. There must have been a stutter I didn't notice. Oops. So I've been uploading animations with incorrect settings all this time. Testing a 1 FPS, 27 frame animation. Note, I am testing this in the release candidate. I have only viewed these animations within the upload animation preview window. I have not yet uploaded them to see if they loop properly when played on an avatar. Second Life 1.22.8 (109366) Feb 1 2009 13:13:47 (Second Life Release Candidate) CPU: AMD (Unknown model) (3001 MHz) Attaching a test animation I just made, "arm flap 17-frame 1fps.avm" and "arm flap 17-frame 1fps.bvh", with this post.
Frame 1 is the reference frame, of course. Frame 17 is an exact copy of frame 2. I used 100/17*2 to find my in %, 11.764 ...my intent being to loop to frame 3, skipping frame 2. I cannot notice any jitter in the looping.. even after uploading it and testing it on my avatar. It appears smooth to me. This is while testing with Second Life 1.21.6 (99587) Oct 14 2008 17:42:25 (Second Life Release) I wouldn't mind giving out the animation if someone else would like to try it on their avatar as well. It may not be ideal for testing, since I didn't override anything but the shoulders, upper arms, forearms, and hands. Thank you Ashrilyn - this works! I just tried it with the previously attached file - I manually copied frame 2 to the end, making a 10 frame animation (including the reference frame) I had to experiment a little with your formula - may I suggest writing it as: (100/10) * 2 or (100 / num_frames) * 2 Which gave me a In(%) value of 20%. I uploaded the animation, and it is as smooth as in my editor, no glitch whatsoever. Having given it some thought, I can see how the fix works. For my (altered) file, the uploader now reports an animation length of 1.25 seconds. Given that we do not play the first 20%, that means the actual animation length is 1.0 seconds, as expected. Put simply, the uploader bug messes with the first two frames. This fix ignores the first TWO frames. Ignoring the reference frame is no problem, as we don't want that to play anyway. By adding frame 2 to the end the original animation is recreated. Job done! I am guessing that Ashrilyn's fix will also help the Lindens understand and then fix the bug. I still think the cause is that the reference frame is taken into account in the overall animation 'play length' somewhere in the code... Update - I have created a modified version of my bvhacker software that will apply this fix automatically. You can download the beta version here: http://www.davedub.co.uk/bvhacker/
To use, load you animation into bvhacker, ensure you have a reference frame (i.e. t-stance) and hit the 'Fix Loop' button. The fix will be applied to your data, and the In(%) value required for upload will be displayed and put on your clipboard ready to be pasted into the SL animation uploader. Save your file and upload! :-Dave Again, this is getting worse. So now all the workarounds need to be reconfigured. Can some1 at Linden Lab address this. How many people have to vote?
The first frame isn't played 2 times, it's played 3 times!
Then when you loop the animation, there is no interpolation between the last and the first frame. It jumps abruptly, so the animation lasts one frame-time shorter again. Normally an animation-program would show a 4-frame (not including reference-frame) looped animation like this: 1 - 2 - 3 - 4 - 1 - 2 - 3 - 4 - 1 - 2 ... But SL loops the animation like this: 1a - 1b - 1c - 2 - 3 - 4/1a - 1b - 1c - 2 - 3 - 4/1a - 1b - 1c - 2 ... (Where "-" marks an interpolation, and "/" marks an abrupt jump) ======= The loop in(%) and out(%) are taken from the total duration between the first and last frame. That's one frame-time too short because of the missing interpolation. But there are 2 extra first frames, so in the end the total time is taken from one frame-time too much (compared to the original animation without reference-frame). ======= Workaround. Suppose you made an n-frame animation, not including reference frame: -Copy frame 1 to frame n + 1 (Append the first frame after the last frame, this will take care of the missing interpolation) Remember, n is the number of frames of your original animation. To show the first frame is there 3 times, I attached "2-frame-anim". It is set at 1 frame per second.
-Upload the animation not looped, with ease-in = 0, and ease-out = 0. Observe: The animation lasts 3 seconds. The first 2 seconds it is stuck in frame 1. The third second you see the actual movement from frame 1 to frame 2. So it plays like this: 1 - 1 - 1 - 2 Expected: the animation should last 1 second, playing like this: 1 - 2 Seriously, I will pay some1 at LL to fix this. Well, I already do, but i mean extra. Really, $500 US cash. Maybe some others will pitch in also, really, Im serious. Please! If this is not enough, give us the price. We'll find a way to come up with it. Im beggin here!
Please note: the workaround only works for animations when they are looping.
The start of a looped animation, or a non-looped animation can't be worked around. Added repro steps to the summary, as requested by Soft.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||