Create UV Templates directly from 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 ;-)

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