mcjTorsionSpreader - Updtd Aug 7 - spread head rotations across trunk joints

mCasualmCasual Posts: 4,607
edited August 2017 in Freebies

 

This script will help you spread the rotations a figure's head across the hip, abdomen, 

chest and neck nodes

 

https://sites.google.com/site/mcasualsdazscripts8/mcjtorsionspreader

 

The repair

by "repaired" i mean the animation/playback range functionnality was repaired

in version 2, i memorize the orientation of the head before applying the spread

because ...lets say there's no keyframes on the abdomen node, 

at frame 0 i apply the torsion-spread, which modifies the abdomen orientation

... for the whole animation range !! 

... which corrupts the head orientation for the whole animation range

 

 

image

image

prayersdone.jpg
800 x 800 - 107K
smallsifto.jpg
800 x 800 - 142K
Post edited by mCasual on

Comments

  • mCasualmCasual Posts: 4,607

    the test i made for the repair

     

  • CGI3DMCGI3DM Posts: 279

    Wow. Makes the movements more natural.
    Great

  • manekiNekomanekiNeko Posts: 1,405

    aah, another great "other joints follow" script after the look at camera! excellent to avoid those rigid robotic moves/positions! thanks a lot mcj :D

  • Sweet script thank you

  • mCasualmCasual Posts: 4,607
    edited August 2017

    Welcome, note that in recent uses of the script i encountered issues,

    i was excluding the hip node from the list of joints that share the torsion angle

    and it didnt look good!

    so maybe today i'll do more tests and update the script

     

     

    Sweet script thank you

     

     

    fire1.jpg
    800 x 900 - 86K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited August 2017

    here's the first test of the fix

     

    before computing the Torsion-Spread, 

    the script notes the rotations of the hip node for every frame

    then it zeroes the hips rotations for every frame

    then it computes the abdomen-chest-neck-head Torsion-Spreading rotations

    then it puts the hip rotations in their initial rotations for every frame

     

    fire3.jpg
    1920 x 1080 - 204K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited August 2017

    tada i solved the puzzle
    1 - memorize hip orientation 
    2 - zero hip orientation
    3 - compute torsion-spreading rots for hip, abdomen, chest, neck, head
    4 - apply initial hip rotation multiplied by new hip rotation
    5 - new coffee

    6- upload the new version ( v3?) to my site

    fire4.jpg
    1280 x 720 - 159K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607

    mcjtorsionspreader has been updated, should now work well for all initial hip world-space-rotations that are non-zeroed

     

     

     

  • tfistfis Posts: 129

    Thanks, but it doesnt work for me.

    If I hit the do it button, the first frame looks nice, on the following frames the figure seem to be bend to the ground.

     

  • mCasualmCasual Posts: 4,607
    edited April 2023

    i'll try it on genesis 8

    the basics is that it takes the rotations of the head and divides it between the other nodes of the trunk

    usually i don't checkmark the hip, so it doesn't participate in the torsion spreading

    in some cases the rotation limits of the trunk nodes can be an issue, meaning that the script applies a

    rotation of 25 degrees on a trunk joint but the limits ... limit it to 15 degrees ... so the pose doesn't make the final head orientation the same as it was before mcjTorsionSpreader was applied

    ok ... testing on G8 ..

    1 - zero-pose at frames 0, 15, 30

    2 - at frame 15 - head only twist 22, bend 25

    3 - apply mcjTorsionSpreader from frame 15 to 30

    seems to work as expected

    note: since nothing was keyframed between frame 0 and frame 15

    we now have G8 starting in a zero pose staring straight ahead at frame 0

    and all the trunk nodes slowly moving to the new pose at frame 15 ( the pose set be mcjTorsion Spreader )

    since initially there were no keyframes from frame 15 to 30, we start at frame 15 with our torsion-spreaded pose

    and one frame after the other torsion spreader applies the de-torsioning based on the pose at the previous frame and the pose at frame 30.

    All this to say that depending on the way the figure is keyframed, the result may be unexpected.even if mcjTorsionSpreader did what it always does

    ----------

    two ideas to improve mcjTorsion spreader

    1 - add a "smart-mode" - in this mode, the script memorizes the head positions for each frame (even the non-keyframed frames) before applying the de-torsioner

    2 - add 3 checkboxes to enable/disable use of the bend/twist/side-side rotations of the trunk nodes 

    note if you want a figure to look behind her back, the limits of each trunk node wont allow the torsion-spread to work, so you may want to turn limits Off of those joints, use mcjTorsionSpreader, then readjust things that would hurt your figure's spine

     

    in the (very mean) meantime, one could use mcjDecimate or mcjDecimateEx or even bLooper to keyframe every frame of the playrange

    this way mcjTorsionSpreader's keyframes wont affect or be affected by other frames in the playrange

     

     

     

    ts2.jpg
    1280 x 1080 - 733K
    Post edited by mCasual on
  • tfistfis Posts: 129

    Thanks for your reply.

    It seems, that all bend values are set to 0, if you run the script
    If the upper body is in initial pose (without any bend values), everything is fine.
     

  • mCasualmCasual Posts: 4,607
    edited April 2023

    i didn't test an animation but it seems to work,

    When the script succeeds the head orientation remains the same after applying mcjTorsionSpreader

    so in this case Kim's torso was twisted to the left but her face/head was facing us,

    after running the script she was still facing us, but her torso joints helped her attain this head orientation

    i looked at the code and there's just the hip node processing that looks wrong, but i always un-check-mark the hip node

    KimTwisted.png
    640 x 1080 - 1M
    KimUnTwisted.png
    640 x 1080 - 1M
    Post edited by mCasual on
  • tfistfis Posts: 129

    I did uncheck the hip, but all bend nodes are set to another value.

    Dont know,. what I did wrong.

    1.jpg
    786 x 523 - 19K
    neu-2.JPG
    474 x 450 - 16K
    neu-3.jpg
    1021 x 476 - 22K
  • mCasualmCasual Posts: 4,607

    maybe because you specify a frame range of 1 - to 600 instead of 0 to 600

    sorry about the long delay in answering

    you have an animation keyframed for each one of the 600 frames and you want each frame pose to be de-torsioned, is that it?

    maybe turning off the limits on the nodes would help, then you can put them back in effect, just an idea

     

    tfis said:

    I did uncheck the hip, but all bend nodes are set to another value.

    Dont know,. what I did wrong.

Sign In or Register to comment.