Sat, Feb 8, 11:17 PM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2025 Feb 08 9:27 am)



Subject: Great Found 600 free BHV motions(Poser) in case you haven't


  • 1
  • 2
diolma ( ) posted Sat, 10 November 2007 at 2:20 PM

"Would you mind if I posted the script back?"

Mind? MIND??? Of course I don't mind - I positively encourage it:-))
If you've got something working then by all means share it.
If you could also highlight the bugs you found and how to correct them that'd be a bonus.

I'm a programmer by profession, but 1. I'm very new to Python and 2. I threw these scripts together with only cursory testing.

With the help of feedback I can modify the scripts and make a more "professional" job of it.
As with almost all programs/applications, getting the basic algorithm written is usually the easy/quick part.

Making a "water-tight" GUI, adding "fool-proof" error checking and taking care of all possible eventualities (no matter how unlikely) are the bits that take up well over 75 percent of the time..

So everything helps:-)

Cheers
Diolma



electricart ( ) posted Sun, 11 November 2007 at 1:13 AM

I asked because of the copyright, don't want to step on toes....

The bug I found was in the line about "v= (abdXR.value" etc I added .value () to the "waistXR) so it read  v = (abdXR.Value() + chestXR.Value() + waistXR.value()) / 3.0 . the rest of the stuff I found was my own fumble-fingered typing.
The clipboard and microsoft paranoia wouldn't let me post the script from the clipboard with the correct formatting so the file is attached as "G2 spread params".
Looks like Python is very similiar to Microsoft VB so maybe I can get into it.
Thank you for a great script.


electricart ( ) posted Sun, 11 November 2007 at 1:16 AM

diolma,
the last post didn't like the file so it didn't post. How can I get it to you?


diolma ( ) posted Sun, 11 November 2007 at 4:34 PM

Hi electricart

The easiest way to get python scripts to post is to save them as .txt, then attach that. Load your file into notepad, save out again as "YourScriptName.txt" (or "YourScriptName.py.txt").

Yup, it should have been "waistXR.value()". I don't actually need that script 'cos I don't have the G2 characters, but it might be of use to someone else..

Python is a fairly simple language. Try:
http://docs.python.org/tut

to get an idea of the syntax. If you've used VB, you should have no problems with it.
The main difference between python and virtually any other (modern) language I've come across is its line-based syntax and tab-based indentation. But you soon get used to it.

I'm currently toying with the idea of creating a script which will (with some user interaction) correct a lot more of the "errors" that occur in BVH scripts.

My basic idea is to get the user to identify the "Max" and "Min" frames for various (raw) values and give corrected values for them. The script could  then interpolate between those for the whole animation. Also options to spread a single value between two or more body parts (like we've been doing) and to correct the overall Y value.
I also want to let the script save those values out so they can be re-loaded for another BVH file from the same source.

More ambitiously, I'd also like to be able to correct for different limb/body-part lengths, so as to minimise the tendency for some of them to either float into the air or bury the feet below ground.
Also to stop limbs burying themselves into the body. But all that will have to wait - mustn't try to hop, skip and jump before I can walk:-)

Cheers,
Diolma



electricart ( ) posted Sun, 11 November 2007 at 5:56 PM

file_393153.txt

OK, here we are.


  • 1
  • 2

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.