.. toctree:: ******************** Segment ******************** Last Updated: 04.17.2019 .. figure:: _static/img/blocks/segment_profiles.png :width: 500 :align: center :figclass: align-center SEGMENT | rigBlock targeted for flowing segments of joints -------- Profiles ----------- Block profiles may have their settings changed at will. These are simply presets. **General notes:** * Profiles are initially loaded at creation but they should be able to be safely loaded at ``define`` state * Distances are stored in ``cm`` (maya's base unit) * Some settings are overridden by the buildProfile settings. For example some game buildProfiles will have endJoints off. -------- Simple ^^^^^^^ .. figure:: _static/img/blocks/segment_simple_01.png :width: 200 :align: center :figclass: align-right Simple segment * ``attachPoint`` | end * ``baseVector`` | 0,1,0 * ``baseSize`` | 30,15,76 * ``ikBase`` | cube * ``ikEnd`` | cube * ``ikSetup`` | ribbon * ``mainRotAxis`` | up * ``numControls`` | 4 * ``numShapers`` | 6 * ``numSubShapers`` | 3 * ``nameList`` | "start","end" * ``segmentMidControl`` | True * ``settingsPlace`` | start -------- Spine Up/Fwd ^^^^^^^^^^^^^^ Our standard spine * attachPoint | base * base Vector | [up | 0,1,0 | fwd | 0,0,1] * base Size | 30,15,76 * ikBase | hips * ikEnd | tipMid * ikSetup | ribbon * mainRotAxis | up * nameIter| "spine" * nameList | "pelvis","chest" * numControls | 4 * numShapers | 2 * numSubShapers | 3 * segmentMidControl | True * settingsPlace | cog -------- Tail ^^^^^^^^^^^^^^ .. figure:: _static/img/blocks/segment_tail_01.png :width: 200 :align: center :figclass: align-right attachPoint | base base Vector | 0,0,-1 base Size | 14,9,76 ikBase | simple ikEnd | tipBase ikSetup | ribbon nameIter| 'tail' nameList | 'tailBase','tailTip' numControls | 6 numShapers | 5 segmentMidControl | True settingsPlace | end -------- Tentacle ^^^^^^^^^^^^^^ * ``attachPoint`` | base * ``baseVector`` | 0,0,1 * ``baseSize`` | 14,9,76 * ``ikBase`` | simple * ``ikEnd`` | tipBase * ``ikSetup`` | spline * ``loftList`` | 'wideDown','squircleDiamond','squircleDiamond','circle' * ``mainRotAxis`` | up * ``nameIter`` | 'tentacle' * ``nameList`` | 'base','tip' * ``numControls`` | 6 * ``numShapers`` | 4 * ``segmentMidControl`` | True * ``settingsPlace`` | end .. figure:: _static/img/blocks/segMid_issue_fix_01.gif :width: 400 :align: center :figclass: align-center -------- EarUp ^^^^^^^^^^^^^^ ``In Testing`` * attachPoint | end * base Vector | 0,0,-1 * base Size | 10,10,20 * ikBase | simple * ikEnd | tipBase * ikSetup | ribbon * nameIter| 'ear' * nameList | 'earBase','earTip' * numControls | 4 * numShapers | 2 * numSubShapers | 3 * segmentMidControl | True * settingsPlace | end -------- Shared ^^^^^^^^ * `addCog `_ * `attachPoint `_ * `baseAim `_ * `baseSize `_ * `ikBase `_ * `ikEnd `_ * `ikOrientToWOrld `_ * `ikSetup `_ * `loftDegree `_ * `loftShape `_ * `loftSides `_ * `loftSplit `_ * `loftSetup `_ * `numControls `_ * `numJoints `_ * `numShapers `_ * `numSpacePivots `_ * `numSubShapers `_ * `proxyDirect `_ * `proxyShape `_ * `ribbonAim `_ * `ribbonConnectBy `_ * `ribbonParam `_ * `scaleSetup `_ * `settingsDirection `_ * `settingsPlace `_ * `spaceSwitch_direct `_ * `squash `_ * `squashExtraControl `_ * `squashFactorMax `_ * `squashFactorMin `_ * `squashMeasure `_ * `visMeasure `_ -------- Define ------------- .. figure:: _static/img/blocks/segment_define.png :width: 300 :align: center :figclass: align-center -------- Shapes ^^^^^^^^^ The locator form shape [1]. Select it to get the dag. **Up Define Handle [2]** | Defines up for our aim to the end. **End Define Handle [3]** | Defines the end point of our block. You can scale this and the bounding box scale visualization which change shape. **Attributes** * length * width * height -------- Form ------------- Attributes ^^^^^^^^^^^ These attributes change what our template looks like. * `numShapers `_ * `numSubShapers `_ * `loftSetup `_ * `loftList `_ | If you have this option. Currently requires rebuild of template to change out * `loftDegree `_ * `loftShape `_ | Currently requires rebuild of template to change out * `loftSides `_ * `loftSplit `_ -------- Shapes ^^^^^^^^^^^ When we template rigBlocks. Sometimes they have very different looks.How you decide you want your shaping control dictates what you do. For example if you have a straight segment like a spine you'd probably just want something like this to have two major scale points and no need for mid articulation. .. figure:: _static/img/blocks/segment_template_2handle.png :width: 300 :align: center :figclass: align-center 2 Shapers, 7 sub shapers = 9 loft handles If you're doing a tail or something with breaks you probably want to have more handles and fewer sub shapers. The second setup ends with the same number of loft shapers but has a place to hinge things. .. figure:: _static/img/blocks/segment_template_3handle.png :width: 300 :align: center :figclass: align-center 3 Shapers, 3 subshapers = 9 loft handles -------- Form Handles """""""""""""""""" The dark rounded corner handles[1] (color will vary by side). They are used for big movements and scaling. Sub shaper handles are controlled by these. -------- Loft Handles """""""""""""" These are the actual curve handles [2] that our template loft runs through You can change the cvs on these however that data isn't currently stored in our blockDat so rebuilding will wipe it -------- Orient Helper """""""""""""" This arrow shape [3] controls the 'up' of our segment root for rigBlock aiming and joint aiming. -------- Form Loft Mesh """""""""""""""""""" This surface is imporant. It is used for proxy mesh creation and control curve casting. You can affect its shape via the loft handles and the settings to some degree. -------- Prerig ------------- Attributes ^^^^^^^^^^^ * numShapers * numSubshapers segmentMidIKControl ^^^^^^^^^^^^^^^^^^^^^ ``bool``. Whether to setup an extra midIK control on the segment -------- Shapes ^^^^^^^^^^^ .. figure:: _static/img/blocks/segment_prerig.png :width: 300 :align: center :figclass: align-center -------- Prerig Handles """"""""""""""" Axis shapes [1]. * These represent our points of articulation * One per numControl count will be created * The each have a joint handle with them * The last one is colored by axis colors to differentiate as it is important. The IK handle during rigging will take the orientation of this handle. Pay attention to how it is rotated. -------- Joint Handles """""""""""""" These sphere shapes [2] are our handles to control our joint loft. * The joint loft represents what our joint chain will be at the skeleton state -------- Joint Loft """""""""""" The lofted surface running within our proxy loft is our joint loft. It represents what our joint chain will be. * It is controlled by the joint handles .. note:: We've toyed with the idea of per joint handles to exactly place roll joints but that would mean you'd have to rebuild the prerig every time you wanted to change the roll count. For now you can move them manually at skeleton state. -------- Cog Helper """""""""""" See `Shape Helpers | Cog Helper `_ This shape [3] is our Cog Helper. -------- Rig ------------- There's a lot of things happening when we rig. * **rigBlock** | Our rigBlock has its ``.template`` attribute turned on so that it's easier to not inadvertently select it post rigging * **Dag structure** | created and setup for all our rig setup for both this block as well as others * **Shapes** | Different nurbs control shapes are generated * **Rig wiring** | The rig is wired so that we can get all the information we need once the rigBlock is removed from the scene. Remember it is a frame to build the rig and designed to be removed once we have our asset completed * **Dynparent setup** | Based on our settings, the master will have our dynParent setup added as well as spacePivots for that system -------- Controls ^^^^^^^^^^^^ The kinds of controls you see will depend on your rig options for the rigBlock. In our case we start with something like this. .. figure:: _static/img/blocks/spine_rig_handles.png :width: 400 :align: center :figclass: align-center -------- Cog/Settings """""""""""""" The cog ``[1]`` we looked at previously. During the rig process our cog dag helper has a transform created at it, then the cog shape helper is shape parented to that new transform to make the control. Because of our options, our cog is our settings control. This is an option. If you had had it off, you might see a gear instead. .. note:: Many of these attributes would not be on this control should we have a separate settings control **Attributes** * **FKIK** | ``float`` | Blend between fk/ik mode. It controls that blend as well as the visibility of those controls. * visSub | ``bool`` | Whether or not the subcontrols of this rig section are visible. In our case, we only have one. If we had used more joints than controls, we'd have more of these. * **visDirect** | ``bool`` | Whether or not the per joint controls of this rig section are visible. By default they are cube curves. When the build option of proxyDirect is checked. The proxy mesh replaces those curves. * **axisAim/Up** | ``enum`` | Settings for our aiming system. If you use raycast aiming or other systems these settings will be used per control. If no settings are found, the global defaults will be used. * **pivot_0/1** | ``enum`` | Same as discussed for master. * **blendParam** | ``float`` | Determines how the joints follow the ribbon surface. Floating evenly or fixed to their attach point * **space** | ``enum`` | Setup by `the dynParent System `_. Space would denote a parent setup. -------- Base/Mid/End IK """""""""""""""" We are seeing the ik controls because we are in ik mode * Base IK | Hip shape ``[2]`` at the base of our spine * End IK | chest shape ``[3]`` * Mid IK | ``[4]`` **Attributes** * **axisAim/Up** | ``enum`` | Settings for our aiming system. If you use raycast aiming or other systems these settings will be used per control. If no settings are found, the global defaults will be used. * **pivot_0/1** | ``enum`` | Same as discussed for master. * **blendParam** | ``float`` | Determines how the joints follow the ribbon surface. Floating evenly or fixed to their attach point * **space** | ``enum`` | Setup by the dynParent System. Space would denote a parent setup. -------- Segment Handles """""""""""""""" We only see one ``[5]`` but as we mentioned. The number you see will be determined by our build options. When our control count matches our joint count we don't need an extra ribbon as we can use the main. When we have extra joints we have a separate ribbon which these controls would influence. **Attributes** * **followRoot** | ``float`` | What the control follows. Be it the root or the blend frame. -------- FK Controls """""""""""""" If we turn on fk mode we'll see the fk controls. .. figure:: _static/img/blocks/spine_rig_fk.png :width: 400 :align: center :figclass: align-center Note the shapes hug our proxy we shaped during the template state. **Attributes** * **axisAim/Up** | ``enum`` | Settings for our aiming system. If you use raycast aiming or other systems these settings will be used per control. If no settings are found, the global defaults will be used. -------- visControl (ON MASTER) """""""""""""""""""""""" Remember back on the master. The master settings has a new attribute registered with every module that builds that lets us see/interact with our rig guts. **Attributes** * **spineSegmentRig** | ``bool`` | toggle to hide/see but not touch/touch the rig guts -------- Dag Structure """""""""""""" For those that care about the rig structure .. figure:: _static/img/blocks/spine_rig_outliner.png :width: 400 :align: center :figclass: align-center I'll lay them out and then discuss them briefly. * spine_segment(dag- cgmRigModule) * spine_rigNull(dag) * spine_segment_deform_grp(dag) * spine_segment_animSet(objectSet) -------- Module Dag/RigNull """""""""""""""""""" The spine segment dag is a tagged mClass node of type cgmRigModule[LINK THIS WHEN DONE]. This is a special kind of dag that holds most pertinent information for the rig wiring. * **Non transforming dag** | this dag is for non-transforming dags/nodes -------- Deform Group """""""""""""" We have a deform group that is placed under the master control deform group. * Deforming nodes for the rig go here. * Sometimes I have a separate constrain group under this * Typically rig controls end up in here -------- Object Sets """""""""""" Each rig Module gets its own animation objectSet to which all rig controls are registered * **spine_segment_animSet** | Master anim set for puppet controls. Sub modules have their own sets added to this one .. note::Our object sets are created as cgmObjectSet mClassed nodes which extends their usability in code. -------- Change Log ------------ 2019 ^^^^^^ February """""""""" * Documentation * Added loftList setup. First block to receive