Tutorial : pedaling with mcjAutoLimb2014


This tutorial will show an example of use for mcjAutoLimb 2014

we will also explain what it is that mcjAutoLimb is trying to do and what it cant do

The situation

We start at frame 0

Victoria 6  has not been animated yet

we create a red ball and place it near Victoria's right foot

we select the red ball, then we press the CTRL key and we add Victoria's left foot to the selection

we look in Daz Studio'd scene panel and make sure the red ball and the foot were indeed selected

Start mcjAutoLimb2014

We can see that AutoLimb did understand that our intention is to move the foot (ankle ) to the red ball's location

and AutoLimb created something called a pole for the left shin

The notion of "poles" must be understood, most of all if your figure moves around

Exit mcjAutoLimb

look in the scene for the null node named Victoria 6_pole_lShin

imagine that the left leg's knee is the apex of an arrow head, that arrow points straight ahead

the pole node is the way for AutoLimb to remember how the leg was initially posed

notice in the Scene Tab that our left knee pole is parented to the Pelvis 

for a generation 3 figure it would be parented to the lButtock joint

so if Victoria were to turn around, the Pole node would still be somewhere in front of her left leg

If Victoria was riding a bike or a car, you could re-parent the pole node to the bike or car and still get good results

Ok back to animation.

we select the red ball, press the CTRL key and add the left foot to the selection

This time AutoLimb did not create a pole node, it noticed the presence of the old pole node and will re-use it

In AutoLimb's "Range to be processed" we select the "Current frame Only " option ( anyway the target ball doesn't move )

and we click the "do it" button

It worked !

the foot node ( ankle ) moved to the red ball location

there were an infinity of ways for AutoLimb to get to that goal

but the Pole node was dictating that the knee-arrow had to point forth, so that's the unique pose we get

if we exit mcjAutoLimb, move the Pole node a 3 feet to the left

return in mcjAutoLimb, and click the do-it button,

 the foot stays put but the leg turned a little to have the knee pointing at the new pole position

note : when we move a node we are creating animation keyframes

so if i move the pole here at frame o and move the pole there at frame 30, and use mcjAutoLimb 

and get the foot to track the red ball, then the leg will twist according to the pole animation !

How all of this happened and why sometimes it doesn't

When you click the 'do it' button, Autolimb does the following

1 - measure the distance D between the thigh joint to the red ball

2 - make about 10 attempts to bend/unbend the knee until the leg length is D

if the target/red ball is too far this will fail

if the limits on the knee rotation are too small this will fail

so it's important to keep the target node within leg reach for the duration of the animation

and make sure the shin's Bend limits are at factory defaults ... around -11 degrees to 150 degrees

in fact the -11 degrees Bend limit may cause problems

why: when the leg needs to be extremely stretched out to reach the target
bending the knee -11 degrees or bending the knee 11 degrees may satisfy the leg-length requirement
AutoLimb may chose the -11 degrees angle, which looks ugly instead of 11 degrees which looks good

Sometimes i set the lower Bend limit to 3 degrees, so AutoLimb wont try -11 degrees ever

3 - once the leg is the proper length, Autolimb "points" the leg at the target using the Thigh joint

if the limits on the thigh bone rotations don't allow this pose this will fail 

so it's important to keep the target node within the realm of the thigh bone's limits

or what i sometimes do : set the limits Off on the thigh rotations

or if the figure has a buttock joint, i pose that joint to 'help' AutoLimb reach its goal

4 - Autolimb twists the leg so that the knee "points" at the current Pole node location

this is done mainly using the "Twist" rotator of the thigh, but the Bend and Side-Side rotators contribute too

if the limits on the thigh bone rotations don't allow this pose this will fail 

if someone placed the pole node at an odd location, the pose will look odd

One last note: autoLimb doesn't solve foot orientation issues

( in a recent interview autoLimb admitted that this "may seem lazy but that's it and that's that" )

AutoLimb doesn't even look at the foot orientation, only with its position

so if the foot was bent 45 degrees or even is animated, none of that will change.

We will take care of foot orientation issues using either the mcjKeepOrient script or the mcjHoldOn script

Except that ... actually, we didn't touch this subject but autoLimb can also solve toe-to-target issues.

