Forum: Poser - OFFICIAL


Subject: Crude tool (application) up for scrutiny:-) .. (Adult flags not required...)

diolma opened this issue on Sep 03, 2004 ยท 12 posts


diolma posted Fri, 03 September 2004 at 4:30 PM

Hi Guys.
I've (almost) finished creating a little app that (I hope) I'm going to find useful.

What I'd like to know is if there's any interest for it by anyone else (as a freebie, of course).
If not, I'll leave it in its rough'n'ready state ('cos I can always change anything I don't like..); if there is interest, I'll spend some time and effort tidying it up:-)

WHAT IT DOES:
It takes an existing prop (.pp2 file) and replaces the custom geometry with that from a (Wavefront) .obj file, whilst leaving the rest of the file (including groups and materials) intact.
In other words, it's an automated cut-n-paste jobbie.

WHY DOES IT DO IT?:
I decided to do this app because of the problems I kept encountering when fitting dynamic clothing to figures other than (or morphed from) the one they were designed for.
What I do is use the (now well-documented, many thanks to PhilC and others) technique to of scaling the clothing and the figure in whatever way is needed in frame 1, restore the figure to normal+morphed size/shape by frame 10-20 (depends) and allow the cloth room to stretch/fit/drape the cloth accordingly.
The problem comes when trying to save the clothing, ready for use in further scenes.
You can't save the new (fitted) clothing as a prop because P5 saves the original (frame 1 version) instead.
You can save the (fitted) clothing as .obj file, and thats fine, except you lose any P5 special stuff, including transparency and material groups (rigid/soft decorated being one of the major problems).
You can spawn a morph target and save the result as a new prop. But then you get problems when re-clothifying, because the morphs get re-applied in each frame of any further change.
You can save the whole lot as a pz3 file, but then you have to add additional frames for any pose changes and wait while the whole fitting is re-calculated before the pose starts acting (trying to do both fitting and posing at the same time can lead into problems..).
So this little app just takes a saved .obj file, copies the revised verts into the a COPY of the original clothing file then saves a new prop.

LIMITATIONS:
Very little testing done (but the resulting .pp2 files load OK. I still need to sort out some "smart-prop" stuff to avoid mis-positioning - see below.)
PC only (uses MFC C++ for Win 2K-pro). Probably won't work with Win 98 or previous.
It makes no attempt to create a .rsr/.png file to go with the result (so you'll just get the shrugging man.. - load then resave in P5..)

METHOD OF USE:
Browse for the relevant original (pp2) file;
Browse for the corresponding (fitted) .obj file;
Browse to (and create/select) a NEW .pp2 file to save to.
Hit the CREATE button. New pp2 will be file created.

ANTICIPATED ENHANCEMENTS:
Ability to exclude/include (via check-boxes):
Any existing cloth-room special groups (constrained, choreographed etc.);
"Smart-prop" parenting.

DISTRIBUTION:
I don't have a web site so:
Anyone interested in the executable, just IM me or e-mail me at diolma2003@yahoo.co.uk
If anyone is interested in extending the code or translating it into (eg) python for other platforms, just tell me and I'll send a zip file containing the source code. (Warning - it's dialogue based, so you'll need MSVC to be able to view all the source properly, and it's not particularly well documented. It's just a little helper-app for my own use:-)
If there are enough replies I'll put some effort into the app, Otherwise it'll just potter along as and when I feel like it 'til it does everything I want (could take months..)

NOTES:
Whilst this mini-app was created for a specific purpose (and the defaults are all set up to reflect that purpose), it could also be used to do the same thing to other Poser (eg cr2) files. I have no idea why this should be of any use, but somebody might have..

Cheers,
Diolma

Message edited on: 09/03/2004 16:31