Graphics

 View Only
  • 1.  Reusing a custom Keygraph

    Posted 09-28-2020 16:17

    I'm just getting started with XPression and I'm trying to create a custom keygraph to use across multiple objects.

    I've previously done lots of work in CasparCG using HTML/Javascript/GSAP where it's really straightforward to create a custom easing function and then apply it to lots of animations. Using keyframes is a bit of a new thing to me so apologies if there's something obvious.

    For example, if I have a lower third strap with some text how do I apply the same easing to both objects without having to tweak the start/end values all the time (as I will have to do this for around a hundred animations and that seems hugely inefficient)

    I've discovered the ability to copy and paste the keygraph into properties on different objects but obviously my key values are then wrong.

    I did look at scripting as a possible answer but can't see a way to make a Bezier Spline using the API.



  • 2.  RE: Reusing a custom Keygraph

    Posted 10-24-2020 13:35

    Hi Peter,

    In short, it's not possible to copy a custom bezier spline on multiple objects.

     

    But I have to add some explanation to this.

    So whenever you create a custom bezier spline, all the values are being hardcoded. So when you copy the spline onto a different object, it will copy the same values as well. So like you said, that's not a solution.

     

    If you need an animation that you can reuse, you could look into Stagger Animations. These are animations that you can reuse on multiple objects. Originally these were designed for character animations, but you can also use them on groups as well. They don't work on quads for example, but if you put it into a group you can use it on a group.

    However, a little warning, there is no way to use the KeyGraph editor on Stagger Animations. So you can reuse them but they're not as practical as custom animations.

     

    Using the API you could also script the splines but as far as I know, only the TCB-splines are available in the API as SetKeyFrameValueTCB. I don't think the Custom Beziers can be programmed. But to be honest, I haven't scripted an animation in a long time.

     

    Best regards,

    Kenneth


    #XPression


  • 3.  RE: Reusing a custom Keygraph

    Posted 10-26-2020 09:02

    Hi Kenneth,

    Thanks for getting back to me.

    Yeah I figured that you couldn't do it easily and given that the tangent handles don't snap to values I ended up writing a little utility that generates keyframe files for a given cubic bezier ease.
    I can then import these into the scene director, it's a bit of a faff but it does guarantee everything is using the correct easing.

    I did try a stagger animation but couldn't find a way to use it when the start and end points were different on different animations (not sure if I was just being daft but hey ho!)

    Thanks

    Peter


    #XPression