Forum: Poser Technical


Subject: Smart parenting and posing involving both hands

kuroyume0161 opened this issue on Mar 12, 2004 ยท 14 posts


lesbentley posted Sat, 13 March 2004 at 1:12 PM

It is not possible to parent a prop to two hands, as a Poser element (actor, prop, camera, etc) can (as far as I know) only have one parent. You can parent both hands of a figure to a prop if Inverse Kinematics is turned on for the arms. The arms would then follow the movement ot the prop. Turning IK on, setting the inkyParent, and posing the prop and figure can all be implimented via one pz2 file.

This seems to be what is being discribed by Numanoid in the thread linked in Bob's post #3. I am not sure what advantage if any is gained by converting the prop to a figure, if there is only one instance of the prop in the document, then I don't see the point. If there is to be more than one instance of the item then using a figure might overcome the problem of having to have a seperate pz2 for each instance of the item (because prop names have an incremental number added to each sucessive instance, and that changes the name).

It only takes a relitivly small ammount of code to set the inkyParent of the hands and turn the IK on. It is the code is in step #13 below, you would only need to enclose that code in opening and closing braces to make it a standalone pz2 file. However if you only used that code the arms would probably fly into some strange contortion. One way to overcome this is to use the procedure below. It sets the inkyParents, turnes IK on, and poses the figure and prop.

  1. Start Poser. Load the figure and the prop, here after refered to as the "Sword".
  2. Pose and the figure and Sword, do NOT translate or rotate the figures BODY actor.
  3. Save a pz3.
  4. Parent the Sword to the BODY.
  5. Save a pose, using "Select Subset" to include only the sword. Name it "A".
  6. Parent the Sword to the UNIVERSE.
  7. Turn on IK for the arms.
  8. [in the Hierachie Editor] Parent the arms to the Sword.
  9. Save a pose. Name it "B".
  10. Open A.pz2 and B.pz2 in a text editor.
  11. Copy the prop section of B.pz2 and paste it just above the "actor hip:#" section of B.pz2.
  12. Replace the word "prop" in the code you have just pasted with "actor".
  13. Just under the version number in B.pz2 write the following code:
actor MYPROP_1<br></br>   {<br></br>   }<br></br><br></br>actor rHand:1<br></br>      {<br></br>   parent MYPROP_1<br></br>     inkyParent MYPROP_1<br></br> }<br></br>actor lHand:1<br></br>  {<br></br>   parent MYPROP_1<br></br>     inkyParent MYPROP_1<br></br> }<br></br>figure <br></br>        {<br></br>   addChild    rHand:1 <br></br>                         MYPROP_1<br></br>   addChild    lHand:1 <br></br>                         MYPROP_1<br></br><br></br>       inkyChain     rightArm  <br></br>            {<br></br>           on<br></br>          }<br></br>   inkyChain     leftArm  <br></br>             {<br></br>           on<br></br>          }<br></br>   }<br></br>

Where "MYPROP_1" is the internal name of the "Sword" and ":1" is the actor number in B.pz2.

  1. Resave the B.pz2 with the final name you want to use for it. Load the unposed figure and sword in Poser and test your pz2.

The translations and rotations of the figures BODY actor should be zero before you apply the pose. This can of course be implimented in the same pz2, I have not included instructions for that step for reasons of time and space.

There may be easier ways to achive all this, the above is just the method I have developed so far.

An alternative to the above might be to smartparent the prop to the right hand, then inkyParent the left hand to the prop. Or yet another method might involve smartparenting the prop to one hand and using 'Point At' to point it at the other. These are just ideas, I haven't tested them properly.