Wed, Nov 20, 2:53 AM CST

Renderosity Forums / Poser Technical



Welcome to the Poser Technical Forum

Forum Moderators: Staff

Poser Technical F.A.Q (Last Updated: 2024 Nov 13 12:50 am)

Welcome to the Poser Technical Forum.

Where computer nerds can Pull out their slide rules and not get laughed at. Pocket protectors are not required. ;-)

This is the place you come to ask questions and share new ideas about using the internal file structure of Poser to push the program past it's normal limits.

New users are encouraged to read the FAQ sections here and on the Poser forum before asking questions.



Checkout the Renderosity MarketPlace - Your source for digital art content!



Subject: Smart parenting and posing involving both hands


kuroyume0161 ( ) posted Fri, 12 March 2004 at 12:39 AM · edited Wed, 20 November 2024 at 2:20 AM

If I wanted to take a sword and have it parented to both hands by use of a pose file, how would one go about it? I imagine that it would be necessary to create a separate pose file for each intended figure (M2, M3, V2, V3, and so on). Also, could a figure pose (such as holding the sword in a certain stance) and the parenting occur simultaneously or would these need to be separate poses - one for the sword and one for the figure? Thanks, Kuroyume

C makes it easy to shoot yourself in the foot. C++ makes it harder, but when you do, you blow your whole leg off.

 -- Bjarne Stroustrup

Contact Me | Kuroyume's DevelopmentZone


numanoid ( ) posted Fri, 12 March 2004 at 1:42 AM

Search in the Poser forum for a thread with "parenting both hands". I explain how to do it there. If you download the Aliens rifle figure from www.vanishingpoint.biz, in the read me it explains exactly how to do it with that figure. I am writing a tutorial on it. Be at Vanishing Point soon. I did the poses for the rifle and the person seperately, maybe someone else knows how to do the poses in one.


EnglishBob ( ) posted Fri, 12 March 2004 at 6:05 AM

Attached Link: http://www.renderosity.com/messages.ez?Form.ShowMessage=1645097

You need to scroll down a little over half way to find numanoid's posts.


lesbentley ( ) posted Sat, 13 March 2004 at 12:41 PM

In my original post I missed out step 12. I have deleted this post, and replaced it with a revised version.


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

file_102066.jpg

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.


lesbentley ( ) posted Sat, 13 March 2004 at 1:14 PM

file_102067.jpg

Attached above is an example pz2, using the method described in post #5. The file is made for Posette and the "Long Sword" by btsculptor, which is available in the Renderosity Free Stuff.


kuroyume0161 ( ) posted Sat, 13 March 2004 at 10:08 PM

Thank you both very much for the information!! Sorry that I haven't been responding, but haven't been receiving any "reply" emails from R'osity for some reason. Glad that I decided to check. :) Kuroyume

C makes it easy to shoot yourself in the foot. C++ makes it harder, but when you do, you blow your whole leg off.

 -- Bjarne Stroustrup

Contact Me | Kuroyume's DevelopmentZone


lesbentley ( ) posted Sun, 14 March 2004 at 8:38 AM

The code in post #5 was written for Posette, I very rarely use the millenium figures such as Victoria, but I just checked and found that Victoria2 uses a diffrent naming convention for the inkyChains, V2 uses "inkyChain LeftHand" and "inkyChain RightHand" where as Posette uses "inkyChain rightArm" and "inkyChain leftArm". This would mean that the code in step #13 of post #5 would need to be modified on those two lines to work with Victoria2 (the other mill figures are probably the same).

The code for step #13, when using Victoria 2, would look like this (modifications in red):

actor MYPROP_1<br></br>       {<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     <br></br>               {<br></br>           on<br></br>          }<br></br>   inkyChain     <br></br>              {<br></br>           on<br></br>          }<br></br>   }


numanoid ( ) posted Sun, 14 March 2004 at 6:23 PM

Lesbentley, I agree with your method and it does work better than mine. The only reason why I converted my props to figures is because they had moving parts and I wanted the hands parented to seperate moving parts, and my method also doesn't involve any coding, which some people are afraid to do.


kuroyume0161 ( ) posted Sat, 20 March 2004 at 4:46 PM

My sword is already a figure and I think it's giving me trouble in getting this to work. I can parent the sword to the right hand okay, but if I try to parent the hands to the sword, whether the sword is parented to the figure BODY or UNIVERSE, they won't go there. The best so far is that they get parented to the figure's BODY, not to the sword. Here is the pose to do this. Note that I put the hands on the highest body part in the hierarchy and not the sword BODY since Poser gets confused and makes them parented to the figure's BODY (Michael 3 in this case). { version { number } actor rHand:1 { parent Tsuka_Scale:3 inkyParent Tsuka_Scale:3 } actor lHand:1 { parent Tsuka_Scale:3 inkyParent Tsuka_Scale:3 } figure { addChild rHand:1 Tsuka_Scale:3 addChild lHand:1 Tsuka_Scale:3 inkyChain LeftHand { on } inkyChain RightHand { on } } } Kuroyume

C makes it easy to shoot yourself in the foot. C++ makes it harder, but when you do, you blow your whole leg off.

 -- Bjarne Stroustrup

