Skip to main content

Creating a Custom Template Again Part 6-Let's be a chiropractor and get adjusting Part 1



    Picking up from where we left off, we have a spine component that builds and places everything where it needs to go. This is terrific. Now, we get into some of the meat and potatoes of making our components/templates. Adjustments! After all, the biggest perk of creating your own template is the ability to resize it easily and intuitively to any character. Let's make it so!


    Like last time, grab this file to pick up where we left off. So before we get into just adding adjustment rules all willy nilly, we really need to sit and think about a few things. We need to think about how we envision adjusting working. It's also good to establish some best practices for adjusting. It can be a down and dirty process or it could be neat and tidy. Here's my sort of mantra for adjustment rules and such:

  • No man objects left behind. It is confusing to see lots of stuff left behind only to magically snap into the right place at the end.
  • No jumping. Along with that first point, I shouldn't see my adjustment handles jump. Where I leave them is where they should wind up(positionally at least)
  • Do everything you can to be able to adjust with Position, Scale, and Rotation. 
  • Do everything you can to prevent overlapping handles.

    In order to do those things, it takes a fairly thorough understanding of how the rig works to know some of the best ways to make it adjustable.  So let's look at the features and behaviors of our spine component and take some notes about it should be handled.


    Looking at this image, we have some bind joints, some controllers, and some helper nulls. We have some straight FK controls, we have some Spline IK, we have generally an FK chain. So there's the hips and pelvis section. The torso section which is pretty much just splineIK. Then there's the chest which is the start of an FK chain to the head. The head also has some space switching. Generally, using your bind joints as adjustment handles is a solid way to go . However, with Spline IK, I don't recommend it. The reason is because probably 100% of the time I use the equal mode of Spline IK. which keeps the joints evenly spaced, which is great. But trying to ensure the user to keep them evenly spaced will most definitely lead to some jumps/pops. That goes against my mantra. 

   Now we should find a way to handle that case(there is one, don't worry). But for just about everything else, we can use the bind joints. So from the chest_bind to the head_tip, those can all be adjustment handles for sure.We can make the hips_bnd, and the pelvis_tip be handles as well. The pelvis_bind doesn't need to be one because it's in the same location as the hips, which would go against the mantra. Another thing that could stand to use an adjustment handle is something unique to this rig. The hips_swivel_con+ allows you to sort of swivel the hips from higher up than the pelvis_bind. This means you can engage some of the torso of the character for a little bit of different behavior than what the pelvis_con+ would do. Where you would place this can vary a lot model by model, so we will want to be able to place that manually ourselves. So that should be a handle as well. The last handle I'd like to add, is one that would allow us to quickly and easily make a curve in the splineIK/spine. It's not exactly required to do so, but I think it can come in handy(maybe) in some cases. It could be done without this, but I think for some curved spines. What I would use for this is the torso_con+.


    Jump into the component tag on the hips_bind joint, and jump to the Adjustments tab. Unfold the Handles group and add the following objects: hips_bind, pelvis_tip, chest_bnd, neck_bnd, head_bnd, head_tip, hips_swivel_con+, and torso_con+. Plop those bad boys into that group because we got some adjustment handles now. Now, how to handle the splineIK. I mentioned that being an issue a little bit earlier. Since splineIK would be handling the even spacing and orientation of things, it'd be pretty sweet if we could make that live while we adjust and it would handle things for us. Oh, great idea! Because it's totally possible to do that. One of the other groups in the Adjustments tab is called Expressions. These are the expressions and tags that you want to be on while adjusting(or you could switch it to exclude and ONLY these would be off, but that seems silly for now). 

    In order to make this work, we want to be sure to add our splineIK tag into this group. This means it will run live. Now, given how this rig is set up, the spline IK is happening on a bunch of nulls and our bind joints are constrained to the nulls. So we have three options with how to handle this. 1. Do nothing with the joints and they'll snap into place. 2. Set up adjustment rules so that they follow their corresponding null object. 3. Add those constraints to the expressions list.


    Option 1 gives me anxiety as it breaks my mantra. So that's out. Really, options 2 and 3 are fine. Either way you do it. For option 2, you'd just make adjustment rules that say bind joint X follows Null Y. For a quick thing, I went with option 3. I just added the constraint tags for spine_01_bnd, spine_02_bnd, spine_03_bnd, spine_04_bnd, and chest_bnd to the expressions list. Easy peasy lemon squeezy.

    Because we have our handles figured out, and we know which objects we don't need to worry about making rules for, we can start working our way through the objects that are not controlled by expressions or are not handles, and start specifying where they should go and what they should follow. I'm going to start with the hips_algn and work my way down with that first. Then we will handle the head_algn and the world target. 

    Click the Add button to add a new Adjustment Rule. Naturally, Rules come in set to PSR by default as this will be the most common one. But there are several others. There's Plane which is great for IK and Pole Vectors or anything  needing to follow along a plane made up of 3 object positions. Aim let's you make an object aim at it's target. Point Index let's you link a specific point to an object. Points let you control how the points of an object should follow a target, and then lastly there's python so you can do whatever floats your boat if you feel so inclined. To be quite honest, I think you'll mostly just use PSR and Plane(for IK stuff), and Points(for controller stuff). The others are very rare use cases, so don't worry about them. For this template, we're only going to use PSR and Points.


    Select your rule. It is already set to PSR so no changes there needed. You should see options like the image above. Let's break down all of these options before we go about setting all the rules. So you have two slots. Link and To. Kinda self explanatory. You are saying I want to Link the object in the link filed, to the to object in the To field.  Everything else is determining how it should follow. You have your standard Position, Scale, and Rotation options. Then there's an align option. Usually it's greyed out unless you either A. Have Children turned on like in the image above. or B. Uncheck Rotation. This is meant more for joints, I believe. The idea being that, you could move a child joint, like a tip joint, you'd want the parent to properly align itself(ie the axis will point to it's child). Then you have the Axis checkbox which says to only move the axis of the object and not necessarily the object itself(I don't really use this much.) The last option is up there called Children. This says that you want all the children of this object to follow along as the Link object gets moved around. It's not to say that children should also match the To field object. It's just enabling the standard parent child movement. So with this first rule, match the image above. We are basically saying have the hips_algn follow the hips_bnd(our handle though these are not required to be handles). And have the children follow along. By doing it like this with the children, it means we should have to do slightly fewer rules, but also it will behave in manner more people are used to where moving a parent moves the children.

    This post is getting really long. It had a lot of information and it's getting late. Let's stop here. Here's the file, try to see if you can solve the rest on your own knowing what you know so far, and we'll compare in the next tutorial. How I do it isn't the gospel, remember. If your way works for you then it works! Your mantra could be different than mine and that's A-OK! You do you!

Comments

Popular posts from this blog

Creating a Custom Template Again Part 5-Spine Building and Inserting

    Since the last chapter, I made some tweaks to things. Use this file for a starting point. Your Object Manager should look like this:     Here's the list of changes: 1. Added a Rig null to the root component(will get into why I did this later in this post). 2. Added a parent to the hips_con+ called hips_algn(will get into why later in this post). 3. Added spine_rig_elements null and put the spine_spl and spine_01_bnd under it(will touch on this in the post). 4. Cleaned up the neck's orientation values to follow the rest of the spine. 5. Froze all necessary things that needed to be frozen.6. Added some adjustment rules to the root component that might not be necessary, but just to be safe I added them. We will get more into adjustments and rules in a later post. Sorry about that. This particular component is an evolution. In addition to teaching you about the settings of the Component tag, I am trying to make a completely functional template that maybe I will do mor