I want to know how the De Niro (DeNiro node) animation works. Could anyone help to understand how is the smoothing obtained in this node? A simplified pseudo-algorithm would help too.
well in the beginning there was the newton node.
it was my first attempt on writing a filter that can take into account not only its current position but also its current velocity. only that way the new filter curve - that gets generated when the goal position changes - fits to the old filter curve.
all filters (linearfilter, newton, deniro, damper, oscillator) are time based and generate new filter curves when parameters change. they store the curve (per slice) and just use them later on by using such a f(t) by entering the current time.
so all those filters try to generate some filter curve that starts at the current position (p0) with the current velocity (v0) and ends at the goal position (p1) with the goal velocity (v1), which is typically 0, since you normally want the animation to end there.
with newton i tried to pull out two parabolas that do that job. the idea was that normally there is an acceleration phase (which lead to the parabola idea) and a decceleration phase. so if we could somehow generate two parabolas f0(t) = a0t²+b0t+c0 and f1(t) = a1t²+b1t+c1 that meet at a certain point in time we could construct a filter curve that is composed by those two parabola parts.
current time: t0
given acceleration by user: a
so we now can make some assumptions…
a0 = a
a1 = -a
f0(t0) = p0
2a0t0+b0 = v0
somehow i got to the point that i could solve for a0, a1, b0, b1,…
deniro just adds the idea that between acceleration and decceleration phase there could be a linear phase where that taxi driver just drives along with constant speed. it got quite complicated. i had a staple of handwritten formulas and wont get into details here. but i hope you got the idea.
oscillator and damper where done with mathematica which made it a lot easier to deal with those formulas…
hey gregsn , he said -simplified-, no?
well damper is sure simplified