Author Topic: Animation.crossFade  (Read 2639 times)

Offline AGP

  • quad
  • ******
  • Posts: 1726
    • View Profile
Animation.crossFade
« on: December 31, 2010, 12:31:21 am »
Sorry for yet another (no doubt annoying) suggestion: object3d.getAnimation().crossFade(int currentSequence, int newSequence). Also very important to be able to cross fade between any two animations.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Animation.crossFade
« Reply #1 on: December 31, 2010, 01:51:28 pm »
How is that supposed to work? If you have no keyframes between the mesh states of the two sequences, the result would look like crap. And if you have those keyframes, they simply define a new sequence of its own.

Offline AGP

  • quad
  • ******
  • Posts: 1726
    • View Profile
Re: Animation.crossFade
« Reply #2 on: December 31, 2010, 05:04:39 pm »
It looks perfect in Unity. I can look up an algorithm, but why wouldn't it just be linear interpolation? I'm sure we can think of something (I'm much more comfortable tackling something like this than that camera issue).
« Last Edit: December 31, 2010, 05:06:30 pm by AGP »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Animation.crossFade
« Reply #3 on: December 31, 2010, 05:11:06 pm »
I don't see how this should work in a generic way when using keyframe animations. It might work better with skeletal animation, but with pure keyframes...if that would work, you wouldn't need keyframes at all.

Offline AGP

  • quad
  • ******
  • Posts: 1726
    • View Profile
Re: Animation.crossFade
« Reply #4 on: December 31, 2010, 05:16:43 pm »
You're right, it would need skeletal animation to not look awful. Maybe I'll try adding it to raft's bones and report my results.