Jump to content

Can I fix "jerky" transitions between animations in my animation overrider?


SookiCatalina
 Share

You are about to reply to a thread that has been inactive for 786 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I have 3 different standing animations in my AO, and I have them set to cycle continuously with each animation playing for 40 seconds. Some of the transitions between the animations is very jerky and unnatural. The "ease in" "ease out" setting is different for each one: .5 second for the first, .8 second for the next, and 1 second for the last. Is it the short transition times on the first two that is causing the jerkiness?

Is this something I can fix?

Link to comment
Share on other sites

If you're not averse to fiddling about with technical things there is a way:-

You'd need an unofficial viewer that can export your .animatn files or a techy friend who can do that for you.
You can rename said files to .anim and open it in anim hacker edit the ease in/ease out values.
Finally you'd upload the animation and replace it in your AO

Be careful not to break the TOS
 

Link to comment
Share on other sites

another way to help with this is when we know the time length of the animation

when so then we can script our timer to the length of the animation, play the animation, then on change to next animation we read the length of the next animation and set our timer accordingly

i mostly do this with dance animations which can be of various lengths (most of the major dance animation makers put the length in the description field)

and because I don't care to mess about with notecards then I rename the animation to include the length. Example script showing the basics of playing variable length animations
 

integer number_of_animations;
string this_animation;

default
{
   attach(key id)
   {
      if (id) // is attached so get permissions
         llGetPermissions(id, PERMISSION_TRIGGER_ANIMATION);
      else // has been detached, so stop this_animation and timer if playing
      {
         if ((llGetPermissions() & PERMISSION_TRIGGER_ANIMATION) && (this_animation != ""))
         { 
            llSetTimerEvent(0.0);
            llStopAnimation(this_animation);
         }
      }
   }

   run_time_permissions(integer perms)
   {
      if (perms & PERMISSION_TRIGGER_ANIMATION)
      {
         number_of_animations = llGetInventoryNumber(INVENTORY_ANIMATION);
         if (number_of_animations) // more than none
         {
            // pick a random animation to play
            integer random = (integer)llFrand(number_of_animations);
            this_animation = llGetInventoryName(INVENTORY_ANIMATION, random);
            // animation name is something like
            // dance1 #23.7
            // dance2 #27.5
            // dance3 #18.0
            // etc. where the length of the animation follows the # character
            
            // we parse the length out from the 2nd element of a list
            float length = llList2Float(llParseString2List(this_animation, ["#", ""]), 1);
            if (length <= 0.0)
               length = 30.0;  // set to 30 seconds when no length found in name
            // start the animation, and start the timer
            llStartAnimation(this_animation);
            llSetTimerEvent(length);
         }
      }
   }

   timer()
   {
      // here we get the next random animation
      integer random = (integer)llFrand(number_of_animations);
      string next_animation = llGetInventoryName(INVENTORY_ANIMATION, random);
      
      // when next_animation is not the same as this_animation then change, else we going to play the same animation again
      if(next_animation != this_animation)
      { 
         float length = llList2Float(llParseString2List(next_animation, ["#", ""]), 1);
         if (length <= 0.0)
            length = 30.0;  // set to 30 seconds when no length found in name
         llStartAnimation(next_animation);  // start the next/new animation
         llStopAnimation(this_animation); //stop the previous/old animation 
         this_animation = next_animation;  // make this_animation be next_animation
         llSetTimerEvent(length); // play timer for the length of the now this_animation
      }
   }   
}

 

Edited by Mollymews
script typo
Link to comment
Share on other sites

It would be nice if SL supported frame interpolation and the ability to control ease in/out via script when swapping animations, it would also be nice if they gave us the same options we have for texture animation (things like specifying playback speed, start/end frame, reverse and ping-pong).

  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 786 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...