Tue, Oct 22, 9:53 AM CDT

Renderosity Forums / Poser Python Scripting



Welcome to the Poser Python Scripting Forum

Forum Moderators: Staff

Poser Python Scripting F.A.Q (Last Updated: 2024 Sep 18 2:50 am)

We now have a ProPack Section in the Poser FreeStuff.
Check out the new Poser Python Wish List thread. If you have an idea for a script, jot it down and maybe someone can write it. If you're looking to write a script, check out this thread for useful suggestions.

Also, check out the official Python site for interpreters, sample code, applications, cool links and debuggers. This is THE central site for Python.

You can now attach text files to your posts to pass around scripts. Just attach the script as a txt file like you would a jpg or gif. Since the forum will use a random name for the file in the link, you should give instructions on what the file name should be and where to install it. Its a good idea to usually put that info right in the script file as well.

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



Subject: "rotate" formula neded


Adom ( ) posted Wed, 19 May 2010 at 1:04 AM · edited Tue, 22 October 2024 at 7:26 AM

Hi,

lFoot and rFoot have IK set "on".
hip is in it's zero position (xyzRot, xyzTran = 0)

now I rotate hip 90 deg and I want the feet to follow that rotation (like they follow when there is no IK switched on) - it means I want to know new xyzTran of both feet + xyzRot.

To make it I need to know relations between center points of these actors - I did such formula already and it is working.
 
Now I'm asking what if hip is rotated ANY angle not only multiplies of 90. How to find xyzTrans and more difficult: xyzRot (since when you rotating p8 figs when passing 45deg zRot becomes xRot and viceversa).

Thanks.


PhilC ( ) posted Wed, 19 May 2010 at 3:31 AM

Why not turn the IK's off, turn the figure, then turn IK's back on?


Adom ( ) posted Wed, 19 May 2010 at 3:58 AM

Hi Phil,

I did it but when the hip gets rotated and figure YTran  axis is not perpendicular to the floor (I mean  some zxRotation is applied) then it is not working.


PhilC ( ) posted Wed, 19 May 2010 at 4:04 AM

What if you rotate the body rather than the hip?


Adom ( ) posted Wed, 19 May 2010 at 4:18 AM · edited Wed, 19 May 2010 at 4:19 AM

Ha,

that is what I want to avoid:)

This is supposed to make animation easier:
load pose 1
load pose 2
now I would like pose 2 to be shifted so the lFoot is in same position and rotation like in pose 1 but the rest of body parts shoud move and rotate acordingly to the lFoot.

Anyway it can be made quite quickly just by turning IK off then adjusting hip so the lFeet overlap with prev. frame (only more or less - accurate is not possible that way)  then switch IK on and in animation palete window copy lFoot keyframes from pose 1 to pose 2 -making it linear - to avoid any sliding.


Adom ( ) posted Wed, 19 May 2010 at 11:15 AM · edited Wed, 19 May 2010 at 11:17 AM

Below you can find a link to short test animation which I did using above method (switching IK on/off and moving/rotating hip actor).

http://www.youtube.com/watch?v=JB01efWTCXg

I spent 10 min to make it - 11 poses in 251 frames ( there is to tunning applied - only one pose following another but shifted to proper position).
 
Note that feet are more or less in steady position - no sliding - the small movement which is vissible can be easly removed after some tuning work.

If I had the script I could make such animation within.... 15 seconds.

The figure I used is Bonga - but unfortunately she is not suitable for animation - her rigging is not so good - that is why you can se some "glicges" in hip area.


markschum ( ) posted Wed, 19 May 2010 at 12:08 PM

I think I would start by looking at  the origin for the foot actor.  That sould let you get close to the position by applying the calculated offset to the BODY actor.

I would the look at orientation and see if that gives me anything useable. Thats an actor property also. 

The only other way I know of is to start at the hip and calculate out the rotations of each body part and its length. 


Adom ( ) posted Wed, 19 May 2010 at 4:21 PM

Thanks markschum, I will try your suggestions - and will come back to this thread in 2 weeks - no internet connection up to 4th of june.


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.