Damper Transform


I am getting a (non perspective) transformation from tracking data. The transforms are accurate, but there is small jitter that I would like to get rid of.

Now the obvious thing is to use Decompose (Transform), put a damper on translate, scale and rotate (the rotate one on cyclic) and then back to a transform (with Transform (3D) ) or so).

My problem is that both Scale and Rotate values jump around between being negative and positive. The thing here: I know that Scale is 1,1,1, but sometimes, it goes to -1 randomly. Looks like:

Now, first part of the question: is there something like decompose that doesn’t try to decompose scale? So I tell it that it’s not scaled in any way?
Second part: How do I ‘scale’ these rotation values correctly? I was thinking of multiplying the scale and rotation values, but that doesn’t work as I expected.

Take a look at the Hysterisis node, it is meant for exactly those scenarios (jittery input).

For the scale you can just use RootMeanSquare, to always keep it positive. The rotation I guess goes between -0.5 and 0.5, so if you convert them to cartesian coordinates and back to rotation, you will get the right result. Then add hysterisis to smooth it out.

Something like this:

remove_jitter.v4p (32.0 KB)

i once made a module. Decompose.zip (7.2 KB)
does it have the same issues?

you could also dig into the decompose code of slimdx or sharpdx, it should not be too complicated to write a dynamic plugin and ignore the scale part.

but i think that the sign flip does not necessarily come from the decompose, but rather from the solver of the tracking. so check the matrix before the decompose and see if it also flips signs. if yes, you need to filter before the solver, for example filter the input points or so…

decomposing algorithms I found so far will give stable and consistent results only when transform is orthogonal and not mirrored on any axis. If scale is mirrored (negative at least on 1 axis) then it “distorts” “rotation information” and that’s why it jumps around. for Damper you need to do quaternions anyway instead of euler angles. I already have a simple module though in mp.essentials https://github.com/microdee/mp.essentials/tree/master/nodes/modules/transform https://vvvv.org/contribution/md.ecosystem.mp

These look great! I’ll report back what worked as soon as I come to it!
If there is a general approach of course I’ll make something that could go in the addonpack.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.