Goals

The ultimate idea behind this project is to be able to automatically identify [repetitive] cyclical motion sequences in motion data and then link them together in a seamless way to extend that motion. The characteristic of seamlessness may actually require dynamic changes of the loop data with time, rather than just a simple repeating of 1 cycle.
There are several stages in accomplishing this goal. These include:
  • Extending the programming assignment to transition smoothly from one motion sequence to another. This would be needed in order to do simple things like blend between the possibly different poses at the end and beginning of a motion cycle.
  • Identifying cyclical motion. This stage would step through both simple, common sense, possible manual methods for identifying a cycle and more complicated methods outlined in contemporary research papers. The pros and cons of each method would be examined.
  • Putting the first 2 steps together and creating an animation.
  • Adding methods for changing the looped motion to better approximate dynamic changes that would naturally occur.

    Progress

    The basic part of the project is finished. The executable and source can be found in the 838/proj subdirectory. The executable depends on several files in the proj directory, and consequently must be executed while inside that directory. Here's how the steps mentioned in the Goals above were implemented:

    Transitioning from the end of a cycle to the beginning of the next:

    This is done by simply interpolating [quaternion slerp] the ending frames of the cycle with its starting frames. The same is done for the starting frames.

    Identifying cyclical motion:

    A cost function is defined that categorizes how well a given start and end frame could produce a cyclical motion. All of the factors of the cost function compare the vector coefficients of the quaternions to measure the 'distance' between poses. In this case, a lower cost means a better cycle. The factors are:
  • End to end similarity - How well the end+1 frame matches with the start frame.
  • Pattern Similarity - How well the start to end frames match with the sequence immediately following them. The following sequence is allowed to differ in length by a percentage [currently ~20%]. This is done by computing the lowest Pattern Similarity for all following sequences in the range
    [end+1,end+1+(start-end)*.9] - [end+1,end+1+(start-end)*1.1]
  • Action - How much 'action' happens during the cycle. This is computed as the average difference of all frames in the cycle from the start frame. Although this factor can actually decrease the selection of a 'good' cycle, it is necessary to ensure that we do not pick cycles where the character doesn't move at all.

    Quick Reference Guide/Interface Explanation

    The interface extends the functionality of assignment 3:
    Keys
    Middle Mouse Button + Mouse X axisChange current frame
    Left Mouse Button + Mouse X & Y axisChange camera position relative to screen plane
    CTRL + Left Mouse Button + Mouse X & Y axisRotate the direction the camera is looking in
    TAB + Left Mouse Button + Mouse X axisChange view angle
    TAB + Left Mouse Button + Mouse Y axisMove the camera 'in' our 'out' of the screen plane
    (Set the start frame of the cycle to be the current frame
    )Set the end frame of the cycle to be the current frame
    nGo to the next frame
    pGo to the previous frame
    NGo to the next frame, loop to the beginning of the cycle if we are at its end
    PGo to the previous frame, jump to the end of the cycle if we are at its beginning


    Other functions can be accessed by using the buttons. A diagram of their function is shown below:




    The sliders work pretty much like ordinary sliders with the one exception that the cycle finding factors have an additional function:
  • Holding down the shift key and clicking in the upper part of the slider will attempt to find a cycle with more of that factor.
  • Holding down the shift key and clicking in the lower part of the slider will attempt to find a cycle with less of that factor.
    For various mathematical reasons, this functionality may not always work when transitioning to or from a slider value of 0. In addition, seemingly sharp contrasts between picked cycles may be obtained by setting the Pattern Similarity Factor to 0. This is because a non-zero Pattern Similarity Factor excludes checking of the last n frames,[where n is the cycle size]. This may ignore what are otherwise good cycles.