Forum: Poser Python Scripting


Subject: Moving morphs between different figures

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


svdl posted Wed, 20 December 2006 at 4:10 AM

Finding matching vertices: yes, there is a way.

The base idea is overlaying both figures with a cube that is large enough to encompass both figures.
Divide that cube into subcubes. I think a 4x4x4 or 8x8x8 cube grid will work fine.

Now associate a vertex list with each of those cubes. Run through all the vertices of both models once, and assign each vertex index to it's "matching" cube, to be determined by its x,y and z coordinate.

Now if you're going to match a vertex in V1 you'll only have to check the V3 vertices that are associated with the same cube as the V1 vertex. 

By the way, the "cubes" are not actual geometries, they're just space segments.

This technique is a crude form of using an octree.

The pen is mightier than the sword. But if you literally want to have some impact, use a typewriter

My gallery   My freestuff