mcjCycleFilter for DS 1,2,3,4


mcjCycleFilter was initially created to filter/smooth cyclical animation curves.

then were added the ability to
  • use your mouse to directly edit the curve
  • synthesize the curves from mathematical functions
  • repeat, slow down, speed up or delay an animation

Version History
    • January 4th 2013 fixed crashed-inducing problem when a figure's root node was selected
    • march 17th 2012 fixed for daz studio 1.8 compatibility ( no prop.isSelected() )
    • Jul 27, 2011release


    A Zip file containing the script(s) can be found at the bottom of this page, in the "attachments" section

    Unzip this file in your Daz Contents folder, typically this means c:\program files\daz\studio\content.

    Once installed you will find the script in your library, in Studio/scripts/mCasual

    mcjCycleFilterDS2.ds is for Daz Studio version 1.8 and 2

mcjCycleFilter.dsa is for Daz Studio version 3 and 4


    important note: mcjCycleFilter is a script, not a plugin.
    Like all scripts it tends to do its work rather slowly.
    So you will want to use it on short animations.

    It was created for cycles, like walk cycles and dance cycles

    Select a node in your scene, example, i selected Aiko3's right foreArm

et the PlayRange (Timeline tab ) to a short span of time, ex: frames 0 to 30

    Launch mcjCycleFilter by left-clicking on its icon in Studio/scripts/mCasual

  VIewing / editing the "Current Values" curve

    in the upper right corner, select one of the properties of the foreArm, i selected Bend
    in the lower left corner of the screen you can see that the source selected is "current values"

    in the lower right corner of the screen you can see that the Input Range covers frames 0 to 30

    all this means : the red horizontal line shows us that Bend  is currently at 0 degrees and stays 0 degrees  from frame 0 to frame 30

    the red square indicates that Bend has a keyframe at frame 0

    in the upper left corner you can see "Bend - Current [-1 1]"

    so for points on the curve at the bottom of the plot Bend is at -1 degree and for those at the top Bend is at +1 degree

when "Source Selector" is set to "Current Values" you can use your mouse's right button to add key-frames and you mouse's left button to delete them.




  Time-shifting and Time-stretching a curve

    in figure 2, the selected source is still in current values

    Input Range goes from frames 0 to 30

    we can see that the Bend angle varies from 0 to 90 degrees,

    Aiko is bending and unbending her arm,

    this all happens in 1 second since the frame rate is 30fps.

    but this time the Output Range is not identical to the Input Range, instead i typed new values so that it covers frames 30 to 90


    if we press the "Apply" button, mcjCycleFilter will do its magic !


Notice that after i pressed Apply, i changed Input Range to [0...90]

and we can see what happened

the animation curve that existed from frame 0 to 30 was copied ( time shifted ) to frame 30 and was time-stretched to cover 60 frames or 2 seconds

  Filtering / smoothing a curve

    In mathematics, our animation curves are called functions. Example, Aiko's right Forearm's bend angle is a function of time.

    In the 1800's Joseph Fourier discovered that any function can be expressed as a series of sinewaves, of various frequencies, phases and amplitudes;


   By removing some of the fastest moving sine-wave components and re-synthesizing the function, we obtain a smoothed curve

    Filtering is turned on by check-marking the "Enabled" check-box in the "Filter" group.

    The "harmonic cutoff" slider lets you specify which sinewave components are excluded from re-synthesis.

    Smaller values give smoother curves.

    An added benefit is that the curves now smoothly loop.

Example: in red, we see a jittery animation, and in blue, the smoothed/filtered curve we obtain with a Harmonic cutoff of 3




Before filtering

After filtering    


 The built in synthesizer ( mathematical functions )

    Instead of working on the existing animation curve you can build one from scratch using mcjCycleFilter's built in synth.

    Turn it on by clicking "Synth" in the "Source Selector" box.  
    the func drop-down-
list lets you chose a mathematical function

Available functions in this version
  •   Sine
  •   Abs(Sine)
  •   Cosine
  •   Abs(Cosine)
  •   Triangle
  •   Sawtooth
  •   Square
  •   Random
  •   Constant
  •   Parabolic
  •   Peak
  •   Smooth Step
  •   Oval
  •   Trapezoidal

    Min and Max let you specify the amplitude of the swing. For Aiko's right ForeArm, we could use Min = 0 and Max = 90
    angles are reversed for the left ForeArm, so we could use Min = -90 and Max = 0 or Min = 0 and Max = -90

    Phase lets you shift the curve while maintaining perfect looping. A Phase of  90 degrees shifts the curve by 1/4 of the curve's width.
    A Phase of 360 degrees shifts the curve by the full width of the curve ( and is in fact a waste of time )

    Cycles will make the function repeat a number of times.


The first func in the list is named "current" allows you to shift, amplify/attenuate or duplicate the existing animation curve

things mcjCycleFilter was meant to do

Many natural character movements use the sinewave function.

Circular movements

By using different values of phase
you obtain circular movements


Aiko's right Shoulder's

property:    Front-back
function: sinewave
Min: 0
Max 60
Phase -180 degrees

property:   Bend
function: sinewave
Min: -50
Max 30
Phase -90 degrees

result: the arm traces a nice oval
also, the hand moves at a constant speed

Follow-through / movement that propagates through the body

Starting from the hip and ending at the head, we apply sinewaves with decreasing phase values


Aiko's hip
property:    ZRot (side tilt )
function: sinewave
Min: -15
Max 15
Phase 120 degrees

Aiko's hip
property:    XTrans (side movement)
function: sinewave
Min: -12
Max 11
Phase 120 degrees

Aiko's abdomen
property:    side-side
function: sinewave
Min: -20
Max 20
Phase 90 degrees

Aiko's neck
property:    side-side
function: sinewave
Min: -20
Max 20
Phase 30 degrees

Aiko's head
property:    side-side
function: sinewave
Min: -20
Max 20
Phase -30 degrees

Note that the legs animation was done using the mcjAutoLimb script available here


Here we phase-shifted the sways of the dress relatively to the body sways


mCasual Jacques,
Jan 4, 2013, 6:43 PM
mCasual Jacques,
Jul 27, 2011, 5:30 AM