If the selected "targeter" is toes instead of a foot, autoLimb will bring the toes to the target/red ball position.

In that case, a pre-existing foot pose or foot-pose-animation will have consequences.

The advice is, just make sure the foot is moving the way you want before using autoLimb, this may include clearing all the foot animation.

Escaping school by bike

Amy's beautiful bike which may or may not someday be on my site for free

First i animate the bike moving along a path

i did this using standard keyframing from a bird eye view position plus mcjSetInterpolation plus mcjCycleFilter


next i use the ( actually not existing as i type this ) script mcjPedal which rotates the pedals according to the bike speed

at frame 0 ( always better to work at frame 0 )

i parent Victoria to the master bike node

i position her feet over the pedal

i lower her so that one of her fully extended legs touches the lowest pedal

to avoid problems, i bend her knees a little so autoLimb wont have trouble reaching its objectives


if there exists an old pole node for the right leg presently, i delete it
if there exists a target node for the right leg in the scene i delete it
this way autoLimb wont use old leftovers from previous movies

i select the Right Foot ( which goes through the pedal presently)

i start autoLimb

i dint mention it yet, ( but i certainly did in the manual ) but since no target node was selected, no red ball 

autoLimb automatically created a null node named () and positionned it at the very precise position of the Right Foot node

and it created a pole node for the right knee, as expected

i exit AutoLimb and i move the target up

about 2 inches above the right pedal

i select the target note, then the right foot, 

set "current frame as the range to process, click the Doit button

done, tweak and repeat until satisfaction

note that you can use mcjParent to move the target node back to the exact position of the foot node

as we can see autoLimb didn't make any work on the foot and pedal position

lets decide now that Victoria always makes incredible efforts to always keep her feet horizontal

we're not ready yet

her knees hit the handle bars and the foot is past the foot's bend limits

but we have a precious foot marker

we create one for the left foot by selecting the left foot, launching autoLimb, exiting autoLimb

we reposition Victoria's hip and upper body ...

it's a lot of tweaking but with the help of mcjAutoLimb, mcjHands we get to this

the script to make the wheels turn as the bike moves will eventually be posted here


next i get the pedals turning

note that if the bike moves at a pretty constant speed, you could simply keyframe a wheel rotation of 0 degrees at frame 0
and a wheel rotation of 13783 at frame 900 then use mcjSetInterpolation to set a "Linear interpolation" which gives you 
38 wheel turns for a 30 seconds animation at a constant rotation speed

the rear gear has a diameter of 8.9 cm
the front gear has a diameter of 18.8 cm
so the pedals must turn at around half the rate of the wheels
this too will be included in the script


in this case the pedals turn 6625  degrees over a 900 frames range
with 2 keyframes and mcjSetInterpolation you could get credible results

Now we parent each foot target to its respective pedal

make sure the target nodes are not animated

now the pedals need to remain horizontal as they turn

how do we do that ?

remember that the bike doesn't roll in a straight line, if this was the case we could use mcjKeepOrient over the 900-frames range

instead we will use mcjHoldOn

mcjHoldOn maintains the orientation of something ( a hand for example ) constant, relative to another object ( someone else's a shoulder for example )

this works even if one or 2 figures involved move

so in our case we mill make the pedal orientation remain steady, relative to the bike !

ncb9 is the pedal, ncb3 is the bike frame, so the pedal will hold on to the bike

i repeat this for the other pedal

Then It's time to use mcjAutoLimb !

select the target node for the Right Foot, ( now which remains floating above the right pedal at all times )
select the Right Foot
autoLimb will create a pole node somewhere in front of the right knee
this pole node is parented to the Right Leg so it will follow us along the bike ride
and we process the 900 frames in one "do it" click

And here we are the problem which is the source of this tutorial 

at frame 450 the left foot has moved away!

problem solved !

the solution is .... turn Off the limits on the thigh rotations !!!

we're so close now


so now the feet faithfully follow the foot targets

but the feet dont stay seated on the pedals

how do we solve that?

yes ! we use mcjHoldOn

select the right-pedal, select the right foot, run mcjHoldOn on the whole animation range

repeat for the other foot


And there you have it :)

background equilateral image by Alexandre Duret-Lutz on Flickr