Contact Me | Kuroyume's DevelopmentZone


lesbentley ( ) posted Sun, 21 March 2004 at 5:32 PM

The method I described in post #5 assumed that the sword is a prop, I don't know if it will work when the sword is a figure. You say "...whether the sword is parented to the figure BODY or UNIVERSE, they [the hands] won't go there." This type of parenting, "inkyParent" is not like a "smartparent" which positions the child, "inkyParent" should attach the hands to the sword, but not position them. The position of the hands must be implimented like a normal pose by setting the joint rotations. As I said in post #5 ". However if you only used that code [in step #13] the arms would probably fly into some strange contortion".


kuroyume0161 ( ) posted Sun, 21 March 2004 at 8:54 PM

Okay, this isn't pretty, but it does work!! :) Here's a procedure to use both hands with a sword FIGURE, in this case using the right hand as the 'goal'. Put Saya (sheath) in Obi (belt) and Sword in hands Procedure: 1. Load "Michael 3" Figure 2. Load "Sword" Figure 3. Apply sword type Pose 4. Unparent Sword from Saya 5. Apply "Sword in Obi - M3" Pose to Saya 6. Apply "Sword M3 Seigan" Pose to Michael 3 7. Apply "Sword Seigan - M3" Pose to Sword 8. Turn on IK for LeftHand 9. Select Left Hand 10. Select Object->Change Parent and set to Sword 11. Position sword using Right Hand and make 'aesthetic' adjustments to Left Collar Basically, Sword is parented to Right Hand and Left Hand is parented to Sword, creating a loop. IK guarantees that the Left Hand adjusts for Right Hand repositioning. There is no foreseeable means to do steps 8,9,10 using Poses since the targets are all 'BODY' and differentiating the numbering (i.e. :1, :2, etc) has no effect. In other words, the M3 figure must be selected to apply the pose, but the BODY of Sword must be the target. Poser can't do this. It is still possible to parent both hands to the sword, but this is still not possible using poses. Must be done manually. Kuroyume0161

C makes it easy to shoot yourself in the foot. C++ makes it harder, but when you do, you blow your whole leg off.

 -- Bjarne Stroustrup

Contact Me | Kuroyume's DevelopmentZone


lesbentley ( ) posted Mon, 22 March 2004 at 10:12 PM

"There is no foreseeable means to do steps 8,9,10 using Poses since the targets are all 'BODY' and differentiating the numbering (i.e. :1, :2, etc) has no effect"

All that follows applies to Poser 4.0.3.126.

You should be able to make a pose file differentiate between diffrent "BODY" actors if you edit the cr2s to give the BODY actors difrent names (but this is just theory), i.e.

BODY
BODYA
BODYB
BODYC


I have not been able to construct a working pose file (so far) that can inkyParent the left hand to a "sword" figure, smartparent the swords BODY to the right hand and and pose everything corectly, but I can set up a pose file that poses both the sword and human figures and can inkyParent the left hand to a sword. That only leaves the step of parenting the sword to the right hand to be accomplished manually. Here is the code I used for the parenting (it's similar to the code used for the prop sword), note that the actor numbers (:#) have been left out as they don't seem necessary.

{<br></br><br></br>version<br></br>       {<br></br>   number 4.01<br></br> }<br></br><br></br>actor Hilt<br></br> {<br></br><br></br>       }<br></br><br></br>actor lHand<br></br>        {<br></br>   parent Hilt<br></br> inkyParent Hilt<br></br>     }<br></br>figure <br></br>        {<br></br>   addChild    lHand<br></br>                    Hilt<br></br><br></br>   inkyChain     leftArm  <br></br>             {<br></br>           on<br></br>          }<br></br>   }<br></br>#---Sword pose starts below this line---<br></br>actor SwordBODY<br></br>    {<br></br>   channels<br></br>            {<br></br>           //etc, etc.

However it seems to me that using a figure for the "sword" rather than a prop introduces unnecessary complications.

Another point, it seems that a normal "parent" relationship can't be applied via a pose file, but "inkyParent" and "smartparent" do work via a pose file. There is however a bug in Poser 4 (and perhaps other versions), if you smartparent a FIGURE to another figure then deleting either figure from the document will cause Poser to crash.


kuroyume0161 ( ) posted Tue, 23 March 2004 at 4:11 PM

Well, I'll try this and see what happens. There are no complications. The 'sword' is a figure - it's has over a hundred morphs, alternate geometry, takes MAT and MOR poses, and has props parented/smartparented to it. Can't do all of this with a prop. :) The problem, to me at least, is that Poser wasn't designed for anything but human/animal figures, basically independent of each other, in a scene with props (parented or not). These days, though, people make all sorts of objects into figures (for the above mentioned advantanges) and parent them all over the place. Seems to me that CL has to redefine the idea of a "figure" and make adjustments accordingly. Not all parented items are "clothes" per se which have conforming properties (similar body parts).

C makes it easy to shoot yourself in the foot. C++ makes it harder, but when you do, you blow your whole leg off.

 -- Bjarne Stroustrup

Contact Me | Kuroyume's DevelopmentZone


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.