Forum: Poser - OFFICIAL


Subject: Vertex-level editing via Poser Python

Cage opened this issue on Mar 21, 2007 · 42 posts


Cage posted Wed, 21 March 2007 at 12:20 AM

This kind of a spin-off script from the TDMT morph transfer project.  It allows vertex-level morph editing in Poser.

The script will create a set of box props for selected vertices, then adjust a selected morph's deltas as the boxes are dragged or translated.

Here's how it works:

1)  Zero all rotations for the actor on which the script will be used.  If rotations aren't zeroed, you'll get offsets between the boxes and the corresponding vertices.  (If anyone knows the matrix math to overcome this, please tell me how to do it!)

2)  Zero all morphs which you don't want to include in the new morph target.

3)  Press "create selection box" to create a bounding box.  Creation and deletion of the vertex boxes can be slow, and Poser may lag or lock up if too many are in the scene.  So you need to isolate an area of the mesh by positioning the bounding box.  Any vertices on the destination actor which fall within the bounding box will have vertex boxes created.  Meshes with a higher density may work better with smaller bounding box areas.

4)  The vertex selection can be screened further by materials.  To use this option, check the "screen materials" checkbutton.

5)  Indicate the name of the morph which will be affected.  If the named morph does not exist, it will be created.  If it does exist, you will edit the deltas of that morph directly.  Newly created morphs will inherit include the deltas of any morphs which aren't zeroed when the script is run, making it easy to edit a copy of a morph.

6)  Select the actor you want to affect and press the "start morphing" button.  If you've selected materials screening, you can now select which materials to include in or exclude from the selection.  If vertex boxes already exist for the actor, they will be used in the run.  If they don't exist, the script will now create them. 

7)  Now you can position the vertex boxes using the parameter dials or by dragging them in the 3D view.  The corresponding vertices will move with the boxes, setting the deltas in real time for the morph which is being edited.  This is accomplished using a worldspace callback loop.

8)  You can end the callback loop at any time by pressing "end callback loop".

9)  The vertex boxes can be deleted by pressing "delete boxes".

10)  Press "quit" to exit the script.  If you exit by pressing the "x" in the corner of the gui, the callback loop may be left running when the script exits.  (Again, if anyone has hints about overcoming this, let me know....)

That's it.  The vertex box sizes should vary depending on the overall density of the mesh, hopefully making it easier to see what you're doing when the polygons are quite small.  Box creation and deletion can be slow, as I said, so be careful and/or patient.  The script will not run unless there is a selection bounding box positioned for the destination actor.  And the rotations need to be zeroed.  Many limitations.

But it works nicely in my tests, otherwise.  I'm curious about how close this sort of functionality comes to the Poser 7 morphing tool.  I only have P5, so I don't know if I'm recreating a wheel, here.  I'm trying to work out somthing sort of like the Wings "tweak" tool with this, or like what I expected the morph putty tool to be in Poser 5.

If anyone has any problems, questions, comments (or suggestions for fixing the things I mention above) let me know.

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