# Relative animation

I’ve seen in other animation forum one feature that can be “easily” applied to us.
Say you have one parameter that is already animated. Then when you are in not animation mode and try to modify this parameter, Synfig Studio complains that the parameter is already animated and that you’re not in animation mode.

For example we have a real value with three waypoints:

t=0 v=4
t=1 v=5
t=2 v=1

Now imagine that even being at not animation mode you try to modify the parameter at t=1 and gives to v a value of 4.

t=1 v=4 (new value)

Then Synfig Studio would understand that you want to offset the animation to match a value of v=4 at time t=1 and subsequently the other waypoints would change to this:

t=0 v=3 (offseted by Synfig studio)
t=1 v=4 (new value from you)
t=2 v=1 (offseted by Synfig Studio)

Similar would happen if the time of edition is not a waypoint’s time. It just would add a new waypoint and would offset the rest the amount of the value at that time minus the new value given by the user.

Would you find this useful?

-G

Absolutely, but having it in non animation mode might lead to unexpected result for he user.
Say you accidently change a value. You get a warning and realise this, having to alter the value in animation mode.
If you however can change all values you might not realise this before it’s to late.

The function is very useful, but perhaps not in non animation mode.

A continuation of this function is scaling of curves. One value is scaled and the others is scaled based on this.

We need two point in time, the frame at which the value is fully scaled and the base of the scale which is not scaled at all.
example:
fr01 - some value of 2
fr02 - 4
fr03 - 8
fr04 - 1

We are at fr.03 and want to scale this 2.0 (200%) to a value of 16. We decide base value is fr.01 and this value, 2, stays as it is (0% scale). Now full scale, 100% is 8-2=6. Fr02 at 4 is roughly 66% of this span to start with so it scales to 6,64. Fr04 is scaled to roughly 1,16 (16% of original span).

It is a great idea but I’m a bit confused with the numbers.

Say f=frame v= value
f01 - v2
f02 - v4
f03 - v8
f04 - v1

Say f01 is the unscaled frame and f03 the scaled frame.

f01 - v2 (unaltered)
f02 - v4
f03 - v16 (scale factor is s=2.0)
f04 - v1

So scale for a general v is:

s(v) = a*v + b
s(2) = 1.0
s(8) = 2.0

1.0 = a2 + b
2.0 = a
8 + b

Subtracting second from first equation:
2.0-1.0 = 1.0 = (a8+b) - (a2+b) = 6*a
Then a=1/6 and then b = 4/6 = 2/3

So s=v/6+2/3

Then s(4) = 4/6 + 2/3 = 8/6 = 1.333 so for f02 we have v=41.333 = 5.333
And so s(1)= 1/6 + 2/3 = 5/6 = 0.833 so for f04 we have v=1
0.833 = 0.833

Is that right?
-G

Yes, you’re probably right. I’m embarrassed for my poor math skills late at night. But you get the concept I’m after? Scaling a curve up or down relative to pre-defined frames/values.

Sure.

What would be needed is some interface design for that -G

So what’s your proposal to when this relative animation can be used? Maybe one additional keyboard combination meanwhile tweak the ducks? One new tool? One toggle additional state (absolute / relative)?

Remember that when the value is not animated and in non animation mode, relative and absolute animation has not difference.

-G

i’hav heard somes are found of ducks, dogs, cyborgs, octopus and MyLittlePoney more than cats in here …