mcjAutoLimb 2014, an IK system for animators now with poles - For DS 1, 2, 3, 4
download : https://sites.google.com/site/mcasualsdazscripts3/mcjautolimb2014
when i updated my site's index i accidentally un-hid mcjAutoLimb 2014
so now i'm completing/ fixing it
the mcjAutoLimb script saved me hours of work when creating animations
https://sites.google.com/site/mcasualsdazscripts/mcjautolimb
mcjAutoLimb works this way: select a target, example a marble
select a figure's finger tip
run the script
bam, the script computed all the arm movements required to bring the finger tip to the exact location of the marble
example 2
create a null node, place is at the position of a figure's ankle
select the figure's ankle
run the script
in a few seconds, the script computed all the leg movements required to keep the ankle at the position of the (immobile) null node
so even if the figure was swaying hips the ankle stays put
--------
One issue is that, there's an infinity of ways to position an arm so that the finger tip reaches the marble
in the old version you have a slider named "spin" which lets you adjust the way the arm is twisted
----
the difference with mcjAutoLimb 2014 is that
you'll create objects ( could be null nodes, could be balls ) which will become targets for the elbows or the knees of the figure
we'll call them "targets"
for example, you place a target for the left elbow behind the figure, to the left
and the script will try best as can be to keep the left elbow "point" at that target
-----------
in the animation below, Amy's thumb tip follows a red ball with the extreme precision you can obtain with mcjAutoLimb
and, the bend of the elbow always "points" at the green ball far behind Amy
This way she doesn't twist her arm erratically
---
technically speaking, having the elbow "point" at the green ball means
imagine an infinite plane passing through Amy's shoulder, elbow and thumb
tip, the script adjusted the arm twist to make sure that plane passes through the green ball
Comments
example
i have a yellow handle animated to turn in circle
i create an identical green handle which i place in Amy's grasp
i parent the green handle to Amy's right hand
i select the yellow handle ( henceforth deemed to be the Target )
i add the green handle to the selection using the CTRL key ( henceforth deemed to be the Targeter )
note how the targeter does not need to be a hand or a finger, as long as it is parented to an arm
i launch the script
select the whole 300 frames of animation as the range to be processed
since i did not select a "Pole"
the pole will be generated by the script, about 10 ft / 3 meters behind Amy's elbow
i click on the "doit" button
and it's done !
It's definitely an interesting animation script. One thing I did notice in your test animation is that the collar bone of the figure isn't moving as the arm does. IF you move your own arm in the motion that the girl in your animation is doing, the entire shoulder moves around on the collar joint and scapula. the whole joint moves, not just the arm.
the script measures the distance between the shoulder joint and the target, then by successive tests, it finds the elbow bend angle that gets us this arm length, then it rotates the arm around the shoulder joint so that it points at the target - then the new feature twists the arm so that the elbow apex 'points' at a chosen point in space
involving the collar bone in an automated way would be tricky , and involve managing the 'sharing' of the of the rotation between the shoulder and collar . this is harder to do than a simple average since it modifies the arm length.
when i want (or cant avoid) to involve the collar bone, i animate it ''manually'' so that later on the script's aim-reach task is facilitated
another factor is that collar bone movements tend to stretch clothes and breasts in odd looking ways so i often zero-and-lock them
in fact i have an unpublished script that "steals" all rotations from the collar bone and adds them to the shoulder joint, usually for mocap animations that destroy dress tops
so i'd say, manual human-intelligencce for the rough animation of the collar bone followed by automated and very precise aim-reach by the script
she would possibly also move the abdomen and hips
doing some testing
but the script should be posted today !
using objects held by the hand , ( like swords ( as the targeter
----
in the second test animation
the green ball serves as the "pole" of attraction for Amy's right elbow
the pole was parented to Amy's right collarbone
so it turns when she turns her torso
so her right elbow always aims somewhere behind her back
the blue and orange balls are the poles of attraction for her knees
they are not parented to her hips
the feet got their fixed orientation through the use of the mcjKeepOrient script
and their rock-solid positions was obtained using mcjAutoLimb 2014
-------
figure 3
i'll add something that reports the "misses" when the target is simply out of reach and there's nothing the script could do
Also hubble bubble, stir that cauldron. :)
or she's unlocking one of the hatches in a Voyage to the bottom of the sea submarines
which is always hazardous since there's usually monsters behind those hatches
low-budget monsters, but still
there will also be a new mode !
if you only select a finger tip or a hand or something parented to a hand
then the script will create a target node for you at the current location of the finger or hand ....
so that's for case when the hand of the foot is where you want it to remain
( previously you had to use the mcjMakeTarget script or make your own targets )
so if you don't supply a target node, then the script creates one at the current location of the targeter ( usually a hand or a foot )
also, if you don't supply a pole-of-attraction for the elbow or the knee, the script creates one, 3 meters behind or in front of the elbow or knee
this pole is automatically parented to the corresponding collarbone or the buttock
--- the script is almost ready !
though i have to update the manual-web-page ... what a drag :)
============
Fig 2
when the script generates target and pole nodes for you, it also lets you delete them upon exit, or keep them
well it's ready i think
but i only tested it with Aiko3 in DS3 and DS1.8
tomorrow i'll see if it works in DS 4,5+
https://sites.google.com/site/mcasualsdazscripts3/mcjautolimb2014
so the more official and louder release is tomorrow:)
unless you're mostly using DS3 too ! like me !
- Official Release - - Official Release - - Official Release - - Official Release - - Official Release -
-- Free donuts and coffee -- -- Free donuts and coffee -- -- Free donuts and coffee --
-- Just kidding about the Free donuts and coffee -- -- Just kidding about the Free donuts and coffee --
https://sites.google.com/site/mcasualsdazscripts3/mcjautolimb2014
good news i can confirm mcjAutoLimv2014 works with Daz Strudio 4.6 pro !
and mcjAutoLimb 2014 is The tool Daz Studio animators cant live without, except if they do since they can :)
for aiko5's right hand, i simply place her hand where you see, then selected the hand and ran the script
this stabilized the position of the hand for all 24 frames ! and took 1 second
this also created a null node which i can now use as a target
i animated this target niode using mcjCycle filter
i added a sinewave motion along the z azis )(
i selected this target node, added the right hand to the selection
ran the script
badabing 24 frames of animation automatically generated and the hand now has a sinewave back-forth motion
for the tight hand, i placed a ball in her hand, and parented it to the hand - this will be the targeter
i created a second ball as a target
i selected the ball, followed by the targeter
ran the script
bam, the arm position was changed and the targeter ball reached exactly the position of the target ball
Thanks for this most useful script, the elbow targets are going to help much
- Update - Update - Update - Update - Update - Update - Update - Update -
i improved the ability of the script to find previously created pole nodes
so, if you select only a target and targeter ( ex: hand or foot )
or if you select only a targeter ( ex: hand or foot )
then mcjAutolimb will look at the nodes parented to the corresponding arm or leg and if it finds an "old" pole node, it will be re-used
if no "old" pole node is found, them the script will look in the whole scene, if it finds an "old" pole node, it will be re-used
if no pole are found at this point, a new one will be created positioned and parented to the arm/leg
Jacques,
I'm having a devil of a time using this. I set it up once in a scene, and all seemed to be working. Then I changed something, and now it seems the parts are "forgetting" what they are supposed to do. I try repeating the process, but it doesn't seem to fix it. I fixed it once, but now it's broken again.
Say you have Aiko, or Vicky leaning against a wall with her hand. Say you want her to turn or bend at the torso without the hand moving. Here's the steps I followed:
At Frame 0, with everything positioned, I selected her hand and used mcjMakeTarget to create a null target at her wrist. OK, great.
I parented the rHand_target node to the stationary object.
I selected the above target, then ctrl-select the rHand and run mcjAutoLimb with my 120 frame animation range, step = 10. OK
I select the hand, then ctrl-select the stationary object and run mcjHoldOn with animation range 120, step = 10, ref frame 0. OK
Supposedly, when I make her bend at the chest or abdomen, the hand should stay put. It's not. Like I said, this worked at one point, then it "forgot". Is there a way to reset these scripts' actions without deleting the whole animation and starting over? I'm at wit's end. :-S
Note that in this case, the primary figure is what is moving, and the secondary figure she is holding on to is not. This is somewhat the opposite of the example with Aiko holding on to Aiko4's shoulders.
if we are talking about mcjAutoLimb 2014
what the script does at every frame IS
-if you did not supply one, the script creates a "pole" node and parents it to the arm's collar bone
The pole node which marks the location where the elbow-bend is currently "pointing at"
-it measures the distance between the shoulder and the target
-it bends the elbow until the arm's length matches that distance
-it rotates the shoulder so that the hand reaches the target
-it twists the shoulder so that the elbow-bend still "points" at the "pole"
one thing to look for is that the target is always within reach
shoulder-to-target-distance < shoulder-to-extended-arm-length
make sure the shoulder rotation limits don't prevent the arm
from "pointing" at the target
( or turn off the arm rotation limits )
in some cases the position of the pole node ( which governs the arm-twisting ) doesn't make sense
then the arm (or leg) becomes alarmingly twisted
in such a case you should un-parent the pole node from the figure's collarbone
and position or animate it so that it gets the elbow-bend pointing at a manageable position
----------
Note that both mcjHoldOn and mcjAutoLimb have an option to only act on the frames in the current playrange
so if, in the Daz Studio timeline panel i set "Range" to 30, 60
and if i tell mcjHoldOn that the "range to process" is the playrange
the existing animation from frame 0 to 30 should be preserved
------------
in the animated example below, i had to re-position the pole node because the one created by mcjAutolimb was not working
----------
note: (autolimb2014) if you only select the figure's hand, and no target,
mcjAutolimb will create the target node for you at the current hand position
this target node is not animated and not parented
Good explanation, thanks. I know the target is within reach, and the elbow is only partially bent, so there is more room to bend. The pole node seems to be in a reasonable place. What happens if you run the script more than once with the same parameters? What I've been trying that does not seem to help is to delete the target and the pole node and running all three scripts again, mcjMakeTarget, mcjAutoLimb2014, mcjHoldOn using the full range, 0-120. I'll try the play range option. I have everything up to frame 70 OK. It's when I go to the next keyframe, 80, and try changing the torso pose that the hand pose does not "hold on" to the target.
i think you probably should try this
set the playrange to frames 0 to 70
select the hipnode
run the mcjDecimate script
https://sites.google.com/site/mcasualsdazscripts/mcjdecimate-for-ds-12-3
set the "step" to 1 frame
This will create 1 keyframe per frame for the hip node
i call this "pinning down" the animation
repeat this for the abdomen and chest nodes ( and collar bones if you animated them )
why?
if you only keyframed the abdomen node, say, at frame 1
then at frame 90 you twist the abdomen
you'll notice that the twisting now begins at frame 1 and reaches its final twist at frame 90
if before adding that twist at frame 90
you used HoldOn or Autolimb on frames 0 to 70
they both based their arm animations
on the fact that the abdomen was not moving at all
---
i often use mcjDecimate to smoothen animations
example animations obtained from BVH files
or animations from the kinect
if you run it to "pin down" the animation every 5 frames
it removes most of the jitter
Well, I hate to admit it, but I gave up on this approach. I did use the scripts to one more useful purpose. I created two null targets, both at the wrist of the hand that holds on. I parented one to the hand, and one to the object being held on to. After changing a figure pose, and the hand moving when it wasn't supposed to, I would just grab the hand and drag it back into place until the axes of the nulls lined up again. Minor tweaking of twist, rotate and bend and off to the next keyframe. I also save pose presets at each keyframe, so I can reconstruct the good poses.
one possibility for your troubles with mcjHoldon is that instead of selecting
for example, the shoulder node as the object being
held on to, you selected the root note of the figure
one possibility for your troubles with mcjHoldon is that instead of selecting
for example, the shoulder node as the object being
held on to, you selected the root note of the figure
That's not it either. Does it matter which body part is being held on to as long as it's not the root?
usually you first use mcjAutoLimb to get the hand to remain at a fixed position relative to the object being held-on-to
then use mcjHoldOn's duty is to keep a fixed relative angle between the hand and the object being held on to
usually you first use mcjAutoLimb to get the hand to remain at a fixed position relative to the object being held-on-to
then use mcjHoldOn's duty is to keep a fixed relative angle between the hand and the object being held on to
Well, that's what I did. I worked at first, but then I broke it. Where, exactly does mcjAutoLimb store the data DS needs to calculate arm position to keep the hand still? I saw something getting stored in the Windows registry, but I didn't see any meaningful data there. I'm running DS3 on Win 8.1. Could there be an issue with storing and retrieving the data?
Well, that's what I did. I worked at first, but then I broke it. Where, exactly does mcjAutoLimb store the data DS needs to calculate arm position to keep the hand still? I saw something getting stored in the Windows registry, but I didn't see any meaningful data there. I'm running DS3 on Win 8.1. Could there be an issue with storing and retrieving the data?
when in the first phase, you use mcjAutolimb
it bends the elbow and twists, bends back-forth's the shoulder, to keep the wrist position at the position of the target
but by doing so, the orientation of the hand becomes very random
that's why we use mcjHoldOn in the second phase
so you return to frame 0 of your animation,
if mcjAutoLimb did its job correctly, the wrist is at the proper position
but you usually need to re-pose the hand so that it holds on to the target
then you select the hand and the target
and run mcjHoldOn
for each frame of the animation that follows
it will re-pose the hand so that the hand remains oriented the same way relative to the target
note that mcjHoldOn only re-orients the hand it doesnt move the wrist
position since it doesnt rotate the foreArm nor the shoulder
so you could say the data is memorized in the keyframes
I've been struggling with Autolimb script, only few frames threw the target(s) out of sync during animation. It rotated the target as they shouldn't, it threw the feet off the bike pedals off the target. I tried Holdon script but nothing seems to be working. What am I doing wrong?
i started writing an illustrated step-by step tutorial about using mcjAutoLimb2014 to bike-around :)
https://sites.google.com/site/mcasualsdazscripts5/tutorial-pedaling-with-mcjautolimb2014
i should complete it this afternoon ( it's 3pm )
first we start with a bike moving along a smooth path
https://drive.google.com/file/d/0B74NpQ_FHc6cSHMxMEduZzJzMnc/view?usp=sharing
if you want to become an AutoLimb expert, you can follow the tutorial here
https://sites.google.com/site/mcasualsdazscripts5/tutorial-pedaling-with-mcjautolimb2014
but the short answer to your problem is probably .....
turn off the rotation limits on the thighs, or the whole figure
when you use mcjAutoLimb
https://drive.google.com/file/d/0B74NpQ_FHc6cSm9MbFNIaVZpWVk/view?usp=sharing
background equilateral image by Alexandre Duret-Lutz on Flickr
Thanks for your input. You had me thinking I didn't have the correct values somewhere. I re-posed the legs, from thighs to feet and reset the all transformation values that has zero. I discovered that the thigh's side by side value is zero whereas factory default value is 4.25 may have triggered the issues with distortion. Anything higher than 4.25 works fine, not less.
I tried turning off the limit rotation on thighs, it is a painful result.
So far it's the default value...hmm..
I'm using DAZ 4.7
After adding more frames and AutoLimb the feet and pedals, it throws feet off the pedal in few frames...had to re-adjust the thigh values. I don't understand why though...
Hi. Where did you get the smooth path for the bike? Is that a script? Do you know if Daz plan to incorporate motion path anytime soon? It would be extremely handy.
i used a bird-eye-view camera
and placed and oriented the bike around a circle at frames
0 360 720 1080 1440
daz interpolates the smooth curves and smooth bike rotations
then i think i used mcjSetInterpolation-Linear to make it 4 straight lines ( diamond shape ) i wanted a more constant speed that what Daz's interpolation gives
then i used mcjCycleFilter to reconvert it into a circle ( filtered the x and z displacements with a 1-harmonic filter )
then i used mcjDecimate to delete all keyframes except 1 every 30 frames
then manually i re-positioned the bike at the keyframed times
someday i plan to make a path tool
when i made car rides videos i wrote scripts to follow terrain vertices and scripts to use mcjCollider to "shoot" nodes on the road
but i used special terrains and the scripts were not prepared for public use
https://www.youtube.com/watch?v=LSyvbOAqhDs
below, you can see a path i generated on a 100x100meters terrain
using a Z-Scaled cube which i keyframed ( position and heading ) only about 24 times
the curves are the curves blender made
the very useful white line with dots was created by selecting that cube
and running the script mcjTracePath then the plugin mcjTracer
for ds3 https://sites.google.com/site/mcasualsdazscripts/mcjtracer-the-line-thing
for ds4 https://sites.google.com/site/mcasualsdazscripts2/mcjtracerds45
if you look at the little dots closely you can see the bike speed is not constant it's a series of speed-up/slow down
not ideal at all
now that's a script i could write quickly, a script to take the movements of something over a timerange and make it a constant speed
same path, but constant speed
also, did you know that using an animated node plus a companion (parented node) and mcjRibbons, you can create a ribbon-road
a bike following that same animated node would be perfectly centered on that road at all times
this terrain was generated from the displacement map shown in figure 3 and mcjElevate
https://sites.google.com/site/mcasualsdazscripts/mcjelevate
https://sites.google.com/site/mcasualsdazscripts/mcjelevate-reva
oh my! so many scripts to make animation...I was looking at Iclone but the cost of Iclone Pro and 3Dxchange (both are needed to bring in Daz figures) are $400 which is out of question. Maybe later down the road. Carrara can perform more animation than Daz which I do have. Haven't wrapped my head around it yet. Why not Daz incorporate these products in Daz? It is no wonder why Daz is free, they reel cusomters in and get them hooked with all the eye candy figures and models. Then we the customers want more...
as for simple animation path..unfortunately iClone and Carrara can do the job with the click of the mouse. urghhh!
I look forward to your script in making path though. I'll play around with some of your scripts. I'd like to stay within Daz if possible. thanks!
I just tried to import some of my Daz figures in Carrara...it's painful result. I ain't wasting my time on fixing it. Heard Carrara is phasing out anyways...