Forum: Poser - OFFICIAL


Subject: Morph Cleanup Script

Cage opened this issue on Feb 24, 2010 · 592 posts


Cage posted Mon, 29 March 2010 at 2:22 PM

Quote - Just as an aside... the original ray-casting method needed to do a lot of list-building (getting normals, triangulating the mesh, lists of tripolys per vertex, etc) that the closest-vert method doesn't normally need anymore, so a lot of that old (list building) code may no longer be part of the current script (the PYD encapsulated a lot of that into it's own classes/structures)... so to get a non-PYD version of the Hybrid method working (most of the remaining porting work) will be making sure that the code can still supply some of that info and fixing up some of the remaining reliances on the PYD.

I was considering trying to duplicate the basic features of the .pyd, in some ways at least, for the Poser Python port.  Creating a HitPoint class which will contain the weights and the validity of the hit, etc, and returning that to the sending function, or a TriPoly class.  The myMesh class currently in use can be used as a container for the non-PYD versions of the necessary lists and arrays.

Screening out duplicate vpolys isn't to difficult.  That's something I can handle.  :lol:

Quote - #-----------------------------------------------------------------------------------
                    # looks like we still need the math error fix (also on the test above), though I'm
                    # guessing that this only happens when testing identical meshes.  Hopefully it doesn't
                    # come back to bite us.
                    #
                    #if (t < -0.00000022) or ((s+t) - 1.0 > 0.00000006): continue    # point is outside T
                    if (t < -0.00000022) or ((s+t) - 1.0 > 0.00000006):
                        #print vi,(t < -0.00000022),((s+t) - 1.0 > 0.00000006)
                        continue    # point is outside T
                    #-----------------------------------------------------------------------------------
                    #if (t < 0.0) or ((s+t) - 1.0 > 0.0): continue    # point is outside T

Is the above something we may still need to worry about, in this port of the ray-casting back to PPy?

===========================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.