Forum: Poser Technical


Subject: More Poser secrets revealed - Don't read...

VK opened this issue on Oct 27, 2003 ยท 33 posts


VK posted Mon, 27 October 2003 at 9:54 AM

This code example creates an origin, which is variable in the y dimension. You can see the coordinates x=0, y=1, z=0 of the Poser Origin in the "origin" line of the code. The Poser Origin is again at the upper end of the arrow. To create the variable origin, we include two common "yTran" channels with unique names, "yCenterA" and "yCenterB". Both yCenter channels are linked with ERC slave-code, because they should always move together. The ERC code is not really required in an animation, you could as well move both dials manually to the proper keyframe values. When the code is executed, Poser first encounters the yCenterA channel. yCenterA moves the prop geometry without the origin. When you set yCenterA, you create a new y distance between the origin and the prop geometry. Then, the OffsetA's activate the Poser Origin. Next, the rotations are evaluated. The new y distance between the prop and the origin defines the radius of the rotation. "Radius of the rotation" is just another word for "the rotation center in local coordinates". Therefore, the yCenterA translation defines a new center of rotation. Then, the yCenterB channel is evaluated. yCenterB is the opposite of yCenterA. You don't want to see any y translation in the end, so you need to compensate for the yCenterA translation. yCenterB is the negative value of yCenterA (that is the value of yCenterA with opposite sign). yCenterB resets the prop to the previous position. The two yCenter channels work in the same way as the Offset channels (OffsetB is the negative value of OffsetA, to reset the Default Origin). The ERC slave-code moves yCenterA to the negative value of yCenterB. Usually, yCenterA (the first yCenter channel) is the ERC slave, and yCenterB (the second yCenter channel) is the ERC master. The user can move the dial of the yCenterB master, to set the variable origin. The channel value of yCenterB is the vector, which starts at the Poser Origin and points at the new origin. "Vector" means, the value and the sign (plus or minus) of yCenterB describe the way from the Poser Origin to the new origin: Negative yCenterB values place the new origin below the Poser Origin. Positive yCenterB values place the new origin above the Poser Origin. If you make the origin variable in the x dimension or z dimension, the motion direction of the origin expressed in the sign of the CenterB channel is equal to the motion direction of the model expressed in the sign of the standard Tran channel.