Forum: Poser Python Scripting


Subject: WIP: Poser <-> Blender Bridge

adp001 opened this issue on Dec 27, 2019 ยท 92 posts


unrealblue posted Tue, 02 March 2021 at 9:46 PM

I was wondering...

I'm doing some scripting in support of morphs. I've found, "mesh shaping" is easier (for the greater part) in Blender. I want to go back and forth between them.

There is the export posed+morphed obj from Poser. Fine. Over in Blender, I import it, keeping the vert order the same. Again, fine. But, for multiple-actor meshes, of course this doesn't produce a mesh I can conveniently sculpt: breaks at actor boundaries. What I need is a form of "glue" in Blender. I thought of a way to accomplish this:

Effectively, I need a duplicate mesh that has been run through "merge" with a low enough threshold. In un-scaled form, this is about 0.000001 or so. In any case, to "connect" those two meshes, I need isupplemental data. I need a map of new vert to old vert. Each new vert would have one (or more) id's of old verts. After morphing, you would "apply to old mesh" which would simply take the position of each new vert, and push that to the indexed verts. Viola. Then export that original mesh, with new positions that come from sculpting a blender "uni-mesh". Then, in Poser you could simply "load full body morph". It really only cares about vert index and new position.

Right?

To make the map, it could (inefficiently/naively) be done by iterating through each new mesh vert, and find each old vert position that is the same (within the tolerance of the merge). A list (new vert id's) of lists (old vert id's). No holes. Each new vert would be one or more old vert.

Wouldn't have to care anything about details of the Poser mesh. All we're doing is translating that into a Blender unimesh, map new verts to old verts, moving the new verts around, then taking those positions reverse translated back to the Poser mesh, which is exported then imported by poser.

An effective "weld" by using the weld feature in Blender, with additional data of "for each point, which old point(s) are represented by this point"

Or am I being too naive, here?