Make sure you have completed the steps on page 1 and 2 before proceeding. Okay, now that the introductions are over, let's get back to work. On this page, you'll add ERC dials to the refrigerator body that will control the opening and closing of the doors.
Before I start the tutorial, though, I should explain what "ERC" is. "ERC" stands for "Extended Remote Control" and it is a way for one body part to control another. For human figures, the BODY part has many, many ERC dials to control the shape of the other parts of the body. For example, on the Vicky 2 figure, there is a dial on the BODY called "Young". Adjusting this dial actually changes the value of the "Young" dial on every body part. On a helicopter (or refrigerator) model, the BODY part may have a dial for "OpenDoors"- when a user adjusts this dial, the door can open and close.
Here are a few benefits to ERC dials:
1) Convenience: The user doesn't have to select each body part and adjust the parameter dial. All they need to do is select the BODY, look for the part to move, and then adjust the dial.
2) Complexity: Almost all of the human figure for Poser have a "Grasp" ERC dial on the hand. This dial controls the "bend" dial on each of the 3 parts on each of the 4 figures (another dial controls the thumb). Without the use of the ERC dial, the process of making a hand grasp would be an extremely tedious job.
3) Ultra-complexity and accurate motion: Some models (such as the JAGDPanther) use ERC dials to control the rotation and movement of tank treads, based on complex calculations based on the movement of the BODY. It is highly doubtful that a user could calculate the correct motion of the treads and then adjust those parts accordingly.
However, there is one major drawback to ERC dials:
Poser 4 and 5 have an issue called "cross-talk". This occurs when you add two figures to the scene which have the same ERC dials. The second figure's ERC dials will actually be controlled by the first figure. (The dials will "cross-talk" across figures.) This issue affects everything from the shape of a second human figure (where the second figure may absorb the shape of the first figure) to the rotation of a second helicopter's blades.
However, this issue has been corrected in Poser 6.
1. Adding ERC "master" control dial to the BODY, to open both doors.
Open the refrigerator cr2 file in a text editor (WordPad or NotePard will work fine).
First, we'll add the parameter dial to the body:
The minimum and maximum values will be 0 and 1 if the body part will have limits applied to it. You should also set the "forceLimits" value to 4 ("on"). (This is the case for our refrigerator model since the doors' rotation values range from 0 to 90 degrees.) If a part can rotate completely around (such as the top blades of a helicopter), the minimum and maximum values should be Poser's defaults (a minimum value of -360000 and a maximum value of 360000) and "forcelimits" should be 0 ("off"). The "trackingScale" is used when the body part has a maximum rotation value, in which case the "trackingScale" value will be 1 divided by the maximum value. Since the refrigerator doors have a maximum value of 90 degrees, the "trackingScale" value is 1/90 or 0.0111. |
1a. Add ERC "slave" dial to the body parts: the doors.
First, let's adjust the freezer door:
It is very important that the internal name of the slave dial ("OpenCloseBothDoors") exactly matches the internal name of the master ERC dial ("OpenCloseBothDoors"). If these names do not match (due to a typo or mixed-case) then the ERC dial will not work. If a part can rotate completely around (such as the top rotor of a helicopter), leave "forcelimits" set at 0 ("off"). If a part has limits (such as the freezer and lower doors), set "forcelimits" to 4 ("on"). The "deltaAddDelta" value will be the maximum value of rotation, either positive or negative. If a part rotates completely around, leave the value at 1. For our refrigerator doors, the maximum value of rotation is 90 degrees, so the "deltaAddDelta" value is 90. If a part moves in the opposite direction (such as an aircraft wing opening and closing) the "deltaAddDelta" should be negative. When the ERC master dial is turned, the negative value in the slave dial will cause the body part to move in the correct direction. Make sure that the number after the colon ("BODY:1") matches the number after the BODY section, above. If they don't match, the dials may not move correctly. |
Both doors can now be opened with a dial on the BODY. Optional: switch to Poser and add the refrigerator to the scene. Select the Body and you should see the "OpenBothDoors" dial. Turn it and watch the doors open and close!
3. Adding ERC "master" control dial to the BODY, to open just the freezer door.
Scroll back up to the top of the file, then scroll down to just below the "OpenCloseBothDoors" section of code.
Next, insert the following text after the "valueParm OpenCloseBothDoors" section, but before the "zOffsetA" line. valueParm OpenCloseFreezerDoor { name OpenCloseFreezerDoor initValue 0 hidden 0 forceLimits 4 min 0 max 1 trackingScale 0.0111 keys { static 0 k 0 0 } interpStyleLocked 0 }Your file should look like this:
|
3a. Add ERC "slave" dial to the freezer door.
Scroll down the file until you come to the settings for the "OpenClose" dial on the freezer door (or do a search for it).
Next, insert the following text after the existing "deltaAddDelta 90" line, but before the "}" line. valueOpDeltaAdd Figure 1 BODY:1 OpenCloseFreezerDoor <--internal name deltaAddDelta 90 Your file should look like this:
Some notes: As you can probably tell, the two "valueOpDeltaAdd" sections of code allow this body part to be controlled by two ERC dials. |
The freezer door is done!
4. Adding ERC "master" control dial to the BODY, to open just the lower door.
Scroll back up to the top of the file, then scroll down to just below the "OpenCloseFreezerDoor" section of code.
Next, insert the following text after the "valueParm OpenCloseFreezerDoor" section, but before the "valueParm OpenCloseBothDoors" line. valueParm OpenCloseLowerDoor { name OpenCloseLowerDoor initValue 0 hidden 0 forceLimits 4 min 0 max 1 trackingScale 0.0111 keys { static 0 k 0 0 } interpStyleLocked 0 }Your file should look like this:
|
4a. Add ERC "slave" dial to the lower door.
Scroll down the file until you come to the settings for the "OpenClose" dial on the lower door (this section is just below the freezer door).
Next, insert the following text after the existing "deltaAddDelta 90" line, but before the "}" line. valueOpDeltaAdd Figure 1 BODY:1 OpenCloseLowerDoor <--internal name deltaAddDelta 90 Your file should look like this:
|
The lower door is done!
Additional notes about cr2 editing:
Be very, very careful about deleting any code from the cr2 file. Poser puts the code there for a reason and deleting anything may cause your file to stop working properly. If you need to "remove" a dial, you should either hide it (set the "hidden" value") or lock it (by setting the "min", "max", and "forceLimits" values).
The master ERC dial does not have to be on the BODY, though that is usually the most logical place for it. For example, you can add ERC controls for the hand and fingers: a "grasp" or "spread" dial on the hand can affect the rotation of the finger parts. If you put the master ERC dial on another body part, be sure to replace the "BODY:1" (in the slave dial section) with the correct body part, such as "rHand:1".
To hide any parameter dial, change the "hidden" value: "hidden 0" (show this dial) or "hidden 4" (hide this dial).
To "lock" a dial, set the "forcelimits" to 4 (on) and set the min and max values to 0. This is useful for preventing users from moving parts in the wrong direction.
To hide any body part, change the "on" line (just below the actor (part) line) to "off" (hide this part) or "on" (show this part). Changing this to "off" or "on" on the BODY has no effect: the BODY will always be shown.
Copying the material section (and the "version" section at the top of a file) and then renaming the file with a "pz2" extension will give you a MAT pose. More information about this trick can be found on the Making MAT Poses (Quick Method) Page.
That's it! You now have a refrigerator figure with opening and closing doors with dials on the BODY to control the doors. Now go make some textures for your model.