Create UV Templates directly from Poser

  • @englishbob Snow sultan said he stopped making seam guides because DAZ inform him that no one wanted or needed them any more.

  • @anomalaus
    Thank you for the pointer to the definitions. Notepad++ nicely lists the content of the .dsf files. I slowly begin to understand the system.
    The ones I saw were in fact .cr2's with embedded geometry expressed in nanometre precision. UVmap and morphs are in separate (include) files.

  • Woo hoo! In spitting distance now! This version is only drawing black edges on a white background, so far.

    0_1504119393823_Screen Shot 2017-08-31 at 4.54.14 am.png

    V8 (with modesty cube, LOL) and PIL generated UV templates derived straight from the figure (well, at this stage, it's still only a static prop loaded from a .duf file).

    The PIL doco says it will open these temporary files in whatever image viewer the Python build for the OS knows about. On macOS, it's Preview.

    Next step: working out whether I have sufficient logic to colour match seams. Hmmm. I think I'm going to have to derive a list of edges from the facets and colour those edges (or more correctly their facets) which have more than one set of corresponding texture edges...

    I guess I'll have to change the drawing method from lines to actual polygons, if I want to be able to fill specific facets with a pastel version of whichever saturated colour the edges are drawn, a la SnowSultan's scheme.

  • OK, one more river (Any Aussie Crawl fans out there?)

    Here's V4 given the UDIM treatment by detecting that all materials are using the default UV tile and post-processing based on digit underscore prefixed material names assigned to separate UV tiles. All automatic, as was shading colour assignment. Not quite got around to UV seam detection yet.

    0_1504182823467_Screen Shot 2017-08-31 at 10.28.17 pm.png

    This is drawing UV polygons with a black outline and 25% saturation fill with hues equally spaced so the number of materials fills the hue gamut. Not a lot of contrast, but it didn't require user input or any fore-knowledge of the object's materials

  • @anomalaus I am not very clear as to how this would work but it would be nice to create UV maps in Poser for figures and objects, right now I export as objects and import into Cheetah 3d to see the map. It would be nice to stay in Poser. But like I said I am unclear as to how the process would work.

  • It might be because I'm not really a texturing guy, but honestly, I'm not really seeing the point of all this. I thought UV maps were usually made in the modelling program with the figure's mesh. At least, that's how it works forr me in Blender. Why would i want to do this in Poser?

  • @eclark1849 said in Create UV Templates directly from Poser:

    It might be because I'm not really a texturing guy, but honestly, I'm not really seeing the point of all this. I thought UV maps were usually made in the modelling program with the figure's mesh. At least, that's how it works forr me in Blender. Why would i want to do this in Poser?

    Texture artists would probably find it convenient being able to generate the maps from within Poser, it would save hunting for the object file in the runtime then opening it in a modeller or UV software just to generate the maps.

    but I assume that being able to generate the UV coordinates of an imported model with python is in some way allowing anomalaus to further her/his ultimate goal of getting duf models from DS into poser without the DSON plugin, which would be quite an achievement - and it's totally fascinating watching poser daz object files be dismantled ;)

  • @adi I'm not criticizing, I just didn't understand the point.

  • @anomalaus said in Create UV Templates directly from Poser:

    @morkonan UVX from Steve Cox, the original developer of UVMapper has long been obsolete and incompatible with the latest versions of MacOS (last release in 2006). That's where I come from, and why I'm far more interested in a tool available directly within Poser.

    Ah, I see!

    There are other free mappers/exporters, some that are probably fine with a Mac OS. BUT, that's not to say that what you're doing isn't valuable! I think it's pretty darn cool, really. I wouldn't have a use for it, specifically, but I have long wanted a UV export function in Poser. Considering that its almost a "dev tool" now, there's no reason why there shouldn't be one.

    Note: There are some strange practices around actually redistributing uv maps for 3D models, perhaps due to certain reconstruction possibilities. I'm not sure I understand them well, though. But, that could be a concern and why there isn't a native UV export feature in Poser. /shrug?

  • @englishbob said in Create UV Templates directly from Poser:

    @morkonan said in Create UV Templates directly from Poser:

    It'd be really nice to find a way to add "seamguides", though. ie: Like the V4 ones and other supplied by.. uh.. "Lion" somethingorother. Sorry, can't remember the user-name.

    As @anomalaus pointed out, it's Snowsultan you're thinking of. That Lion something or other. ;)


    Sorry... There's a painting of a snow leopard on my wall. So, when anyone say's "snow noun" I immediately think of some sort of snow-cat thing... Somehow, I got "lion" out of that. Aaaaand, that's probably far too much of my muddled thinking processes being revealed at once. :)

    My apologies to the wonderful Snowsultan! (Though, snow leopards are cool, too.)

  • How are things coming along with this, please? I can hardly keep my enthusiasm contained!

  • @Glen85 thanks for your enthusiasm. I have been distracted with multiple projects, working with @willdial 's Genesis3Updater code to produce a native Mac version and stuck in dual-boot hell, trying to get my iMac's windows 10 bootcamp partition updated with the latest Poser 11 so I can test python scripts on both platforms. Windows was proving a complete pain to update with only 1% free space on the 100GB Bootcamp partition I've allocated on my MacOS HD. Every app I've tried (fortunately excluding Poser 11) wants to install things on C:, so it all grinds to a halt.

    Back on the UV mapping, my first attempt at running the script under P11 on Windows gave me a black window in Photos with the message: "it appears the file was moved or renamed". GRRR. Research shows that apparently the method relies on the application associated with the default image file format used by the platform (.png on MacOS and .bmp on Windows) responding with an appropriate handshake to a /wait command from the show() method, which intends to waits until the image window is closed by the viewer app before deleting the temporary file. In Windows 10, Photos doesn't handshake, so PIL deletes the temporary .bmp file before Photos even attempts to open it. The solution appears to be to associate Paint.exe with .bmp files, which does handshake correctly. Figures!

    Anyway, TL;DR

    Here's Andy UV templated in Paint on Windows 10


  • @Glen85 further to the Windows dual-boot saga (sorry to dump on you, I just need to vent for a bit. If your eyes haven't already rolled back in your head, just skip to the end) it's taken me weeks of frustratingly failed attempts to get windows successfully booting again after upgrading to MacOS Sierra, because I forgot that Windows won't always boot if it can't locate a pointing device, and it apparently wasn't seeing my trackpad and kept giving me SYSTEM_KERNEL_SECURITY_FAILURE or some such messages.

    Eventually I noticed the wireless mouse sitting ignored in a corner and something clicked. As soon as I'd turned it on, Windows grudgingly conceded that it might actually try to complete the boot process without endless cycles of "There appears to be a problem, so I'll just reboot for you. M'kay?" </rant>

  • Yikes! Well, thank you for the update! I don't really understand any of that, but good luck with it all! If you need a tester then let me know, but I don't understand booting, coding and all that jazz.

  • @anomalaus apparently High Sierra Has a new file system structure (APFS) and other programs are having problems with it. Propellerheads just released a fix for Reason because High Sierra was damaging files for the program.

  • @ghostship Thanks for the heads-up. I'll definitely want to hold off on upgrading any filesystems to APFS then until I know how it will affect bootcamp partitions. I use the Paragon NTFS for MacOS and HFS+ for Windows products so I have full access to all files on both boot platforms (though I might turn off windows' access to my MacOS boot volume as it writes temporary windows upgrade files there without my express permission, GRRR! I actually had to run Disk Doctor on the MacOS boot SSD after my last Windows 10 boot because of this. Exceedingly Ungood!)

  • Righto, a further blind fumble in random direction. Ignoring a couple of minor logic puzzles left to solve (re: using a single colour for seam facets which share a common vertex. See the corner) I have progressed on colouring texture seams and labelling body parts (well, facet numbering, anyway).

    See below the standard Poser box prop with a script generated UV template applied as a texture.

    0_1506421371939_Screen Shot 2017-09-26 at 7.56.03 pm.png

    Note: the edges with white, numbered facets are not texture seams.

    And the template itself:

    0_1506421460183_Screen Shot 2017-09-26 at 7.49.33 pm.png

    Note: the "mystery" edge, which has pairs of coloured facets, but shouldn't actually be a seam. I will have to delve into the actual object definition and determine whether the texture vertices at this point are identical (some kind of logic fault on my part) or are duplicated (a common fault of many meshes) but with identical texture coordinates.

    The numbering serves the dual purpose of giving me a quick reference into my internal data structures for debugging and tests the functionality of text placement (centred within each facet - not pretty on high density meshes, LOL) on the UV template.

  • @anomalaus Which Poser box prop is that? The one I dug up from my geometries folder, meaning to address your question about the mystery edge, has (geometry) faces which have 64 (mesh) facets each; and each (geometry) face is UV mapped from 0, 0 to 1, 1 such that every face's map is the same. It's quite probable that I've overwritten something along the way, of course.

    0_1506425112364_Poser box UVMapper.png

    But never mind all that, are those the actual facet numbers showing there - as in, the index of the facet definition in the OBJ file? In which case, I want it. There's no other UV mapping utility that I know of which does that, and that knowledge would be invaluable when I'm hacking OBJ files by hand for fun! I have an unusual definition of fun. :)

  • @englishbob it's the one called simply "Cube" in Runtime/Libraries/Props/Primitives/Morphing Primitives/. The object is called D3D_Cube.obz (compressed), so it's a prop from the late Ralph Sessler (Dimension3D). My script gives me these stats for it:

    Geometry has:
    Counted 1200 facet edges
    Counted 80 seam edges
    Num Verts = 602 (602)
    Num TVerts = 682 (682)
    Num Norms = 602 (602)
    Num TSets = 2400
    Num Elems = 600
    Num Sets = 2400
    Num Seams = 80
    Num Sections = 0
    Num Groups = 0
    Num Materials = 1
    Preview, UDIM=1001
    UV Range = ((0.0, 0.99999999), (0.0, 0.99999999))

    No, sorry, my mistake calling it "box", the one you found called "box", with all the cube faces mapped to the same texture vertices was useless for my purposes. It doesn't have enough texture vertices to separately map each face.

    They are indeed the actual facet numbers, though good luck trying to read them on a high density figure ;-) Since I'm choosing to colour facets, rather than edges, any really low-poly prop (think of a cube with just 6 facets) won't be able to show facets bordering seams effectively. My initial display mechanism was to use different colours for the edges of different group facets, so one could fall back to that method for low-poly props.

  • @englishbob well, maybe it won't be so bad. This looks almost useful ;-)

    0_1506432106979_Screen Shot 2017-09-26 at 11.12.12 pm.png

    I upped the template dimensions to 2048x2048 and the seam facets between Genesis8Female's torso and leg look almost comprehensible ;-)