ready! - mcjShiftAnim - synthesize and modify existing animations

mCasualmCasual Posts: 4,607
edited December 2013 in Freebies

---------> manual and download
https://sites.google.com/site/mcasualsdazscripts3/mcjshiftanim


this script is very much like mcjCycleFilter

but doesn't have the graphical display ( and the associated sluggish response for long play-ranges )

it can modify the animation of any (float) property or morph channel for a given node
̲̲
̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_

History
_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_

December 14th 2013 8 PM -
- fixed issue with the extremities of looping-time-shifted.
- implemented the ‘‘curPos’’ constant and the ‘‘pos’’ variable

December 13th 2013 - Released

_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_̲_


example :

you found a dance animation but the dancer's feet are below ground level

with mcjShiftAnim select the figure's hip node

specify you want the YTrans parameter to be shifted 4 (centimeters ) up

the script will go through the entire play-range and apply this change

---

example, you have a dancing character, the arms are going up and down,

with the shoulders "bend" angle going from angle 20 degrees to 40 degrees

you could use mcjShiftAnim to keep the same movement, but raise the average arms height by

by adding 10 degrees to the bend angles

---

the script can also set a joint angle or a morph strength to its current-frame value or a value of your choice

and that's done for each frame of the play-range by the script !

--

there is also an expert mode wherein a programmer can type in a formula

example, i select the Bend angle of a shoulder

i type

val = 30 + 30 * sin( 5 * ang + pi / 2 );

and the arm will now gracefully bat at a rate of 5 cycles per play-range
the bend angles will range between 0 and 60 degrees

---

soonish.jpg
939 x 847 - 71K
bat.gif
600 x 337 - 141K
Post edited by mCasual on

Comments

  • mCasualmCasual Posts: 4,607
    edited December 2013

    for important animation effects like
    - Anticipation
    - Follow through and overlapping action
    - Secondary action

    one often needs to shift a limb animation in time

    when building a walk or dance animation cycle we work on looping curves

    the last frame of the cycle must remain the same as the last one ... it's a loop

    so i added the ability to shift in time an animation curve without destroying the loop

    technically that's called a rotation

    there's will also be a function to shift without looping

    --

    note that the mcjReTime script is better suited for cases where you want to time shift a whole pose-animation

    https://sites.google.com/site/mcasualsdazscripts2/mcjretimeanimation

    respin.gif
    600 x 337 - 570K
    looped_time_shift.jpg
    1370 x 566 - 62K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited December 2013

    same animation
    i repeated it 5 times using bLooper
    i added a sinewave motion to the YTrans of the hip node using the upcoming script
    i used mcjAutoLimb and mcjKeepOriend to "re-attach" the feet to the ground

    oops actually i replaced the vertical movement instead of adding it tp the original bouncy movement

    rerespin.gif
    300 x 400 - 837K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited December 1969

    here the little shocks in the animation may be due to "aliasing"
    because of the low frame rate of 10 fps

    the vertical motion was created using the "expert" mode and a function like

    val = sin( ang * 1 ) * 12 + cos( ang * 2 ) * 6
    rererespin.gif
    300 x 400 - 542K
  • mCasualmCasual Posts: 4,607
    edited December 2013

    there !

    i removed the hard-knock movements from the hip rotations using mcjShiftAnim's simple 3-samples box filter

    oops ... error

    working on it

    well unfortunately i had to use good old mcjCycleFilter to filter/smoothen the animation curves

    but i'll fix the issue that caused the problem

    looks quite good though now

    -----

    figure 2 : the hip animation curves for this dance

    ( rendered using WebGL ! exported from daz using an upcoming-in-2014 script )
    ( meaning it's Mac compatible ny the way )

    beachdancecurves.png
    470 x 749 - 54K
    rerererespin.gif
    300 x 400 - 544K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited December 1969

    i'll add a way to load save and reload the custom functions

    hulala.gif
    400 x 600 - 570K
  • mCasualmCasual Posts: 4,607
    edited December 2013

    hula up

    ---

    added load/save function

    so if you created a formula like

    val = val +  ( cos( ang + pi / 2 )) * 5

    you can save it as fx_FlooredSine.txt

    and re-use it at a later date

    ( this formula was used to add some movement to the chest node's Bend channel

    and the side-side channel used

    val = val +  ( cos( ang  )) * 5

    --

    since this is an additive effect ( val = val + ... ), i did not wipe out the important
    chest stabilizing work performed by mcjKeepOrient prior to this

    shiftanim.jpg
    1920 x 917 - 202K
    hulaup2.gif
    600 x 319 - 771K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited December 1969

    skillz

    ( and resistance to cold )

    hulaup3.gif
    480 x 255 - 331K
  • mCasualmCasual Posts: 4,607
    edited December 1969

    ready !

    ---------> manual and download

    https://sites.google.com/site/mcasualsdazscripts3/mcjshiftanim

    and here you can see it also works in Daz Studio 1.8

    i developped it in Daz Studio 3

    still got to test it in DS4 !!! ... you never know

    ( i mean, I never know )

    boingzemovie.gif
    600 x 776 - 497K
  • mCasualmCasual Posts: 4,607
    edited December 2013

    so now the plan is, finish the Amywagen ( 1967 volkswagen transporter )

    then have the physics engine toy ready for xmas eve

    headlights.jpg
    1600 x 900 - 672K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited December 2013

    * Update ** Update ** Update ** Update ** Update ** Update ** Update ** Update *

    December 14th 2013 8 PM -
    - fixed issue with the extremities of looping-time-shifted.
    - implemented the ''curPos'' constant and the ''pos'' variable

    the looping-time shift is very important for cycling animations, since it helps you tweak anticipation and follow-through

    ------

    in figure 2 i used mcjShiftAnim to animate the balls using the "Set" processing and the "Parameter"

    100*sin( ang )

    ( actually i used parameters locking and mcjParent to copy the first ball's Z motion )

    then i used mcjShiftAnim 's Looping-Time-Shift to delay the animation of the balls by, respectively, 5, 10, 15, 20, 25 frames

    snaky.gif
    600 x 337 - 166K
    fence.jpg
    842 x 792 - 48K
    Post edited by mCasual on
Sign In or Register to comment.