Understanding spline VS linear, once and for all



  • I've been animating with poser for the past decade (with a huge break in the middle). I'm trying to clean up my work-flow, knowing that I'm doing a lot of things the wrong (and sometimes the more difficult) way.

    one of the things I'm still puzzled about is spline vs linear in keyframes. now, linear is pretty straight forward and have no issues when I use it. you declare value 0 on frame 1, value 10 on frame 10, and the value will increase by 1 for each frame, linearly. there will be no glitches but the movement (of characters) will look robotic and unnatural sometimes.

    on spline, on the other hand, we are suppose to get a more round, smooth graph, and that's what I get sometimes...but sometimes the graph simply goes wild, and I have no idea up until this very day why and how to prevent it, other than specifying more keyframes along the way.

    here's an example of what I mean:
    0_1536506726764_bdfc2be0-0080-408a-b037-8bd0e49b09c6-image.png

    this is a V4 right shoulder, front-back. on frame 204 the value is -30, and on frame 212 its on -33, a very slight movement. I wanted the graph to go spline and smooth, but for some reason the value simply goes off the charts midway. needless to say this happens only when I use spline (which I rather, for animations). what am I missing? is there any keyframes interpolation option in poser, such as in adobe after effects? (easy-ease in/out etc) I need something that will allow me to keep the spline graph smooth and yet within the boundaries of the values I decide...possible without adding extra keyframes?

    thanks <3



  • Okay...something clears up. the spline is always effect also from what came BEFORE it. so if a certain value is very different in a prior keyframe - it will effect the keyframes after the next spline keyframes as well. so...one need to note those values and/or use break spline.



  • @gsfcreator I've seen others suggest that there ought to be a better way, i.e. change from constant or linear interpolation to spline and vice versa with only a single keyframe, and have the spline smoothly continue the from previous interpolation, unless there's a spline-break, in which case the spline should commence or terminate in some pre-defined manner.

    Unfortunately, to get a spline to smoothly continue or finish, when preceded or followed by a non-spline section, one often has to add additional spline keyframes to determine the slope at the start or finish of the spline section. Things behave differently depending on whether the very first keyframe is a spline at frame 1, or the very last keyframe, where everything after that will remain at a constant value, unless loop interpolation have been enabled, which will interpolate between the last keyframe and whatever the first keyframe is, to avoid discontinuities when cycling the animation.



  • As a general rule Splines are effected by the two points before and after the Key Frame you are placing. Actually all Key frames have an effect however after 2 it starts to dampen a lot (to almost zero) unless there is a radical change in values between Key Frames. Break Spline will stop the over shoot, however it provides a slope very much like if not identical to Linear. I have asked that either they add an additional Spline type or fix the Break Spline, but under the last development team that was not going to happen as if you watch the Animation Webinar given by Chuck Taylor from around May 12/13 2018 he said so in as many words. He then went on to show the work around which I have been using for many years now, which is to copy a Key Frame and paste it one frame before or after the one it is copied from. So in your example above copy (CTRL C) and move a frame forward or backwards and (CTRL V) and that will get rid of most if not all the overshoot.

    The reason the overshoot happens is that Spline is a Sine Wave Curve and can not change direction in a frame. It can change Amplitude and Frequency as it needs too the complete the Sine Wave as can be seen in your graph. Here are a couple of examples of the placing an extra Key Frame.

    0_1536520043386_How it works now.png
    How it works Now

    0_1536520078913_How it should work.png

    After adding the extra (exact) copy.

    One other way to do it is start from the beginning and say you place a Key Frame at 20 & 19, go to 35 and have a nice slope if you go back to frame 34 and just create a Key Frame with value in Place it will also lock down the overshoot, unless you make a super radical change within a very short time frame, in which case it will again have a overshoot.



  • Here is another really fun example there are only 5 Key Frames one at Frame 1 one at the end Frame and three one frame apart (8,9,10).
    0_1536520894100_Spline 9A UUD.png

    As you can see the Spline goes up to the peak at Frame 9 and goes back down and undershoots at Frame 19.

    0_1536521015499_Spline 9 UDU.png

    Now just by moving Frame 9 down there is no undershoot but now there is two overshoots Frame 7 and Frame 16. Again the Spline is trying to complete a Sine Wave to the best of its ability. To prove this put a Key Frame at Frame 1 and another (exact copy) on the Last Frame. Now if you place a Key Frame at Frame 15 (assumes 30 frames) or the exact center of the time line then the Spline smoothly goes Up and then back Down. However move that center Key Frame to another location (say Frame 8), then the Spline goes Up through Frame 8 peaks at Frame 15 and drops back down to Frame 30 (Last).
    0_1536521548849_Spline 1Middle.png

    Below are an example of not placing overshoot Key Frames and then adding them in one by one.
    0_1536521661388_Spline 2Overshoot.png
    0_1536521674817_Spline 3Correct Overshoot.png
    0_1536521688650_Spline 4Correct Overshoot2.png



  • The way that splines behave in Poser is really, really, really stupid. I have no idea how it calculates the tangents, but whatever it is, it's broken for many, many, many, many years. These wild overshoots with splines is the single reason why I never, never, never use splines. Splines are evil. Down with splines!

    But the fix could be very simple! If the previous or the next key has about the same value as this key, then force the tangent at this key to have a horizontal tangent (that is, dv/dt = 0). That forces smooth transitions from places where the value is about the same from old to current. That is, instead of doing the crazy red thing it currently does, do the blue thingie by forcing dv/dt = 0 at those points. And if the the previous key and next key have different values, then let it do what it does today.

    0_1536540700765_a.png



  • The Code to fix this problem is already in Poser so there is no need to come up with complex solutions as above that adds more complexity to the problem such as the statement "And if the the previous key and next key have different values, then let it do what it does today."

    Here is an example to show that the Code is already there.0_1536546512882_One Key Point.png

    As you can see there is only a single Key Frame not counting the one on Frame One which has to be there by default. Notice the nice smooth curve as it goes to the Key Frame. The reason it does this is as explained above the Spline is a Sine Wave. The issue here is since there are only two points it can not calculate a Frequency since there is none. That is the reason after it gets to the Key Frame it just continues on a straight line, having no other direction to head in.

    Now if we had a proper Break Spline we would get something like this. Actually it works on the higher side of the time line going from Frame 15 to 27 it has the nice smooth curve.

    0_1536551236443_BreakSPline Middle.png

    However it turns the Spline from a curve to Linear on the Lower side of the time line see below. Both Key Frames are Break Spline. If you turn of the First Break Spline then the Line peaks above the Key Frame before turning in to a Linear line.

    0_1536551905147_BreakSPline Both.png

    So to my way of thinking the Code is there just need to make a switch to turn On/Off the code to process the effects of the Spline going through all the points. If they fix the Front part of the Break Spline to work like a Spline with no further Key Frames after that Break then it would get rid of the Overshooting.



  • people, thank you so much for your thorough sharing of your knowledge and conclusions! no doubt there are some gems here.



  • @fbs7 said

    The way that splines behave in Poser is really, really, really stupid. I have no idea how it calculates the tangents, but whatever it is, it's broken for many, many, many, many years.

    There is nothing stupid or broken about the mathematical precision and formulas Poser, Maya and even that crappy dasz uses to calculate tangents. The only thing required is an understanding of the way things work, a proper workflow for setting keys and an an intuition for animating in 3D.

    The secret to Poser animation is to "anchor" the action of a character at every 4-5 frames by setting a keyframe for the entire model instead of only the things that are
    animated. This way the tangents don't get out of hand and for the most part very little adjustent will be required between the MAIN keys which are exactly 4-5 frames apart.
    Depending on the speed of the action, (dance or fight sequences) the main keys could be 3 frames apart. For something slower, (conversations), the keys could be 6 frames apart.

    With this kind of approach, there will never be unpredictable tangents by having keys randomly placed in the timeline.



  • @gsfcreator
    If you would have a Main key every 4th frame, the curve would look more like this:
    0_1536895886408_Untitled-1.jpg

    No funny business with the tangents.



  • @krios said in Understanding spline VS linear, once and for all:

    @fbs7 said

    The way that splines behave in Poser is really, really, really stupid. I have no idea how it calculates the tangents, but whatever it is, it's broken for many, many, many, many years.

    There is nothing stupid or broken about the mathematical precision and formulas Poser, Maya and even that crappy dasz uses to calculate tangents. The only thing required is an understanding of the way things work, a proper workflow for setting keys and an an intuition for animating in 3D.

    Hmm... let me rephrase. There are many kinds of splines, and Poser can choose any one of them; "unfortunate choice" is a better attribute for the kind of spline chosen, and "obstinate" is Smith Micro's attachment to it, given that these problems with overshooting have been around since Poser 5 at least.

    The problem is with the tangents. It's very common for a software to allow control of the tangents in splines. For example, this is from Blender:

    alt text

    I don't know about Maya, but Blender allows control of the tangents, and I'd suspect that Maya does too. Without control of the tangents the splines get wild. It would be so easy to fix that in Poser - just have some rule or control that forces the 1st derivative to be zero at chosen points. That would stop overshooting right there.

    As for myself I don't use splines for anything, exactly because of the lack of control of what happens for example if you leave eyes open on splines. You just add a blink - the thing goes bananas and then you need to adjust. Too much trouble for me.



  • @fbs7

    Once again fbs, if you set a "main" keyframe every 4 or 5 frames, there will simply be no tangent overshoot and chaotic movements.
    It is true that Maya and aparently Blander have tangent handles (if that's the correct lingo), but in Poser, something like that would be a royal pain in the index finger, because we can only adjust one channel or attribute at a time. Now imagine how significantly harder it would be to adjust 9 channels or curves for each individual limb (rotate, transform and bend x XYZ), instead of simply posing the character correctly.

    Not sure about Blender, but Maya has 1001 ways to fiddle with the tangents. It gives you the ability to control/adjust several curves (or channels) at a time. But it's the old artist vs scientist approach: do you mix colors by entering precise RGB values or simply point and click on a color wheel? Which for animation would translate as: animating with curves, tangents and trigonometrical formulas, or do you simply pose the silly characters? Artistic vs. scientific approach.

    Sure you have infinitely more control over movements in Maya, but you will also wear out your index finger much faster because of the extra clicks Maya requires.

    To put it simply, 2D animators do not have tangents and 1001 ways of manipulating them! And Poser is like a 100% accurate animation assistant (the inbetweener). All you need to do is tell Poser what the main keys are, and have faith that flawless mathematical formulas being calculated at indescribable speeds, will have predictable and reliable results. But if you don't know how to use Poser... then it becomes a matter of blaming the Playstation controller when you loose to a 10 year old.