Make a Refrigerator Figure

Page 3: ERC Dials

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.


Applications used:


 Poser 4 or above
 Text Editor (WordPad, NotePad, BBEdit, etc)

Steps:

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:
 Scroll down to the section that says "actor BODY", then scroll down to the line that says "channels".
 Next, insert the following text after the first "{", but before the "zOffsetA" line. (The blue text are notes and should not actually be added to the cr2 file.)
		valueParm OpenCloseBothDoors <--internal name
			{
			name OpenCloseBothDoors <--display name
			initValue 0 <--initial value, usually 0
			hidden 0 <--is this dial hidden? 0=no, 1=yes
			forceLimits 4 <--0=no, 4=yes
			min 0 <-- either Poser's default value of -360000 or 0
			max 1 <--either Poser's default value of 360000 or 1
			trackingScale 0.0111
			keys
				{
				static  0
				k  0  0
				}
			interpStyleLocked 0
			}

Your file should look like this:
BEFORE AFTER
actor BODY:1
	{
	name    GetStringRes(1024,1)
	off
	bend 0
	dynamicsLock		1
	hidden		0
	addToMenu	1
	castsShadow		1
	includeInDepthCue		1
	parent UNIVERSE
	channels
		{
		zOffsetA zOffset
			{
			name GetStringRes(1028,38)
			initValue 0
			hidden 1
			forceLimits 0
			min -100000
			max 100000
			trackingScale 0.004
			keys
				{
				static  1
				k  0  0
				}
			interpStyleLocked 0
			staticValue 0
			}
actor BODY:1
	{
	name    GetStringRes(1024,1)
	off
	bend 0
	dynamicsLock		1
	hidden		0
	addToMenu	1
	castsShadow		1
	includeInDepthCue		1
	parent UNIVERSE
	channels
		{
		valueParm OpenCloseBothDoors
			{
			name OpenCloseBothDoors
			initValue 0
			hidden 0
			forceLimits 4
			min 0
			max 1
			trackingScale 0.0111
			keys
				{
				static  0
				k  0  0
				}
			interpStyleLocked 0
			}
		zOffsetA zOffset
			{
			name GetStringRes(1028,38)
			initValue 0
			hidden 1
			forceLimits 0
			min -100000
			max 100000
			trackingScale 0.004
			keys
				{
				static  1
				k  0  0
				}
			interpStyleLocked 0
			staticValue 0
			}
Some notes:
 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:
 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 "interpStyleLocked" line, but before the "}" line.
			valueOpDeltaAdd
				Figure 1 
				BODY:1
				OpenCloseBothDoors <--internal name
			deltaAddDelta 90
Your file should look like this:
BEFORE AFTER
		rotateY yrot
			{
			name OpenClose
			initValue 0
			hidden 0
			forceLimits 4
			min 0
			max 90
			trackingScale 1
			keys
				{
				static  0
				k  0  0
				}
			interpStyleLocked 0
			}
		rotateZ zrot
		rotateY yrot
			{
			name OpenClose
			initValue 0
			hidden 0
			forceLimits 4
			min 0
			max 90
			trackingScale 1
			keys
				{
				static  0
				k  0  0
				}
			interpStyleLocked 0
			valueOpDeltaAdd
				Figure 1
				BODY:1
				OpenCloseBothDoors
			deltaAddDelta 90
			}
		rotateZ zrot
 Next, let's adjust the lower door (which will be the same as the freezer door):
 Scroll down the file until you come to the settings for the "OpenClose" dial on the lower door.
 Next, insert the following text after "interpStyleLocked1 line, but before the "}" line.
			valueOpDeltaAdd
				Figure 1 
				BODY:1
				OpenCloseBothDoors <--internal name
			deltaAddDelta 90
Your file should look like this:
BEFORE AFTER
		rotateY yrot
			{
			name OpenClose
			initValue 0
			hidden 0
			forceLimits 4
			min 0
			max 90
			trackingScale 1
			keys
				{
				static  0
				k  0  0
				}
			interpStyleLocked 0
			}
		rotateZ zrot
		rotateY yrot
			{
			name OpenClose
			initValue 0
			hidden 0
			forceLimits 4
			min 0
			max 90
			trackingScale 1
			keys
				{
				static  0
				k  0  0
				}
			interpStyleLocked 0
			valueOpDeltaAdd
				Figure 1
				BODY:1
				OpenCloseBothDoors
			deltaAddDelta 90
			}
		rotateZ zrot
Some notes:
 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:
BEFORE AFTER
actor BODY:1
	{
	name    GetStringRes(1024,1)
	off
	bend 0
	dynamicsLock		1
	hidden		0
	addToMenu	1
	castsShadow		1
	includeInDepthCue		1
	parent UNIVERSE
	channels
		{
		valueParm OpenCloseBothDoors
			{
			name OpenCloseBothDoors
			initValue 0
			hidden 0
			forceLimits 4
			min 0
			max 1
			trackingScale 0.0111
			keys
				{
				static  0
				k  0  0
				}
			interpStyleLocked 0
			}
		zOffsetA zOffset
actor BODY:1
	{
	name    GetStringRes(1024,1)
	off
	bend 0
	dynamicsLock		1
	hidden		0
	addToMenu	1
	castsShadow		1
	includeInDepthCue		1
	parent UNIVERSE
	channels
		{
		valueParm OpenCloseBothDoors
			{
			name OpenCloseBothDoors
			initValue 0
			hidden 0
			forceLimits 4
			min 0
			max 1
			trackingScale 0.0111
			keys
				{
				static  0
				k  0  0
				}
			interpStyleLocked 0
			}
		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
			}
		zOffsetA zOffset

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:
BEFORE AFTER
		rotateY yrot
			{
			name OpenClose
			initValue 0
			hidden 0
			forceLimits 4
			min 0
			max 90
			trackingScale 1
			keys
				{
				static  0
				k  0  0
				}
			interpStyleLocked 0
			valueOpDeltaAdd
				Figure 1
				BODY:1
				OpenCloseBothDoors
			deltaAddDelta 90
			}
		rotateY yrot
		rotateY yrot
			{
			name OpenClose
			initValue 0
			hidden 0
			forceLimits 4
			min 0
			max 90
			trackingScale 1
			keys
				{
				static  0
				k  0  0
				}
			interpStyleLocked 0
			valueOpDeltaAdd
				Figure 1
				BODY:1
				OpenCloseBothDoors
			deltaAddDelta 90
			valueOpDeltaAdd
				Figure 1
				BODY:1
				OpenCloseFreezerDoor
			deltaAddDelta 90
			}
		rotateY yrot

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:
BEFORE AFTER
actor BODY:1
	{
	name    GetStringRes(1024,1)
	off
	bend 0
	dynamicsLock		1
	hidden		0
	addToMenu	1
	castsShadow		1
	includeInDepthCue		1
	parent UNIVERSE
	channels
		{
		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
			}
		valueParm OpenCloseBothDoors
actor BODY:1
	{
	name    GetStringRes(1024,1)
	off
	bend 0
	dynamicsLock		1
	hidden		0
	addToMenu	1
	castsShadow		1
	includeInDepthCue		1
	parent UNIVERSE
	channels
		{
		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
			}
		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
			}
		valueParm OpenCloseBothDoors

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:
BEFORE AFTER
		rotateY yrot
			{
			name OpenClose
			initValue 0
			hidden 0
			forceLimits 4
			min 0
			max 90
			trackingScale 1
			keys
				{
				static  0
				k  0  0
				}
			interpStyleLocked 0
			valueOpDeltaAdd
				Figure 1
				BODY:1
				OpenCloseBothDoors
			deltaAddDelta 90
			}
		rotateY yrot
		rotateY yrot
			{
			name OpenClose
			initValue 0
			hidden 0
			forceLimits 4
			min 0
			max 90
			trackingScale 1
			keys
				{
				static  0
				k  0  0
				}
			interpStyleLocked 0
			valueOpDeltaAdd
				Figure 1
				BODY:1
				OpenCloseBothDoors
			deltaAddDelta 90
			valueOpDeltaAdd
				Figure 1
				BODY:1
				OpenCloseLowerDoor
			deltaAddDelta 90
			}
		rotateY yrot

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.