Tuesday, March 26, 2013

How to Poser: Joint Parameters

One of the more delightful tasks in custom Poser figure creation is setting the joint parameters.  And I just this week figured out a trick that makes it less painfull...





To recap:

You assembled the parts of a new pose-able prop within the Poser workspace and, using the Heirarchy Window, set up the relationship between "parent" parts and "children" parts in order to provide the mechanical functioning desired.  You also made sure to export or otherwise create an .obj file containing the properly scaled and oriented geometry.

Using a text editor or another tool, you edited the new figure to use the saved (external) geometry file, and placed the two resulting files within an existing or new :Runtime folder heirarchy.

The next block of figure creation is adjusting the joint parameters.



For a mechanical prop (like a gun, or a bulldozer), most of the process of adjusting joints is vastly simpler than it is for organic props (as in, people, animals, clothing items and the like).  One part is, however, slightly more technical.

Many mechanical props have sliding parts.  Poser is optimized towards organics that only have rotations.  To make it possible to slide out a drawer in a chest, or push the extractor on a revolver, you need to unhide a translate dial.

PhilC's "Poser Pocket Knife" is one of the various shareware tools that will do this.  The method I usually use is simpler (if you are comfortable with crawling inside of big sheets of markup text).

The biggest part of the "actor" section within a Poser .cr2 is the channel information.  This is the line you are looking for:

        translateY ytran
            {
            name GetStringRes(1028,13)
            initValue 0.000000
            hidden 0
            forceLimits 0
            min -100000.000000
            max 100000.000000
            trackingScale 0.002000
            keys
                {
                static 0
                k 0 0.000000
                }
            interpStyleLocked 0
            }

It is that simple.  "hidden 0" means the dial becomes visible in the Poser workspace.  "hidden 1" hides the dial so the end-user can't see it touch it (ERC can still interact with the dial, as can pose files).

 The three dials that allow you to slide an actor in the workspace are named in the above format; "translateY ytran," "translateX xtran," and "translateZ ztran."  Don't confuse them with, say, "zOffsetB zTranB!"

These dials, as are all figure dials, are in reference to the actor, not to the world at large.  This will only be the same as the workspace x, y, z coordinates when the actor in question -- or its parents -- has no rotation applied.

While we are here, "forceLimits" if set to "1" will cause Poser to behave as if "Use limits" is set for that actor of that figure.  This is also the simplest way to "lock" a dial; set "forceLimits" and make "min" and "max" equal to zero.

"min," "max," "trackingScale," "initValue," the key, and "name" can all be manipulated within the Poser workspace (although they do not have the same names).  The other dials can only be manipulated through Python scripting, pose files, or external editing.



The first step is to set the joint centers.  For mechanical props, these are usually pretty obvious!  Set the center at wherever you want it to pivot around.  And here's the trick; scaling and position in the BODY of a figure doesn't change anything about the JPs you are trying to edit.



But I'm jumping ahead.  Switch to wireframe view (as long as that helps you see better where the center of rotation is supposed to be; I'm using "Lit Wireframe" in this example for more clarity).  Select one of the orthogonal cameras (left, right, front, back, top, bottom); don't make the mistake of thinking the thing is lined up when you are viewing it through a perspective camera.  Now, instead of messing around with Poser's disgusting dolly and tracking, just use the "scale" and "translate" dials within the BODY to bring the desired actor front and center so you can work on it.


Drag the big green cross (and the red one, if it is there) to where you want it.  And that's 90% of the Joint Parameter work for a mechanical prop!



Since mechanical parts are almost entirely stiff, turn off bending (that is found in the parameters window in Poser.  You can also hit it as you are passing through the .cr2 with your editor).  With bending off, the rest of the joint parameters become superfluous.

However.  Sometimes you need bending on.  Such as, if you intend to include a morph.  There are two issues you need to address.  First is setting the "arms" or spherical fall-off zones.  The other is that,

CHILDREN AFFECT THEIR PARENTS.

Basic rule of Poser; when you move a child object, it causes the parent object to bend.  If you can't turn off bending on the parent object, you either have to adjust the joint parameters so the parent falls outside of the deformation zone, or.....

You can remove the affectors from the .cr2.

 Okay, that sounded scary.  But it really isn't.

Here's what an affector looks like in the body of the .cr2:

actor ring
    {
    name    ring
    on
    bend 1
    dynamicsLock        0
    hidden        0
    addToMenu    1
    includeInDepthCue        1
    parent    handle
    channels
        {
        twistX spinner_twistx
            {
            name spinner_twistx
            initValue 0
            hidden 1
            forceLimits 0
            min -100000
            max 100000
...
I've highlit the critical clue; every affector channel will include the name of the child part.  In this case, the "ring" is the parent, and the child called "spinner" is going to bend the ring whenever it rotates along the x axis.

But it won't if you delete that channel from the .cr2.  You can just go ahead and erase them all in a text editor.  Poser won't put them back.  And now your parent object can have morphs assigned or even bend like a wet noodle without having bits dragged out of place by the child parts attached to it.

(Incidentally, this same child-affects-parents relationship is what makes Body Handles possible.  They are nothing more than random primitives that will be hidden at render time.  Dragging them around drags and twists selected geometry below them, allowing a skirt to swirl or mustache to twirl or whatever.)



You might end up having to adjust the joint params anyhow.  So here it is.  Simple; what is inside of the green zone MUST rotate, what is inside the red zone MUST NOT rotate, and everything in between is blended.

The case that will come up most often for mechanical devices is something that rotates around a single axis.  If you accept the Poser default JPs, the cylinder of your revolver will twist up like a twizzler instead of spinning like a hunk of metal. You need to drag the short bar with one red end and one green end so the entire object falls outside of the green end.  And if you are clever or lucky, you can make sure the entire frame of the revolver falls outside the red end of the twist bar.

The first axis in the rotation order gets the bar; the other two get arms.  Which work the same.  And if you can position the arms so everything that isn't supposed to move is safely outside, then select "use spherical fall-off zone" and the joint inclusion and exclusion zones will instead fall along the surfaces of two spheres which you can scale and drag around.



Once your joint parameters are set, you can close the Joint Editor pop-up window.  Then within Poser you can set external names and joint limits.

First, turn on "Use Limits" for your new figure (found in the Figure menu).  Now by using the Parameter Dials, roll your part out to where it looks right; assuming it has mechanical limits and is not a simple center bearing.  Double-click the dial in question to get the pop-up where you can set the "min" and "max" values.

In this pop-up, you can also name the dial.  This is the "external" name; the one displayed to the end-user.  Poser is still using the original name as the channel name -- and needs to, if it is to work right.

That is:

        translateY ytran
            {
            name extract
... 
Again, to either force limits to be used regardless of whether "Use Limits" is checked, or to hide a dial entirely, you need to edit the .cr2 (or use other tools such as Python scripts or custom pose files).  I find it simplest to do this in a text editor, myself.

You can also set dial sensitivity.  But one caveat; Poser will not respect the dial sensitivity of a morph dial, but will make up a new value on the fly whenever loading a .cr2 to the workspace.  There is a way around this; by using ERC. Which is the heart of the next essay.

No comments:

Post a Comment