swing animation tutorial


First i checked "swing set physics" videos at youtube.com

this one has the advantage of showing us an almost lateral view

YouTube Video






I sat Amy and placed her hands grabbing the chains almost at the height of her shoulders

note this swing's hinge location is correctly positioned

if this was not the case you could use a script like "Move Origin"

http://www.4shared.com/dir/722776/10801f63/DS_Scripts.html#dir=Gl1KlH4s

to change the location of the "origin".



i parented Amy to the chains & seat prop named "swing2"

by drag & dropping the 'Amy' node onto the 'Swing2' node in the scene tab





these are the 6 keyframes i extracted from the youtube video

one loop lasts 2.4 seconds

if we use an animation rate of 30 fps, that's 12 frames between keyframes



At frame 0 i X-Rotated the swing about +26 degrees

At frame 36 ( mid swing ) i X-Rotated the swing  -26 degrees

At frame 72 ( loop point ) i X-Rotated the swing  +26 degrees


since Amy's current pose corresponds to the 4th pose from our reference video

i keyframed her pose at frame 36 by selecting her, then going in the parameters tab

and doing a "memorize figure pose" followed by a "restore figure pose"




next i posed Amy at frames 0, 12, 24, 36, 48, 60 and 72  according to the 6 poses from the youtube video

note that the pose at frame 0 must be copy-pasted to frame 72 ( it'a a loop )

We pose Amy's abdomen, chest, head, hip and legs but we don't touch the arms

Each time i complete a pose i do a "memorize figure pose" followed by a "restore figure pose" to keyframe every joint


Now we have our six poses and the movements look good

But only pose 4 ( frame 36 ) has Amy's hamd holding on to the swing's chains



i moved Daz Studio's  timeline to frame 36 

i selected Amy's 2 hands ( easier to do using the Scene tab )

i ran/executed the mcjMakeTargets script found here : https://sites.google.com/site/mcasualsdazscripts/mcjmaketarget

this created two Null nodes at the very precise position of Amy's hand joints

we'll camm them the hand targets

one is labeled "lHand_target" the other is labeled "rHand_target"



we want Amy's hands to remain at this position, relative to the chains

so we parented the hand targets to the swing/chains


Using mcjAutoLimb to make the hands stick to the targets



This was done in Daz Studio's Scene Tab : 

1 Selected the left hand target ( lHand_target )
2 Selected Amy's left hand ( held down the CTRL key to add to the selection )



I launched the mcjAutoLimb script ( found here : https://sites.google.com/site/mcasualsdazscripts/mcjautolimb )

mcjAutoLimb can be hard to figure out, but it can save hours of work and you get very steady animations

Here i started with the default settings  "limb spin angle" was set to zero degrees , and the "range to be processed" option  was set to "current frame only"

using that setting, after i clicked the "DoIt" button, Amy's arm was extended away from the target node

which is not what we want -- this means mcjAutoLimb was unable to find an arm position that meets the target

so i changed "limb spin angle " to 30 degrees, clicked the "doit" buttom ... another miss

by trial and error i found that a  "limb spin angle "  of 116 degrees brings the hand to the position of the hand-target and the arm is not twisted in an impossible position

i changed the  "range to be processed  option to "Animation Range Frames 0 to 72" and clicked the "Do it" button



Now if we review our 72 animation frames we can see that mcjAutoLimb did what it could 

but was not always able to keep the hand at the location of the hand target

this is most probably due to the fact that the shoulder joint's limits don't allow the needed pose

one way to fix this would be to help autoLimb  

in the image above we see frame 45, so at frame 48 ( one of our 6 keyframes )  we could pull back Amy's collar bone

make sure this did not change the collar pose at frames 36 and 60

care

this is the situation at frame 60

mcjAutoLimb was able to reach the target but the arm intersects the chain

one way to fix this is to use the collarbone to pull back the arm

another way would be to try other values for "limb spin angle "


we're still at frame 60 and fixed the problem by doing

- select hand target and hand
- start mcjAutoLimb
- "range to be processed" option  was set to "current frame only"
- find a value for "limb spin angle  not too far from the earlier guess of 116 degrees

in this case a value of 80 degrees

change "range to be processed" to "Animation Range Frames 0 to 72" and click the "Do it" button

then review the 72 animation frames looking for things to fix

----

this may seem tedious and difficult, but if you did this manually ( and it needs to be done ! ) 

it would take you a lot of time and achieving non-jittery arm movements would be difficult

--

other important tip about mcjAutoLimb

if you turn off the limits for the Shoulder and ForeArm joints, mcjAutoLimb stands better chances of finding arm positions that meet the taget

the drawback is that the arm may become visibly over-twisted




Using mcjHoldon


Now that the positions pf the hands joints are stabilized relative to the chains

we need to stabilize the rotation of the grip/fingers relative to the chain

and that's the purpose of mcjHoldon



Here we are at frame 60

i chose this one because that's the point of the movement where that hand's "side-side" joint it at its maximum

i repositioned the hand so that hamy has a good grip

the following is done in the Scene tab

Select Amy's left hand

without de-selecting it ( press and hold the Ctrl key ), 

Select the swing/chain

launch mcjHoldon


in the above you can see that the hand position at frame 60 ( the current frame ) will be used as the reference

step = 1 means the hand will be keyframes for the 72 frames

you can also see that, after i pressed the "Do it" button, mcjHoldOn warns me that mcjHoldOn 
takes for granted that the hand is what will be the holder and the swing is what will be held on to

if this was wrong .... danger danger ... i would click "cancel", close mcjHoldOn and re-select the 2 nodes in the correct order

and ... we;re done ! :)

YouTube Video




Comments