Suggestion: Support Easings for GetClipWeight and GetTrackWeight

Forums 💬 Slate Sequencer ⚙️ Support Suggestion: Support Easings for GetClipWeight and GetTrackWeight

  • This topic has 0 replies, 2 voices, and was last updated 2 years ago by Gavalakis.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #19897
    dgoyette
    Participant

      I was feeling like blending between two Animation Clips felt a bit awkward, as the blend transition was completely linear, and looks a bit robotic. I mucked around with GetClipWeight and GetTrackWeight, sending the weight through Easing.Ease(), and the results seem a lot nicer to me. I’m not sure if you consider this and found concerns with it, but I figured I’d put it out there as a suggestion. I imagine the feature to allow users to choose a Track’s EaseType, which is them used for any blending on that track.

      #19899
      Gavalakis
      Keymaster

        Hello. That is an interesting suggestion, although I remember there were some issues when I last tried non-linear cross-blending of animation clips. Can you please post the code changes you tried/did just to make sure we are doing the same thing?
        Thank you 🙂

        #19898
        dgoyette
        Participant

          My changes are a bit sloppy, mostly because 1) I haven’t thoroughly tested this (and I’ve just used it on Animator Tracks so far), and 2) I didn’t properly account for how it probably doesn’t make sense to enable this for all possible tracks. So my changes just enable it across the board for all tracks, and I’ll just be careful about whether it acts weird in some cases.

          So far this seems to work as I’d expect, even when adjusting a clip’s ClipWeight property in the inspector.

          As far as the issue you mentioned, about non-linear cross blending, I wonder if that’s only an issue if two adjacent clips use a different easing function? In my case, I just set a single easing for the whole track, not for individual tracks. Or maybe my change is actually broken in some way I just haven’t noticed yet. 🙂

          My changes were:

          1) CameraTrack.cs: Moved public EaseType interpolation = EaseType.QuarticInOut; to the base class, so that all tracks can specify their interpolation.

          2) CutsceneTrack.cs: Added easing to GetTrackWeights:

          3) ActionClip.cs: Applied easing to the final GetClipWeight, which asks the track for its interpolation mode, and uses that easing. Referencing the track in this way is a bit ugly, but I didn’t see a cleaner way to go from a Clip to a Track.

        Viewing 3 posts - 1 through 3 (of 3 total)
        • You must be logged in to reply to this topic.