lesbentley opened this issue on Mar 31, 2008 ยท 137 posts
lesbentley posted Wed, 02 April 2008 at 6:41 PM
**Injecting ERC slaving (part 1).**Pose files can be used to inject ERC slaving code into a figure, prop, light, camera, hair, or magnet.
Let's take a very simple example to start with. If you apply the pz2 file below to almost any figure, using the yTran dial on the BODY will cause the hip to rotate.
{
//UpTwist.pz2
//This slaves yrot in the hip to ytran in the BODY.
version
{
number 3
}
actor hip
{
channels
{
rotateY yrot
{
valueOpDeltaAdd
Figure
BODY
ytran
deltaAddDelta 100.000000
}
}
}
figure
{
}
}
Let's have a closer look at this file. Most of it is just to define the hierarchy structure, so that Poser knows where to place the code. The interesting part is the slaving code: valueOpDeltaAdd [type of slaving]
Figure [Defines which figure has the master channel. In a cr2 "Figure" is followed by a number. Leave number out in a pz2]
BODY [the actor where the master channel lives. Leave out the ":#" in a pose file]
ytran [the name of the master channel]
deltaAddDelta 100.000000 [control ratio, how strongly the slave is to be affected by the master]
So the first line is the type of slaving, the second says which figure the master channel is in, the third says which actor to look in for the master channel, the fourth line is the name of the master channel (either internal, or dial name can be used), the fifth line is a control ratio that tells Poser how strongly to affect the channel.
It is beyond my scope here to give a full explanation of ERC (a.k.a. "EMC").
One point to note with ERC slaving. The position of the master channel in the parenting chain will determine whether or not the slave can "see" it. Slaves may have trouble seeing masters that are below them in the parenting chain. I think the situation with regard to this is better in P6 than earlier versions.
See the links below for more details of how ERC works.
http://www.rbtwhiz.com/rbtwhiz_ERC.html
http://www.nerd3d.com/modules.php?name=Content&pa=list_pages_categories&cid=1
http://www.atlantis23.com/erc_download.html
To be continued...