Body Rig.¶
Body Metachain.¶
Body Metachain is a custom node that describes future body chain. Here is a simplified diagram of how a body rig works after it is built.
Parent chain drives IK/FK component of child chain. IK/FK drives secondary controls, then secondary controls drive npaCurveSolver custom nodes or joints directly. Then, if chain has curveSolve node, curveSolve node drives grandchild chain. If it doesnt have curveSolve, secondary control drives grandchild chain.
In npaBodyMetachain node we specify parents, children, how many joints it has, fk, ik, etc. So rig builder will later know how to process it.
Attributes:
- mtBuildStage
Shows on what build stage the chain is at the moment. -1 - Nothing done yet, 0 - Proxyes are placed, 1- Basic Rig, 2 - Rig features are added, 3 - Dynamics added.
- mtSpline
Shows the rig builder if this chain should have spline features or not. More about mtSpline.
Note
At the moment, if you need twist functionality on chain, ou should check that.
- mtIK / mtFK
Shows the rig builder if this chain should have IK / FK features or not. You can uncheck both, if you want. About mtIK / mtFK.
- mtRestParameters
If this chain has spline components, this attribute will store spline parameters of its joints.
- mtAutoClavl
Will add autoclavicle solver. More about mtAutoClavl.
- mtSoftIK
Soft IK, antipop. More about mtSoftIK.
- mtFoot
Will add foot setup(reverse ik, footroll) to the leg. More about mtFoot.
- mtKneeLock
Will add knee lock. Knee/elbow/middle ik joint will stich to pole vector controller. More about mtKneeLock.
- mtReverseFK_
Adds reverse ik to the chain. Has to have FK checked. More about mtReverseFK.
- mtNumOfJoints
Number of joints chain has. If chain doesnt have spline this number should be equal to number of proxy parameters(mtProxyParameters)
- mtParentChain
Specifies parent chain. Connects to mtChildrenChains of parent chain.
- mtHelper
Connect triggered blendshape/helper here. More about mtHelper.
- mtMain(Position/Rotation/Scale)
Transform of chain proxyes root. In world space.
- mtPoses
Poses of this chain that can be triggered(for grab pose of palm etc) More about mtPoses
- mtProxyParameters
Parameters of proxy transforms. These show where secondary controls of chain will be.
- mtChildrenChains
specify children chains. It connects here, because then rig will calculate where exactly to connect it. If chain has spline it will create a locator on spline and place it near this controller.
- mtActive
shows the rig builder if we use this proxy or not.
- mt(Position/rotation/Scale)
transform of this proxy. In object space of mtMain(*)
- mtBendHere
If chain has FK/IK, chain will bend here, on this secondary controller.
Editing meta network.¶
Every metanode should be connected to others via “mtParentChain” “mtChildrenChains” attributes all the way to the root “nopiaRig_mtnt”.
Before you build anything, you can validate your metanetwork by pressing “Validate Scene for body rig” and “Graph Validation”. Script will check how your nodes are connected and tell you if something is wrong. Usually.
Building a bodyRig.¶
When your network is ready, you can start building it. First, on stage 1-2.
These settings are mostly for debugging. Unchecking these checkboxes allows user to isolate some build steps and see where build starts to go wrong. Or user can entirely disable some rig functionality if its not needed.
- First textfield
Specifies which chains to rig. You can write them manually or by pressing “Pick BODY nts”
- Second textfield
Maximum depth of rigging.
- FreezeCtrl
Freezes transforms on proxy controls and creates offsets. More about FreezeCtrl.
- MotnControls
Replaces proxy controls with new motion controls, that will control curve solver or joints directly. More about MotnControls.
- ScaleRamp
Enables scaling on curve solver. More about ScaleRamp
- InSlvSett
Instanciates chain settings under all crve solve controllers. More about InSlvSett.
- AddFKComp
Adds FK component.
- AddIKComp
Adds IK component.
- InstSwitch
Instanciates chain settings under IK/FK controls. More about InstSwitch.
- ConnctOld
Connects old proxyes with new for live updating proxy position in meta network
- SymmCntrl
For symmetrical behaviour. Useful when placing proxies. Moved to stage 4
- Spread Joints Evenly
For joints attached to curve solve. Select a joint or a meta network and press to spread all joints evenly along curve.
If you are making entirely new rig, then its better to build chains level by level and place them accordingly. You can build chains first without adding FK component(stage 2), placing proxyes, and then building stage 2. Then you can proceed to the next chain. In order to add a child chain to current one you current chain has to be on stage 2.
Save your file, save a new version of it and try to rebuild it entirely how it is shown in next video.
If your rig was built without errors, then you can proceed to stage 3.
Stage 3 menus.
- SinEnable
Enables all sine waves on curve solve enabled chains.
- VolMaintain
Volume preservation.
- PrmtrSwch
Parametrization switch.
- SymmCntrl
Symmetrical behaviour.
- AutoClavl
Automatic clavicle solver.
- SoftIKhdl
Soft Ik handle.
- KneeLock
Knee lock. Locks Knee/elbow position in ik pole controller.
- SkinProxy
Will skin your proxy meshes automatically.
- BendyPtch
Bendy patch fixes the issue when first spline controller twists with fk/ik chain. This doesnt look very good on onganic characters.
- TwistPatch
Curve solve handles twist itself, but only on joints and only between its controls, so this patch enables twist between “Non-Bend” spline controllers.
- FoootRolla
Adds footroll, where its possible.
- TipOrient
Mostly made for feet, so feet can aim to ik controls.
- OffsetEff
Adds an offset controller on top of IK effector controller.
- ReverseFK
Reverse FK behaviour. Good on spines.
- SetCntrls
Sets positions of stored controls CV’s.
- VisualizeFootrolls
Creates a set of temporary joints, which you can use for placing footroll pivots before building a footroll.
Adding a chain. (A)¶
Duplicate other chain’s network. Add it to “metaData_ss” selection set
Rename it.
Connect plug “MtChildrenChains” of the parent chain to a new chain.
Edit network parameters in the attribute editor.
Build the rig.
Put your new chain in place as you did with proxies.
Wipe your scene and rebuild the rig.
Adding a chain. (B)¶
Duplicate other chain’s network. Add it to “metaData_ss” selection set
Rename it.
Connect plug “MtChildrenChains” of the parent chain to a new chain.
Edit network parameters in the attribute editor.
Build the rig(Stage 0).
Put your new chain in place as you did with proxies.
Build the rig(Stage 1).
If something is off, undo stage 1 and place proxies again.
Adding extra controls.¶
If you are adding a controller to the chain without a spline, change the number of joints accordingly.
Add a new item to MtProxyParameters. Check it as active, set the scale to (1, 1, 1)
Wipe the scene if a rig was already created for this chain.
Put the chain in place.
Skinning.¶
After you’ve built all body rig stages, you should have your proxy mesh attached to skeleton. Refer to this part of documentation for more details on skinning proxy meshes.
All Features build order and dependencies.¶
- Stage 1
Spline / Joint chain Set Proxy Positions
- Stage 2
Freeze Controls Create Motion Controls. Create Scale Ramps. Instanciate Chain Settings. Add FK Component. Add IK Component. no FK or IK - Directly connect chain to parent. Instanciate switch. Connect Old Locators.
- ** Stage 3**
- if Spline
Length Update. Sine enable. Volume preservation. Parametrization switch ( If SymmCtrl is off )
Auto Clavicle if IK
Soft ik ( With or without knee lock and stretchy ) Bendy Patch. Twist Patch.
- If Parent IK
Foot roll
- if FK
Reversible FK
- ** Stage 4**
Dynamics.
In Detail.¶
Freezing proxyes.¶
Initially proxy transforms drive spline and you need to place them first. After moving em transforms are not freezed. This part of build freezed transform of those offsets and adds offsets to them. Also creates duplicates duplicates of those transforms to connect them back to metanode.
Motion controls.¶
These are controls that drive spline solver or joints directly.
Scale Ramps.¶
By default, scaling Motion controls wont affect anything. This part of build enables scaling.
Instantiation of chain settings.¶
Chain settings are attributes on shape node. This shape node then is instantiated under every controller of that chain.
FK Component.¶
FK attributes:
- RFollow(Something)
Changes rotation space of this controller to selected one.
- TFollow(Something)
Changes Position space of this controller to selected one.
- RotateOrdr
Rotation order of selected controller.
IK Component.¶
IK attributes:
- Follow(Something)
Changes parent space of this controller to selected one.
- AutoClavicle
Enables autoClavicle feature.
- Stretch
Enables stretchy feature.
- Max Stretch
Determines how much ik chain can stretch.
- Soft IK
Enables softIK feature.
Spline Component.¶
Spline component is driven by npaCurveSolve custom node.
Node Attributes:
- In Parameters
- Active
Toggles corresponding CV on and off.
- Active Twist
Toggles twist interpolation on corresponding CV on and off. ( Doesnt work yet. Placeholder. )
- In Matrix
Matrix of controller that will drive spline.
- Back Active
Toggles back tangent CV
- BackTgWgt
Weight of back tangent. Weight on 0.0 means that tangent will be oriented to InMatrix, 1.0 - to previous controller.
- BackTgLength
Length of back tangent. Distance between main and tangent CVs.
- Front Active
Toggles front tangent CV
- FrontTgWgt
Weight of front tangent. Weight on 0.0 means that tangent will be oriented to InMatrix, 1.0 - to the next controller.
- FrontTgLength
Length of front tangent. Distance between main and tangent CVs.
- Scale Curve Ramp
This ramp describes how volume preservation will scale chain’s joints.
- Parameter curve ramp
This ramp describes how the parameter is distributed along the curve.
- Sine Curve Ramp
This ramp describes how position sine wave affects the chain.
- Sine Mag
Position sine wave’s magnitude(strength)
- Sine Off
Position sine wave’s offset(time)
- Sine Freq
Position sine wave’s frequency
- RSine Curve Ramp
This ramp describes how twist sine wave affects the chain.
- RSine Mag
Position sine wave’s magnitude(strength)
- RSine Off
Position sine wave’s offset(time)
- RSine Freq
Position sine wave’s frequency
- Rest Length
This length node will consider as normal, when it is calculating volume preservation.
- Shrink
On 0 chain wont shrink if spline length is less than Rest Length. The difference in length will be a straight line coming out of the last controller.
- Stretch
On 0 chain joints wont stretch along a curve and stay in place as if spline has normal length.
- Uniform curve
Curve parametrization switch. 1 - 0.0-1.0 along the curve. 0 - 0.0-1.0 Between Each CV.
This node is driven by controllers.
Controller’s attributes used to drive npaCurveSolve node:
- TGL
Toggles this CV on and off. Connected to Active
- TGL Twist
Toggles twist on this controller on and off. Connected to ActiveTwist
- Back TG Len
Length of back tangent. Connected to BackTgLength
- Back TG Aim
Aim Of back tangent. Connected to BackTGWeight
- Back TG Tgl
Toggles back tangent. Connected to BackActive
- Rest Len CRV
Rest length of main chain spline. Connected to RestLength.
- Uniform Crv
Switches between unoform and normal parametrization of spline. Connected to UniformCurve
- Start P CRV
Connected to (0,0) of ParameterRamp
- Mid P CRV
Connected to (0.5,0.5) of ParameterRamp
- End P CRV
Connected to (1,1) of ParameterRamp
- Stretch CRV
Connected to Stretch
- Shrink CRV
Connected to Shrink
- FK
Toggles FK Component of this chain on and off. Transforms to IK_FK parameter after finalization if chain has IK comonent.
- Mag Pos Sin
Position sine wave magnitude. Connected to SineMag
- Off Pos Sin
Offset sine wave magnitude. Connected to SineOff
- Frq Pos Sin
Frequency sine wave magnitude. Connected to SineFrq
- Mag Rot Sin
Position sine wave magnitude. Connected to RSineMag
- Off Rot Sin
Offset sine wave magnitude. Connected to RSineOff
- Frq Rot Sin
Frequency sine wave magnitude. Connected to RSineFrq
Direct joint component.¶
This component drives joints directly with a constraint.
Connect old proxyes.¶
Todo.
Body chain poses.¶
Not fully implemented yet.
Correctives.¶
Todo.
Stretchy IK.¶
Symmetrical behaviour.¶
To make the process of placing proxies easier, rig builder will connect transforms of left controllers to right side controllers.
If your chains have symmetrical names (e.g. l_leg_mtnt, r_leg_mtnt) rig will automatically place right chain symmetrically to left on building stage 2. So no need to place right side proxyes manually.
Sine wave.¶
Volume preservaion.¶
Parametrization switch.¶
Automatic clavicle solver.¶
Proxy Skin.¶
If this option is checked rig will automatically find proxy meshes and skin em to skeleton. Also it tries to find exported skins and import them back.
To set this up you need:
Setup proxies and main meshes rig should copy skin to.
Names of proxy meshes should look like this: “pm_{proxy_index}_{name}”
Names of proxy meshes should look like this: “m_{proxy_index}_{index}_{name}”
Proxy meshes will affect meshes with same {proxy_index}. {name}’s dont have to match
You can rename meshes manually, or use automatic script by pressing “Set As proxy skin”. First select proxy mesh, then select meshes it will affect and press that button. Script will create a group “proxy_geom” and put your proxy skin renamed there.
To skin proxyMeshes to skeleton check “SkinProxy” under stage2 of bodyRig tab. If builder can find exported skins under {Project}/Skins/”[%s]l%s_s%s_skinWeights.xml” % (mesh, skin_level, skin_stage) / [pm_0_body]lp_s0_skinWeights (*example name) To export proxy skins press “Export Proxy Skin” button under bodyRig tab.
Note
This will export skins of all meshes under “proxy_geom” group
How to smooth proxy skin. System has automated script that will apply deltamush to your proxy skin and then bake it back to original skin. Here is how to use it:
Bendy Patch.¶
Bendy patch fixes the fact that first bendy(spline) Control of chain moves with the first FK/IK controller. ON shoulder, for example, this should not happen.
Twist Patch.¶
Temporary solution. Currently, twist interpolates only between neighbour controllers and TwstToggle attribute dosnt do anything. If, for example, you have 1 controller between elbow and shoulder twist wont spread all the way to elbow(or other way around). This patch fixes that.
Soft Ik.¶
Foot Roll.¶
In order to work, footroll needs footroll network. You create it by executing: bBuilder.create_footroll_network()
Or you can create it yourself. Its a simple network node with custom attributes.
- Affected By
Connect it to bodyChain as it is shown on picture above.
- Back
Position of back locator. In object space of tip IK controller.
- BackCnd
Back condition. Used to calibrate footroll behaviour.
- BackCnv
Back convertion. Multiplyes rotation by this number. Used to calibrate footroll behaviour.
- Center
Position of back locator. In object space of tip IK controller.
- CenterCnd
Center condition. Used to calibrate footroll behaviour.
- CenterCnv
Center convertion. Multiplyes rotation by this number. Used to calibrate footroll behaviour.
- Etc
Other are similar.
Here are locator labels:
When your footroll network is connected you can check footroll in stage 3 build settings and create it.
Note
when you first create footroll pivot locators will be off the places they need to be. You’ll need to place them.
Knee lock.¶
Offset Controller.¶
Creates an extra controller under existing IK effector.
Reversible FK.¶
If this feature is enabled in build settings and in chain settings, FK chain will be able to reverse its hierarchy.
Controller shapes.¶
Gets shapes of all your controllers from $PROJECT/rig_controls_data.json Doesn’t do anything if this file does not exist.
Shapes have to be Saved first by pressing “Store Controls CV’s” Button. Shape is saved in object space of a controller.
Visualize Footrolls.¶
Tip Auto-Orientation.¶
Adds aim constraint to footroll joints setup. Aims them to the next chain.
Note
Works only with footroll now. It doen’t have to be enabled or set up. Just needs to exist.
next_chain.get_controllers(“fk”)[-1]