User Tools

Site Tools


This page exists within the Old ArtZone Wiki section of this site. Read the information presented on the linked page to better understand the significance of this fact.

Writing JCM (Joint Controlled Morphs)

Author: Looniper

Support Files

Introduction

This tutorial will provide you with all you need to begin adding your own JCMs and other EMC controls to figures and props with only a text editor.

Step 1 - Setting up

The provided zip file (available above) contains the deflating balloon and lever figure used in this tutorial.

Unzip it into your Poser folder (the one containing the Runtime folder) and you are ready to start.

The first thing you will need to do is find the Balloon.CR2.

This is installed to your content folder in Runtimes:Libraries:character:Tutorials

Go ahead and load the Balloon figure into Poser and have a look at it.

Most instances of JCM deal with muscularity morphs controlled by arm or leg joints, but for this tutorial, I thought something a little different was in order.

The balloon part has only 1 dial, Deflate. This is the morph we will be controlling.

400-034f.jpg

The lever part has only 1 dial as well, zRotate, which pulls it left/right. This will be our controlling action.

400-0350.jpg

At this point, we haven't created the JCM, so using the lever does nothing, but you can manually dial the morph on the balloon.

Most of the dials are hidden and joints/trans/scales are locked to prevent accidental changes. To scale or rotate the figure, use the BODY of it.

Step 2 - JCM (EMC/ERC) Methodology

JCMs are one application of a method often called EMC(Extended Motion Control) or somtimes ERC(Extended Remote Control).

The short desciption being “control of an action by an external action.”

Each instance of EMC relates 2 actions together(a Control and a Subject) with a degree of Influence.

Control and Subject actions can be morphs, joint rotations, a part's trans(location), or even scales. Pretty much any dial can control any other dial.

Each Instance binds 2 actions, but a Subject can have multiple Controls and a Control can have multiple Subjects.)

The Control action is defined with 3 pieces of information.

The Controlling Action. (what happens that causes the JCM)

The Controlling Part. (what Part does this action)

The Controlling Figure. (what Figure has this Part)

We don't have to define anything about the Subject, since it is in the Subject's portion of the CR2/PP2 that we place the JCM, so Poser will already know who the Subject is.

Step 3 - Writing the JCM

Creating a JCM consists of adding 5 lines to a CR2 or PP2.

valueOpDeltaAdd

Controlling Figure

Controlling Part

Controlling Action

deltaAddDelta InfluenceValue

The first line, valueOpDeltaAdd, simply lets Poser know that this action is going to accept influence by an external action.

The Controlling Figure is the name of the figure as it appears when loaded into Poser.

This can be problematic, since Poser will enumerate figure names if others already exist in the scene with the same name (figure 1, figure 2, etc) and the name must be exact, including case and the enumeration.

-The tutorial figure will have the name Balloon when loaded.

The Controlling Part is the exact name of the body part of the above named figure that performs the influencing action.

If there is a :# in the name in the CR2/PP2, you must include it here.

-lever:1 is the part we use here.

The Controlling Action is the name of the joint rotation(or other action) that influences the morph.

This is found under the body part's action information in the CR2/PP2.

-zrot is our action in this tutorial.

(Notice the name is the one used in the CR2, and Not the name listed on the dial inside Poser.)

Note: Poser will often use GetStringRes(#, #) values to represent the more common body part names and joint action names. This is part of its muli-language capabilities, and normally unimportant, but if Poser has used a GetStringRes as the name, you must use it as well.

(For more information on GetStringRes, check out 3DMenagerie and look under Goodies-Tutorials.

deltaAddDelta InfluenceValue tells Poser how much of this action gets dialed in relation to the Controlling Action's dial.

Determining this value will require either a head for math, or some trial and error. Too high and the morph is fully dialed with just a minor twitch of a joint.

-The value we will use here is 0.025 which causes the morph to reach about 3/4 of its maximum when the lever is fully pulled.

These 5 lines go into a particular location within the morphs data in the CR2/PP2.

In this case, the balloon body part of our Balloon figure.

Search the CR2 for Deflate to find the morph entry.

Now scroll down a few lines until you come to the line

interpStyleLocked 0

Directly after this line is where we add our JCM.

So now it looks something like this.

interspStyleLocked 0

valueOpDeltaAdd

Balloon

lever:1

zrot

deltaAddDelta 0.025

indexes 132

….

Save the CR2 with these changes and go into Poser.

Step 4 - Action and Responce

400-0353.jpg

Load the Balloon figure and move the lever.

“AH! The balloon didn't delfate!”

Actually, it did, but Poser is often too lazy to show you that it did. ;)

Even with “Full Tracking” on, poser won't always update changes to a part until it becomes the focus, or any of the numerous conditions that cause it to refresh the entire preview occur.

It is aware that the balloon has morphed though.

If you move the lever, and then move your mouse over the balloon without clicking anything, you will notice that the Outline of the balloon has been morphed.

A good way to see things work is this.

Start with the lever in the 0 position(full right).

Go to Window- > Animation Palette to get the animation controlls.

Click on frame 15 in the animation palette and move the lever all the way to the left(40).

Click on frame 30 and move the lever back to 0 position again.

Now with full tracking turned on, play the animation. You will see the lever rocking back and forth and the balloon inflating and deflating as a responce to the lever.

Step 5 - Practice

As a minor challenge, try this.

Load a ball from the Props library, and save it back as BounceBall.

See if you can edit BounceBall.PP2 to bounce up and down in responce to the Balloon figure's lever.

As a separate object/figure, it most likely won't be updated in the display until you select it, so try using the Animation Palette again.

For a more difficult practice, load and re-save(with a new name) a Cylinder prop.

Create a JCM for it in responce to the turning of a figure's hand (as if turning a knob).

Now save a light and add JCM to it in responce to the rotation of the cylinder.

(Animate the figure turning this light dimming dial.)

I hope you find this tutorial useful,

-Looniper