Forum: Poser Python Scripting


Subject: Moving morphs between different figures

Cage opened this issue on Dec 20, 2006 · 1232 posts


Cage posted Mon, 10 March 2008 at 1:35 PM

I have a thought for trying to simplify correlations between objects.  Now, don't freak out, because this starts out sounding like something you didn't like before (mapping both objects to a sphere).

Say we want to compare two dissimilar heads which aren't easily lined up well for TDMT.  Start with a simplified "head" geometry, a proxy shape to which we can compare both our desired source and target, in order to get common correlations.  Shape this simplified mask as well as possible for both the source and the target (lining up nose, corners of eyes, mouth, etc, for both).  Run the source and target comparisons, each with the appropriate go-between low-res head proxy.  Hypothetically, now, we have both source and target mapped to a common geometry.

Then process the resulting .vwt files to find correlations between the desired source and target, using their common collision locations with regard to the low-res head.  I think we'd need to start with the low-res head triangles that both source and target would have in common.  Then, we'd need to map the target collision points to source triangles.  I think this probably gets back to the parametric part of your point-in-tri code.  I'm thinking of it like using the 2D version I added into the UV code.

Clear as mud?  Basically, we've re-shaped a common geometry for the source and target actors, so we have tri and vertex structure commonalities which we can try to use to correlate source and target through a shared, uh, comparator.  Did I just make up a word?  Am I babbling?

I'm also trying to figure out how to port the point-in-tri code to a .pyd file, or even a compiled .exe or .dll, to see what speed gains can be had.  I'm having some troouble getting a working compiler together for that, and I'm going to have to muddle through trying to learned the basics of C++.  My experiement with popen suggests that a simple command line .exe could be created to do the hard math, and called at need.  A .pyd might be better, in that we could just call it like a Python module.  I'm not sure how to use a .dll in Python.

Anyway, I'm thinking varied thoughts of uncertain utility again....

===========================sigline======================================================

Cage can be an opinionated jerk who posts without thinking.  He apologizes for this.  He's honestly not trying to be a turkeyhead.

Cage had some freebies, compatible with Poser 11 and below.  His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.