Hermite Interpolation

There is Hermite interpolation in dazscript, but setting it's params will not work as expected
Also is not available in UI, is hermit deprecated?

Post edited by MehdiZangenehBar on

Comments

  • barbultbarbult Posts: 24,244

    Do you really mean Hermit, or is it Hermite?

  • MehdiZangenehBarMehdiZangenehBar Posts: 31
    edited October 25

    InterpolationType

    Enumerated values for the type of interpolation to apply for a given key.

    Since:

    • 4.11.0.210

    • LINEAR_INTERP - Linear interpolation between key values.

    • CONSTANT_INTERP - Constant interpolation between key values.

    • TCB_INTERP - TCB (Kochanek-Bartels) Spline interpolation between key values.

    • HERMITE_INTERP - Hermite Spline interpolation between key values.

    Post edited by MehdiZangenehBar on
  • Richard HaseltineRichard Haseltine Posts: 100,877

    And what happens when you try to use Hermite?

  • MehdiZangenehBarMehdiZangenehBar Posts: 31
    edited October 25

    i am not able to create attached curve using any param input


    var node = Scene.getPrimarySelection();

     

    function frame_to_time(frame)

    {

        return new DzTime(frame * Scene.getTimeStep());

    }

     

    function add_hermite_key(control, frame, value, param0, param1, param2)

    {

    control.setValue(frame_to_time(frame), value, DzFloatProperty.HERMITE_INTERP, param0, param1, param2);

    }

     

    var z_rotate_control = node.getZRotControl();

    z_rotate_control.deleteAllKeys()

     

    add_hermite_key(z_rotate_control, 1, 0, 0, 0, 0);

    add_hermite_key(z_rotate_control, 60, 90, 0, 0, 0);

    Screenshot 2024-10-22 015116.jpg
    611 x 315 - 24K
    Post edited by MehdiZangenehBar on
  • Richard HaseltineRichard Haseltine Posts: 100,877

    Do you get an error? Does the timeline graph not change?

  • No error.
    Param2 is for TCB, not Hermite, so does not effect at all.
    Changing second keyframe will not effect the curve at all. (it will effect the curve between next key)
    So the only parameters that has effects are param0 and param1 of the first key.
    Param0 will effect left side of the curve. So value 0.1 will create the tangent, but problem is we have a strong overshoot that we can't control it.
    If we try to lower the overshoot using param1, right side of the curver goes down, but can not correct the overshoot.
    in conslution, there is not possible way to create a (Bezier) curve like the reference.

    Overshoot.jpg
    1919 x 2328 - 499K
Sign In or Register to comment.