Friday 18 March 2011

Post 09 - 3ds Max: legs and feet

The next area I created using 3ds Max bones are the legs and feet. These were done using two separate bone hierarchies (one for the leg and one for the foot) and then lining them up together. The leg was given a HIIK Solver (History Independent Inverse Kinematic), which allows for it to be controlled in a reactive way. The foot was given a controller, and then a series of custom controllers were created using MaxScript. It is possible to create menus using the menu creator, but this allows for the menus to be edited at a later date.

One series of 'spinners' and 'sliders' were created for the foot, which was then animated and keyed in a series of pivot extremes. This data was then connected by assigning a 'float reactor' controller. This allowed to connect the motions to the corresponding control. These were then wired using wired parameters and resulted in a foot which can be controlled in the command panel.



Here is the Max Script for the controls ($ = currently selected item):

ca=custattributes.getDef $.modifiers [1].footControls
attributes footControls
redefine:ca
(
    parameters params rollout:footR
    (
    footRoll type:#float ui:footRollSp
    toes type:#float ui:toesSp
    knee type:#float ui:kneeSp
    )
    rollout footR "Foot Controls"
    (
        local range=[-90,90,0]
        group "Foot Controls"
        (
                spinner footRollSp "Foot Roll" range:range
                spinner toesSp "Toe Wiggle" range:range
        )
        group "Leg"
        (   
                spinner kneeSp "Knee" range:range
        )
        group "Keying"
        (
                button resetAll "Reset All"
        )   
        on ResetAll pressed do
        (
                footRoll=0
                toes=0
                knee=0
        )
    )
)
--custAttributes.add $.modifiers[1] ca

The knee on the IK leg currently was determined by the starting point of the end joint. This was changed by telling the IK goal to be the nub of the ankle. This means that the knee now points in the same direction as the foot. However, this was also given an override spinner in the same control panel as that of the foot. Using a 'Float Expression', the leg was also given the ability to stretch (in the event of the animator needing extra flexibility in a scene). This also means that when it is skinned, the mesh would not break.

An important consideration that Paul makes in his DVD is that when making a set of bones with the intention of applying an IK Solver on it, that the rotational position of the two bones are unaltered and straight. If this is not the case, then the IK Solver would want to bend in two different directions (triangle effect). This will be also applied to the arms later on.



: NOTE - CLICKING ON IMAGES WILL GIVE A FULL SIZE OF THE IMAGE FOR CLOSER VIEWING




IK Legs and feet clip - LINK

No comments:

Post a Comment