ValueAtTime in Synfig

I have been experimenting with a way to create a Smart Bone–like controller in Synfig using existing ValueNodes, without adding a new deformation system.

The idea is to use a timeloop node with duration="0s" as a kind of ValueAtTime lookup table.

Example:

<point>
  <timeloop type="vector">
    <link>
      <animated type="vector">
        <waypoint time="0s">
          <vector>
            <x>1.47</x>
            <y>-0.11</y>
          </vector>
        </waypoint>

        <waypoint time="0.8s">
          <vector>
            <x>1.73</x>
            <y>-1.49</y>
          </vector>
        </waypoint>
      </animated>
    </link>

    <link_time>
      <time value="0.8s"/>
    </link_time>

    <local_time>
      <time value="0s"/>
    </local_time>

    <duration>
      <time value="0s"/>
    </duration>
  </timeloop>
</point>

Instead of treating the animation timeline as actual time, it can be treated as a pose table:

0.0s -> Pose A
0.4s -> Pose B
0.8s -> Pose C

Then a bone rotation (or any controller parameter) can be converted into a time value and connected to link_time.

Conceptually:

Bone Rotation
      ↓
Time Conversion
      ↓
link_time
      ↓
Timeloop / ValueAtTime
      ↓
Point Position
      ↓
Bone Deformation
      ↓
Final Result

This means the spline point is modified before the bone deformation is applied:

Rest Shape
      ↓
Controller Shape Correction
      ↓
Bone Deformation
      ↓
Final Shape

Which is very similar to how Smart Bones, corrective shapes, or driven shape keys work in other animation software.

The interesting part is that no new deformation engine is required. The existing animation system is effectively being used as a pose lookup system, where the timeline stores shape states and the bone rotation selects which state to evaluate.

In other words, the timeline is no longer being used as “time”; it becomes a parameter space for shape deformation.

I am curious whether this approach could be useful as a lightweight foundation for Smart Bone–style controllers in Synfig.


Perhaps the developer of the slider/joystick ( Joysticks in Synfig (Controller Plugin) )plugin would be interested in using this technique, as it could make the plugin even more powerful and advanced.

demo_Wayang.sifz (530.9 KB)

3 Likes

Wow, the video looks like it was made in moho. Was it actually done in synfig? This is ground breaking, wonderful job.

Nice result!
Let’s hope that one day we will be able to record in real time the changes applied to the controllers (like puppets), it would be marvelous :stuck_out_tongue:

Tips: if you want to do diagrams, there is the graphviz plugin activated

test Graphviz Test stepA Step A stepB Step B stepA->stepB stepC Step C stepB->stepC
[graphviz]
digraph test {
  rankdir=TD;
  label="Graphviz Test";
  labelloc="t";
  fontname="Ubuntu"; fontsize=12;
  nodesep=0.3;
  ranksep=0.3;
  colorscheme=x11;

  node[shape="box", style="filled,rounded", fontname="Ubuntu", fontsize=10];
  edge[shape="box", style="filled,rounded", fontname="Ubuntu", fontsize=10];

  stepA[label="Step A", fillcolor="lightskyblue1",color="lightskyblue"];
  stepB[label="Step B", fillcolor="pink", color="#FF6B6B"];
  stepC[label="Step C", fillcolor="darkseagreen1",color="darkseagreen", shape=diamond];

  stepA -> stepB -> stepC;
}
[/graphviz]