Forum: Poser Python Scripting


Subject: Moving morphs between different figures

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


Spanki posted Sun, 14 January 2007 at 1:09 AM

Interesting.  BTW, I observed that Poser is returning bad WorldNormals() for vertices at pole locations and this was screwing up the ray projections.  I re-wrote the polygon face normal calculation code and then added another routine to compute (valid) vertex normals based on the (valid) face normals.  I also added a vertex->vertex intersection check back into check_bounds(), because not all of those were being caught.

There's still misses in a few cases... I know of one possible reason (non-planar polygons) which we might have to fix by breaking things down into triangles afterall (which I think we'll need for the weighted average code anyway).  But in the meantime, I'm puzzling over exactly what polyplanes() is supposed to be doing.  I see that the value is being used in the ray intersection code, but I'm not clear exactly what value is needed there (a point on the plane?  a line to the center of the plane?)  I'll have to go look that up unless you can clarify it.  The code is currently finding the center point (average of the vertices) and then multiplying each axis of that point by each axis of the normal for that polygon, but that's not an operation I'm familiar with.

Anyway, I've made various other changes and tried to mark them all with a 'Spanki' in the comments.

Cinema4D Plugins (Home of Riptide, Riptide Pro, Undertow, Morph Mill, KyamaSlide and I/Ogre plugins) Poser products Freelance Modelling, Poser Rigging, UV-mapping work for hire.