Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Dec 02 3:16 pm)
Okay, thanks! It occurred to me that the fix could be made to the raw bvh file if that's simpler than scripting for Poser.
I do already use some very useful scripts by Ockham and Phil C, but this transfer of data from one body part to a different body part in just this way seems not to be out there (unless I misunderstand how some of these can work). Ockham's "Copier" is similar to what I need, in that you can copy a range of frames to another body part, but it seems to work better on like parts (like, Left Hand to Right Hand) and not to different body parts, plus I don't think it blends the frames.
Thanks for considering looking into this!
--Tim
It does not duplicate the pose after adding the values so you might have some changes to make to the script.
I have made it as clear to follow as I can. It uses the current figure , gets the values for each bodypart (hand, forearm, shoulder) then adds the values , then sets the bodypart values , then mooves to the next frame.
I have assumed all frames are keyframes.
I've done a few scripts along these lines, to correct awkward posing in animations etc., so may be able to help. I'm not hugely fluent in Python, but I do have a starting point if nothing else. Let me know if I can help.
Edit: I refreshed the thread before posting, and Mark still got in ahead of me! :P I'll hang around anyway to see how this turns out.
It looks like the pose might look quite the same as the original in all cases after processing--I imagine that's probably a Poser thing--but even working like this is huge! Attached is the first frame of the animation with the wonky forearm and hand (left), and the pose after running your script (right), which looks a little different, but the end frame of this animation which is less extreme shows both arm/hand positions looking nearly identical.
Again, thanks so much! I'll let you know how the full test goes tonight.
--Tim
PS: thanks for the offer of help, too, Bob!
Hey Markschum, last night I tried out the script on a BVH animation I had previously tried fixing by hand (I went back to the original raw file) and it worked great!!! The only glitch was that the Left Shoulder rotated "backwards" to what it should have been, but--tho I don't know anything about code--I fortunately know Poser well enough that I know that the numbers often run opposite on the left vs. right limbs, and with the help of your clear and annotated script, I thought "what the heck" and tried changing the "+" to a "–" on the Left Shoulder rotation, and that took care of it!
Again, thanks SO MUCH for this--it's going to be enormously useful to me! How can I repay your kindness??
--Tim
Congratulations Tim, you are now a qualified Python hacker. ;-)
Mark, our approaches seem to be comparable within the variations of individual style. I used Actor.Parameter(...).Value() to read the values instead of ParameterByCode(...), but what the heck, they both work. Hopefully someone will point out the pros and cons of one versus the other.
I wasn't sue which to use either, the script is longer than it needs to be but I thought more readable for a new coder to hack. I was a bit worried about using the visible parameter and bodypart names because I wasnt sure what figure was being used.
The original poster seems to be happy so put another + on the board ;-)
@tvining , its really not a complicated script, so dont worry about it. If you are in a position to give someone a bit of help and do so that works for me.
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.
I am using BVH data imported from Optitrack Arena software into Poser that works well, except for the Hand Twist and the Forearm Side to Side. What I basically need (I think) is for the values from the Hand Twist to be added to the values of the Forearm Twist (and then the Hand Twist set to zero), and the values of the Forearm Side-to-Side to be added to the Shoulder Twist (and then Forearm Side-to-Side set to zero).
So, for example, if the Hand Twist was -10 and the Forearm Twist was +15, the script should return a value of +5, etc.
Poser theoritically can do this using the animation layers and copy and pasting animation frames around, but it's a major hassle and the results are erratic.
Does anybody know of a script that can do this? Barring that, how I could go about hiring somebody to make it?
Thanks!