With Help From My Friend

I met with my friend Dr. Takis Zourntos and we were able to obtain a Fourier Series for the given data. Thank you Takis for all of your help!

First, there were changes to be made to the initial data from the rotoscoped-synthesized sampled data. First, I need to make sure that this is clear: I start by rotoscoping the footage in Maya by placing joints over the creature’s joints. I then run a Python script that pulls the translational values and the rotational values for the joints. At this point, I’m focusing on the elbow joint’s rotational values. I took these values into Excel and got a rough visual of how the function looks (image from earlier post).

By hand, I tweak the values to get a nice period of the data and repeat it a few times:

I had to go back and clean up the data more so that it can be passed to the fft. The way I had “conditioned” the data from raw, rotoscoped data, made it very hard to convey periodicity to the fast fourier transform. I changed it to the following:

Also, I needed to account for the biasing of the signal. The first image has a Bias which was removed in the second image.

These values from 80 frames of the rotoscoped animation were selected so that it’s clearly periodic (i.e. there’s not a hard jump from sampled point N-1 to sample point N for the 80 points that go from 0 t0 N-1).  This conditioning must occur so that the fft can process the data appropriately. In order for the fft to make sense, the input signal must be periodic, this new data ensures that by taking out the change in direction from sampled point N-1 to N. I need to go back and clean this explanation up…

Now, these 80 sampled points were read into a python script. A cubic interpolation was run using numpy on the 80 points to obtain 32768 values (up-sampled for better resolution).

FFT(interpolated data points) provides the amplitude values for each frequency from 0 to Fs. Fs = 1/Ts, where Ts = (duration of time of the sampled signal) / (Number of new sample points), in this case, Ts = 3.33333 seconds/32768 =  .0001017. Therefore, Fs = 9832.842 (Hz).

Running the FFT

With this new list of 32768 data points, I called the fft. Below is the full spectrum of power and frequencies:

I then used a stem graph to look at the first 64 frequencies and their power values:

Also, calculated the frequency bins’ respective phase values:

Fourier Series

Finally, time for the Fourier Series! Using the amplitude, phase, and frequencies calculated above (I’ll add more detail soon), I was able to approximate a function by summing up the cosine functions:

Next Steps

Now it’s a matter of making sure that this function can control the elbow rotation of a joint in Maya. Use dummy data at first for the entire chain, then move the function over. Once that’s working, pool the data for all of the other joints. After this, I can assign the functions to the entire rig and try to define states for walks… Just keep moving.

Tagged , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: