Create UV Templates directly from Poser



  • @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. ;) https://www.snowsultan.com/seam-guides/

    Yup!

    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 image.show() 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

    0_1506163917392_Capture201709232050.PNG



  • @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 ;-)



  • I should probably look in Poser's installed library more often. :)

    That cube does seem to have un-compacted UV coordinates (it has 682, but needs only 671 - I think...)

    In my opinion, the unnecessarily coloured facets aren't a big problem, more of a cosmetic defect. I suppose they may become confusing on a more complex mesh.

    Let me know if you want me to try making a better box. I think UVMapper Professional should be able to do the job.

    @anomalaus said in Create UV Templates directly from Poser:

    They are indeed the actual facet numbers, though good luck trying to read them on a high density figure ;-)

    That's fine for me, I doubt I would try manually hacking a high density mesh. Even I have my limits. :)



  • @englishbob actually, I think the mesh on that cube is pretty good. 10x10 facets per face = top and bottom faces of 11x11 = 121 vertices = 242 plus 9 rows of 40 vertices = 360 + 242 = 602. Spot on. Texture vertices 11x11 for the centre of the cross = 121 + 5 * (10 x 11) = 671 + 11 for that extra seam would make the difference up to 682.

    Good, not a logic problem then, just a mesh with a surplus texture seam.



  • Could you possibly offer some thoughts on situations when the capability of this script would be useful anomalaus?



  • So, this script will generate the seam guides as in the picture above? I would definitely find that very useful. Looking forward to seeing the finished result.



  • @matb heh, [carefully extracting self from engine bay, so as not to crack bonce on bonnet (harm head on hood)] well, I shouldn't be surprised that there are folks who don't immediately see the facility in everything I choose to waste my time on. ;-)

    If, for instance, Poser happened to have a 3D painting tool (think of the morph brush, but applying texture to a model) which could accurately paint over body part seams, to apply a logo to a t-shirt or paint a transparency map to turn a bodysuit into a bikini, nobody would particularly need a separate application to do such a thing. Since Poser doesn't, at the moment, have such a feature, artists either purchase an app which does what they want (there are some around) or they try to find ways to make use of the tools they do have (MSPain, CorelDrab, Photoslop, or whatever), despite those tools being suited for 2D artworks only. This is where the UV texture templates and seam guides become necessary, so you can line up the edges of textures across body-part/material boundaries in different image maps.

    If you are one of the lucky few who never paints textures or already owns a 3D texturing app, then all of this is internalised and invisible, so you never need to remember where the bonnet/hood release lever hides under the dashboard to check oil or radiator fluid levels.

    Those of us who have been around since Poser 1 have had to make do with what was available. Such habits die hard and become a way of life.

    In the ultimate end, though, this is just about me exercising my python scripting muscles. If that helps anyone else, well that's a bonus. If it's not the new orange for someone, they can just scroll to the next slice of bread. ;-)



  • @anomalaus Thanks for your answer, but perhaps I misunderstand what your script does. I am painfully aware of the problem in creating textures, especially when it comes to painting across seams, and I appreciate the value of creating nice clean UV map templates, but that job is already done by the model's designer before we see it in Poser correct? It looks to me, and this is where I am confused, as though your script creates flattened geometry with UV templates on, which can then be rendered and used as the basis for creating your own maps? Why would I use this script rather than simply importing into a free app such a UVmapper, or a commercial product like Blacksmith or ZBrush where I can simply paint across seams?
    I'm all for useful scripts, I'm just not sure that I properly appreciate what problem yours solves that is not already well solved by other free apps? Forgive me if I am missing some very useful utility to your program.



  • @matb in my earlier replies:

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

    MacOS is my primary Poser platform. No version of UVMapper runs natively on the latest version of MacOS, though the program originated on that platform, since it has not been updated for MacOS since 2006 (when it went commercial and boosted sales by an order of magnitude by converting to Windows)! I delve into Windows 10 via bootcamp (when I can make it work, that is, since it breaks with virtually every MacOS update, wasting days of my time to get it running again) purely for compatibility testing of python scripts in Poser.
    I have yet to HTFU enough to learn sufficient Blender to do UV mapping there, since this script will be functional in less time than it would take me to learn to do that in Blender. I am also unable to contemplate ever being able to afford to purchase software speculatively again, so BS and ZB are out of the picture. I dread the necessary evil of paid upgrades to Poser, as I am addicted to eating regular meals :-/

    re: your assertion:

    I appreciate the value of creating nice clean UV map templates, but that job is already done by the model's designer before we see it in Poser correct?

    Be that as it may, where are the templates for all the props included with Poser, or the freebies you might have downloaded from some long defunct forum? Assuming they are even usefully UV mapped at all (see the box prop which has all faces with overlapping UV maps - can't make six-sided dice with that prop!) Do the templates come with seam guides, for those that want such things? Can UVMapper Lite create seam guides automatically? Or Blender?

    If one owns 3D texturing software, I cannot think of a single reason (except perhaps misplaced pity for my impoverished circumstances, LOL) why you would bother with UV templates or seam guides ever again (perhaps prompting DAZ to blow off SnowSultan).

    Mesh creators who wish to maximise the utility of their products for purchasers of all calibres, create UV mappings and provide the templates so their products can be conveniently re-textured by purchasers, including those whose circumstances preclude their use of free UV mapping apps or the purchase of 3D texturing apps. Seam guides have only ever been provided by after-market vendors like SnowSultan, as they have never, AFAIK till the advent of this script, been automatically generated.

    I am aware that the initial iterations of the script were perhaps confusing in that I chose to demonstrate progress with what I had on hand at the time, i.e. props whose vertices were derived from the texture vertices of the original object mesh, prior to my investigation of the necessary methods to create image files. @fverbaas then mentioned that that interim, developmental step could be useful in actually creating clothing panels which could, IIUC, perhaps be reverse transformed via a morph from the flattened UV template shape into the actual object shape, eliminating the seams, as though actually making clothing from flat cloth panels, an idea which might actually fly, though I've only just now considered it while typing this. 8-O

    The script's current incarnation (though I will not abandon the possibility that someone might find UV flattened props useful) simply creates UV templates with seam guides and optional facet numbering. When I manage to complete the GUI for it, I expect to offer options on whether to colour seams, and display facet numbers. The current script randomly assigns colours to groups and seam facets, and I can imagine some folks would like that process to be deterministic or at least configurable, though that will take some further thought and feedback.

    @matb BTW, please to not read anything into the tone of my responses other than personal frustration that I have failed to explain myself clearly, due to being too immersed in the development process and unable to immediately infer why my walls of text were TL;DR ;-)



  • @anomalaus Thank you so much for taking the time to explain clearly. Perhaps I have been spoiled by DAZ content which always includes seam guides, so I assumed that this was not an issue that might be problematic for people. I'm jealous of your Python scripting abilities. Did it take you long to learn?



  • @anomalaus said in Create UV Templates directly from Poser:
    I dread the necessary evil of paid upgrades to Poser, as I am addicted to eating regular meals :-/

    WTF is wrong with you, man? Just render yourself a pizza, for goodness sake! If you stare at it long enough, you won't feel hungry anymore! ;)