Forum: Poser - OFFICIAL


Subject: Seeking a UV-texture transformation tool

Cage opened this issue on Dec 17, 2022 ยท 56 posts


odf posted Thu, 29 December 2022 at 12:53 AM

So, that script... the full URL to the git repository is https://github.com/odf/pydeltamesh. Probably easiest to grab the whole thing as the script uses OBJ reading and writing functions that are in a different file. If you're not a git user, find the green "Code" dropdown and select "Download ZIP".

The script is called makeTextureTransferObject.py and it is in the subdirectory pydeltamesh - so that's two adjacent "pydeltamesh"s in the full path if you're counting. It is smart enough to find its dependencies, so you should be able to run it from anywhere without having to set the Python path.

It has four arguments. The first two are the target and source OBJs in that order, where target means the one with the UV sets you want to transfer to. Then come two specification files, also target first, then source, that tell the script which material zones belong to a common texture map. My specification file for AntoniaA looks something like this:


Body

  skinBody

  skinScalp

  nailsFingers

  nailsToes


Head

  skinFace

  lacrimals

  lips

  mouthInner

  tongue

  teeth

  brows


Lashes

  lashes


Each block starts with a line that gives a name to the texture map. This becomes the new material name for the source (important) and a group name for the target (not important). Then comes the list of material zone that belong to that map. A blank line ends the block. Indentation is irrelevant, it just makes things a bit easier to read. I've left the eyes and some other stuff out here, but you don't have to. Happy to share the specification files I've made for the three Antonia mappings it that helps.

If everything works out, you'll get an output file named transfer.obj that can be imported into Poser. The script has a "-o" option to change the name of that output file. That's it for the script. The magical incantations inside Poser are up next, but first I'll need to eat some dinner.

-- I'm not mad at you, just Westphalian.