Tue, Nov 19, 9:31 AM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Nov 18 10:25 pm)



Subject: Seeking a UV-texture transformation tool


  • 1
  • 2
Cage ( ) posted Sat, 17 December 2022 at 6:50 PM · edited Tue, 19 November 2024 at 9:31 AM

I have two versions of the same object, with identical geometries but differing UV sets.  Both UV sets have the same islands, but these are rearranged and rotated.  I have an existing texture for the first UV set, but need one for the second.

Does anyone know of a tool that can convert the texture from the first object to the second?  I seem to have lost my google-fu, since they modified all the search engine algorithms to use AI to second guess the user.  I've been largely inactive in Poserdom for long enough that I honestly do not know where I might ask such a thing, if not here.  Which is to say, I hope this is not an off-topic question, and I apologize if it is.  (I would formerly have placed a sad & embarrassed smiley here, but I've lost track of how those are used nowadays.)

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


willyb53 ( ) posted Sat, 17 December 2022 at 8:24 PM

If I remember correctly, UVMapper can save out the uv map from one (.uvs) and then read it in and apply to the other obj.

Bill


People that know everything by definition can not learn anything


odf ( ) posted Sat, 17 December 2022 at 9:18 PM

Blender can do it. I can dig out a YouTube tutorial I saw recently if you think that’s an option for you.

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


primorge ( ) posted Sat, 17 December 2022 at 9:26 PM · edited Sat, 17 December 2022 at 9:28 PM

willyb53 posted at 8:24 PM Sat, 17 December 2022 - #4451987

If I remember correctly, UVMapper can save out the uv map from one (.uvs) and then read it in and apply to the other obj.

Bill


willyb53 is right. Free UVMapper Classic can do this too... basically you would import the UV set you want by importing that obj into UVMapper and exporting out a .uvs file from that obj.

You would then import the target obj and apply the saved out uvs file to the target obj. I'm not sure if you need to delete the pre existing UVs from the target or if applying the uvs file will overwrite. 

Which makes me wonder if it's possible to simply copy the vt lines block from the source uv obj and paste into the target obj file (with the original vt block taken out of course) via a text editor... obj files are dead simple to edit.

sp1MOcU8rH9xBz6EIxVUxEhlsH8ohLeNyQfITsAA.jpg

FT0KeqZXiCKQ4JXN9cWdJfhxwUYPvoA1rR9iK4f2.png

Cross post with odf, apologies...


Cage ( ) posted Sat, 17 December 2022 at 10:01 PM

Thanks, everyone.  I may not have been clear about my problem.  I don't need to transfer UV sets between objects, I need to convert a texture graphic designed for one UV set so it can be used with the other UV set.  I need to move the pixels around on the texture map image (not a UV template, but an actual texture), so they fit into the new spots on the modified UVs, right.

Ten years ago I would have spent a month fighting with PoserPython and PIL and cursing a lot, to try to build such a thing.  My programming skills, like my google-fu and my general internet communication skills, are pretty rusty these days.  Dang.


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


odf ( ) posted Sat, 17 December 2022 at 10:12 PM

I reiterate, Blender can do what you want. :-)

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


primorge ( ) posted Sat, 17 December 2022 at 10:25 PM

Cage posted at 10:01 PM Sat, 17 December 2022 - #4451992

Thanks, everyone.  I may not have been clear about my problem.  I don't need to transfer UV sets between objects, I need to convert a texture graphic designed for one UV set so it can be used with the other UV set.  I need to move the pixels around on the texture map image (not a UV template, but an actual texture), so they fit into the new spots on the modified UVs, right.

Ten years ago I would have spent a month fighting with PoserPython and PIL and cursing a lot, to try to build such a thing.  My programming skills, like my google-fu and my general internet communication skills, are pretty rusty these days.  

I know how I would do it.


Cage ( ) posted Sat, 17 December 2022 at 10:25 PM

odf posted at 10:12 PM Sat, 17 December 2022 - #4451993

I reiterate, Blender can do what you want. :-)

Aha!  I am interested.  Very interested.

Can you tell me anything more?  My version of Blender is from... maybe 2008.  My computer, for that matter, is from 2011, always offline and running Windows 7.  My version of Poser is PPro14.  Cage is super-way out of date.  Which makes me wonder whether I can run the latest versions of Blender.

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


odf ( ) posted Sat, 17 December 2022 at 11:03 PM

Well, here's the tutorial: https://www.youtube.com/watch?v=wsO1eozb1Qk

My previous computer was from 2014 and couldn't run recent versions of Blender. Then again, it was running Linux, which tends to aggravate driver issues. Myself, I haven't used Blender in ages before getting that new computer two years ago, so I have no idea which version one would need.

At any rate, the method relies on two things: one, Blender can "bake" a node-based texture into an image map, and two, it can use different UVs in different nodes of the same shader, so it can use on set of UVs to generate a texture and another one to bake it to.

The part that's missing from the tutorial is how to load to different UVs from files and apply them to the same geometry (in the tutorial, one is generated from scratch right within Blender). In theory, that should be easy and obvious, but with Blender, things rarely are.

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


FVerbaas ( ) posted Sun, 18 December 2022 at 10:11 AM · edited Sun, 18 December 2022 at 10:15 AM
Forum Coordinator

Cage posted at 10:01 PM Sat, 17 December 2022 - #4451992

... I need to convert a texture graphic designed for one UV set so it can be used with the other UV set.  I need to move the pixels around on the texture map image (not a UV template, but an actual texture), so they fit into the new spots on the modified UVs, right.


An all Poser solution is to apply your source image to the ambient or (better) altDiffuse channel of the texture of a 'cloth plane' and apply magnets, masks and morph brush to rearrange the uv's as you need them when viewed by a top camera with long focal distance. Then render to get the new map.

In my freebies here there is an all-poser solution that applies the technique to morph V4 face textures to suit Project Evolution: face-texture-converter

It comes set up for that specific task, with some specific bells and whistles to match tone etc. so it looks more complicated than it is.

It takes some time to set up, but once it is set up for a uv conversion like V4->PE it can do any source image swapped on the source pane. 


Cage ( ) posted Sun, 18 December 2022 at 1:59 PM

FVerbaas posted at 10:11 AM Sun, 18 December 2022 - #4452023

Cage posted at 10:01 PM Sat, 17 December 2022 - #4451992

... I need to convert a texture graphic designed for one UV set so it can be used with the other UV set.  I need to move the pixels around on the texture map image (not a UV template, but an actual texture), so they fit into the new spots on the modified UVs, right.


An all Poser solution is to apply your source image to the ambient or (better) altDiffuse channel of the texture of a 'cloth plane' and apply magnets, masks and morph brush to rearrange the uv's as you need them when viewed by a top camera with long focal distance. Then render to get the new map.

In my freebies here there is an all-poser solution that applies the technique to morph V4 face textures to suit Project Evolution: face-texture-converter

It comes set up for that specific task, with some specific bells and whistles to match tone etc. so it looks more complicated than it is.

It takes some time to set up, but once it is set up for a uv conversion like V4->PE it can do any source image swapped on the source pane. 

I guess this is the "UV morphing" idea that was mentioned some years ago, in the Antonia thread?  A couple of people tried to explain it to me in private messaging, a couple of years ago.  I never quite understood.  [Laughing at self smiley would go here.]  Thank you for your link.  I will check it out.


What does it mean when one sees "Heads Up! This user's messages are blocked from your view." in a thread?  Are we blocking one another now?  Seems like a way to create discussions full of holes & gaps.  The internet has gone all pear-shaped, since the advent of these wander-phones.

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


hborre ( ) posted Sun, 18 December 2022 at 4:17 PM

That's been happening with primorge with several others including me.  Something must be up with his profile because he's the only one that has been happening to.


Richard60 ( ) posted Sun, 18 December 2022 at 10:13 PM

You could have blocked the user by mistake.  Normally if you find a user that you don't want to read what they post you press the little speaker icon next to the yellow info icon.  then you will see that you have this user ignored.  If you see the Heads up you can click on the unignore this user and you will then see their messages.  

Poser 5, 6, 7, 8, Poser Pro 9 (2012), 10 (2014), 11, 12, 13


Cage ( ) posted Sun, 18 December 2022 at 11:04 PM

Ah, so I need to be careful where I click, as I scroll a page.  That would explain the matter.  I often fidget-click while reading, not paying attention to where the cursor is when I click.  And I should not do that, I guess.

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


EnglishBob ( ) posted Tue, 20 December 2022 at 10:50 AM · edited Tue, 20 December 2022 at 10:53 AM

Here's another option: a stand-alone Windows utility which is fairly ancient and should work on any machine.

http://www.uv2uv.spacymen.com/

It does exactly what you want, assuming I've understood you properly. The inputs are two OBJ files composed only of triangles, with your source and destination UV mappings; and a texture map for the source OBJ which has to be in BMP format. The output is the map transformed to fit the destination OBJ, also in BMP format.

Converting back and forth is an extra few steps, but easy enough to do. UVMapper will triangulate the input meshes for you; you don't have to keep those interim files of course.


Cage ( ) posted Tue, 20 December 2022 at 11:24 AM

Woohoo!  Thank you, EnglishBob!  This one seems straightforward enough for me to try it and report back later today.

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


Cage ( ) posted Tue, 20 December 2022 at 2:42 PM

The uv2uv program does exactly what I need, and this user found its website delightful, with the frame and the program logo that looks like it might have been made in Amorphium or something.  Really lovely.  This saved me, potentially, hours of repainting hair textures.  All I had to do was pull the resulting textures into Modo, so I could expand the UV seams.

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


EnglishBob ( ) posted Tue, 20 December 2022 at 6:20 PM · edited Tue, 20 December 2022 at 6:22 PM

Glad to have been of service! I tend to prefer small, simple utilities that do one thing - that said, I'm intrigued to hear that Blender can do it. Is there anything that Blender can't do? (Not trying to start a challenge, by the way.)

Off-topic, you might like to consider editing your signature block at some stage. Not that I mind being thanked for things, but it's vaguely embarrassing when I stopped doing those things three years ago. :) This is where you go to do that: https://www.renderosity.com/settings/forums


Cage ( ) posted Tue, 20 December 2022 at 8:03 PM · edited Tue, 20 December 2022 at 8:06 PM
The uv2uv program works wonderfully with my kludgetacular homemade hair props, with which I kept the same mapping and only translated and rotated the islands.  Really quite lovely.


It fails a more challenging test rather drastically.  An attempt to convert an Antonia Standard texture to the A-mapping made a real mess.  I suspect the different grouping of the two Antonia obj files throws off the polygon, tri, and UV indexing.  I'll try prepping the Antonia files, for a better test.


EB, your avatar image reminds me of the little white dot that would appear, as the old CRT televsions were shutting down.  As Neil says, "It must be a really old telly."

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


EnglishBob ( ) posted Wed, 21 December 2022 at 10:23 AM · edited Wed, 21 December 2022 at 10:24 AM
Cage posted at 8:03 PM Tue, 20 December 2022 - #4452268

It fails a more challenging test rather drastically.  An attempt to convert an Antonia Standard texture to the A-mapping made a real mess.  I suspect the different grouping of the two Antonia obj files throws off the polygon, tri, and UV indexing.  I'll try prepping the Antonia files, for a better test.

Agreed, you might try saving your triangulated interim OBJ with only one group. I've only ever used uv2uv on a single-group mesh, and it was hair, coincidentally.

EB, your avatar image reminds me of the little white dot that would appear, as the old CRT televsions were shutting down.  As Neil says, "It must be a really old telly."

That was precisely my inspiration - I was feeling grumpy with Rendo and didn't see why they should have the benefit of my quite handsome self portrait. And yes, I am old enough to remember when TVs did that. The scanning circuitry shut down first, but there were still electrons being emitted from the cathode which hadn't cooled down yet, and still some juice in the EHT capacitor as anyone who's touched one before it was completely discharged will attest. :D 


odf ( ) posted Wed, 21 December 2022 at 6:18 PM

Not that I've tried anything in practice yet, but I think overlapping UV islands will be problematic for all of the methods mentioned so far. Probably best to convert the target UV set to UDIMs first and then, if the tool used does not support UDIMs directly, convert the texture one tile at a time with the necessary adjustments done based on the UDIM version of the UVs. I hope that makes at least a little bit of sense.

At any rate, since Antonia 1.3 no longer supports the old UV mapping, I've been considering converting some of the textures available for Antonia-A to the standard UV sets. Not sure yet which method I'll try (Blender, an automated variant of FVerbaas' Poser-only method, or an external tool), but if I get anything working, I'll report back here.

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


DCArt ( ) posted Thu, 22 December 2022 at 11:48 AM

Cage posted at 2:42 PM Tue, 20 December 2022 - #4452246

The uv2uv program does exactly what I need, and this user found its website delightful, with the frame and the program logo that looks like it might have been made in Amorphium or something.  Really lovely.  This saved me, potentially, hours of repainting hair textures.  All I had to do was pull the resulting textures into Modo, so I could expand the UV seams.

What version of Modo do you have?   While I haven't used them yet, I'm thinking that the Baking Tools (in the Game layout toolbox) might allow you to project textures from one model to another. 

Working with Bake Items and Baking Tools (modo)



Cage ( ) posted Thu, 22 December 2022 at 1:31 PM

Ooh.  Thanks, DCArt.  I have Modo 302, purchased during a short-lived period when I actually have money to spend on such things.  I will have to see if my version has the tools to work with your link.

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


DCArt ( ) posted Thu, 22 December 2022 at 1:43 PM · edited Thu, 22 December 2022 at 1:45 PM

May not go back that far. I think that's the first version I got and I can't remember it being there.

Edit: Looks like it was introduced in Modo 10



odf ( ) posted Fri, 23 December 2022 at 5:27 PM

I just learned that apparently DAZ Studio has a built-in (?) tool for this, see video here: https://www.youtube.com/watch?v=YxE5Lfkid1M.

I haven't tried it or watched the video with full attention, so I'm not sure what the limitations are. But they do address overlapping UV islands by letting the user assign material zones to "templates" and then baking one image per template.

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


odf ( ) posted Sat, 24 December 2022 at 2:22 AM

Update: I tried the DAZ tool on Antonia using my somewhat dated version of Studio 4. Unfortunately, the results came out all scrambled. Since I'm not a DAZ user, I won't be digging any deeper.

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


odf ( ) posted Mon, 26 December 2022 at 12:00 AM · edited Mon, 26 December 2022 at 12:01 AM

Content Advisory! This message contains nudity

Over the holidays I've made some progress automating the Poser-based solution FVerbaas described. I can't call it Poser-only anymore because I use a stand-alone Python script to create a transfer object from the two versions of the original geometry. Load that into Poser, load the textures, do a bit of extra fiddling (some of which I can also delegate to the script to make things easier) and render the different texture tiles one by one. The image shows one of BlueEcho's textures for the AntoniaA UV sets converted to the standard UVs.

WM3T6xfND4NrIcMSaVol2TGH0r3XdwqNw67XPdVs.png

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


FVerbaas ( ) posted Mon, 26 December 2022 at 9:42 AM
Forum Coordinator

Looks good! 

Any plans to do same for the V3 mapped version? That would bring Tony a plethora of skins. Some may have baked highlights as customary in the day, but still useful.


odf ( ) posted Mon, 26 December 2022 at 3:25 PM
FVerbaas posted at 9:42 AM Mon, 26 December 2022 - #4452519

Looks good! 

Any plans to do same for the V3 mapped version? That would bring Tony a plethora of skins. Some may have baked highlights as customary in the day, but still useful.

Yes, that has crossed my mind. I think I'll first have to shop for an interesting V3 texture for testing, though, because I don't think I've got one of those lying around.

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


odf ( ) posted Mon, 26 December 2022 at 4:04 PM · edited Mon, 26 December 2022 at 4:04 PM

Ah, I misremembered. Turns out I have a handful of V3 textures to choose from. I still might have a look around for something more unusual, so that I'm more motivated to do the testing. 😁

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


odf ( ) posted Mon, 26 December 2022 at 6:50 PM · edited Mon, 26 December 2022 at 6:54 PM

Content Advisory! This message contains nudity

As a quick test, here is Antonia 1.3 wearing the Sophie texture for V3 by 3dStrike. Some visible seams, as expected. I imagine the quickest and dirtiest fix would be to use a background that approximates the skin color when rendering out the transferred textures. Anyway, I think we have proof of concept. Also, I'll be happy to share that Python script once I've made some improvements to it.

M2RSp8CFFp2hPnVipS5vobzpenChkUbc9uDPtiIS.png

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


hborre ( ) posted Mon, 26 December 2022 at 7:05 PM

If this is rendered in Poser, did you set the skinning to unimesh?


odf ( ) posted Mon, 26 December 2022 at 9:56 PM
hborre posted at 7:05 PM Mon, 26 December 2022 - #4452553

If this is rendered in Poser, did you set the skinning to unimesh?

Yeah, Poser with unimesh skinning. It's definitely the texture islands being a tad too small, not SSS and suchlike. Shouldn't be too difficult to fix, just pondering the easiest way for both the implementor and user at the moment. 😄

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


odf ( ) posted Tue, 27 December 2022 at 12:58 AM · edited Tue, 27 December 2022 at 1:00 AM

Content Advisory! This message contains nudity

Here's another test render, this time with Morris' HyperReal texture, showing more clearly that the issues are at the texture seams, not the body part seams.

CnF2oWpD5hw7gv2wQSzGnFO9IfeKL6nVXWYgtHrH.png

I think it would be relatively easy to postprocess the textures after rendering them out to produce some "bleeding" of the texture islands into the surrounding empty texture space, and there are probably tools that can do it automatically. But that's an extra step for the user, which is a bit annoying. So ideally my script would create the transfer object in such a way that the bleeding is produced automatically when rendering out the converted textures. That's a little bit more involved than the postprocessing but should still be doable. Mostly a question of whether I can be bothered...

Anyway, I've made the other improvement, which was to "UDIMify" the texture tiles so that when the transfer object is loaded into Poser, they're nicely separated as shown below. Much easier to work with.

1ENkyo5s6NpR1ItNJlyyvyck4aMCO8EXPewavSg7.png

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


FVerbaas ( ) posted Tue, 27 December 2022 at 4:39 AM
Forum Coordinator

What if you process a V3 uv template and compare the result with Antonia's? That should give you an idea of how to solve.

When there is a shift of the uv islands to one side there may be a rounding off error.  

When the uv islands are a tad too small some logic is needed to grow the uv islands a bit.

Allow me to give some idea for this: A seam means a 3D vertex is represented by more than one vertex in 2D, so that's a way to identify uv island edges.

Orientation of vertices around a facet follows right-hand rule so in the morph target an edge leading from one edge vertex of a facet to another needs to be shifted perpendicular to that edge, negative normal direction. To avoid doubles this shift should not be done for the last edge vertex of the facet because that one will have it's shift with the adjacent facet.  


FVerbaas ( ) posted Tue, 27 December 2022 at 4:55 AM
Forum Coordinator

Addition: Growing the target uv islands, or shrinking of the source islands of course can be implemented as morphs in the object.  


Cage ( ) posted Tue, 27 December 2022 at 10:48 AM · edited Tue, 27 December 2022 at 10:49 AM

What you're seeing is a problem I've had with Modo and texture painting, for years.  Modo has a built-in feature which extends the pixel-colors at the UV seam edges by an unspecified increment, which has always solved it for me.  As reported above, I had the same issue and solution for uv2uv.  I assume it's some sort of float precision issue, with the various UV methods being more precise than Poser prefers about finding the edges of the UV islands, but I can only guess.

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


DCArt ( ) posted Tue, 27 December 2022 at 2:47 PM · edited Tue, 27 December 2022 at 2:52 PM

The solution to getting rid of the seams is to extend the textures out beyond the UV template boundary. Example of bleed on head texture shown below.

A "bleed" of 10 pixels for a 2K texture, and 20 pixels for a 4K texture is usually sufficient enough to get rid of those seams.  Texturing software such as Substance Painter or ZBrush, as well as other 3D software programs that have texturing capabilities usually have a setting to control the amount of bleed. 

FDXuJlJVabGcTELxXp5t6uWRSevLju6AudtwUVMg.png


I'm not sure that scaling the texture would be the optimal solution because then you'd run the risk of texture "landmarks" not falling in the right places. For example, nipples wouldn't land right on the torso, and eye, nose, and lip details may no longer land in the right place. 



odf ( ) posted Tue, 27 December 2022 at 5:03 PM · edited Tue, 27 December 2022 at 5:07 PM

Content Advisory! This message contains nudity

I agree with everything said above. This is the same issue texture painting software runs into, but since we're tricking Poser into a texture painting role here, the usual affordances for working around the problem are not readily available.

Here's another test render with the HyperReal texture, this time after extending the texture, as DCArt puts it, in Gimp with the help of the erode function. So that's the postwork option I mentioned above, as opposed to the option of tweaking the conversion object produced by my script with the method so beautifully explained by FVerbaas.

K2fQzbVBrzeUitwk7fEg2rnyqR7pyD39udrZ3cND.png

Honestly, since I don't have that many textures lying around that I might want to convert to a different UV mapping, I'm quite happy with that solution for my personal use. Happy to do a bit of extra work though if anyone is keen on using this method in anger.

The script is on my github (same username as here) under the pydeltamesh repository just in case someone's curious. It's got the snappy name makeTextureTransferObject.py. 😁 Hit me up for the details on the process if you think it might be useful to you.

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


Cage ( ) posted Wed, 28 December 2022 at 9:04 AM

I am interested in the script and your process, odf, but I am about ten years behind many of you, in terms of technology and resources.  I guess that means I would like to understand your process, in hopes of adapting it for use with Poser Pro 2014.  I might be able to run a Python 3 script on one of my Linux installations, assuming the script is a standalone that doesn't require Poser 12.  Beyond that, I wonder whether this new UDIM business everyone seems to love nowadays is at all compatible with PPro14.

Will any of this work for a backwards user like myself, or am I too short to ride this roller coaster?

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


odf ( ) posted Wed, 28 December 2022 at 5:32 PM

Coolio, I'll clean up the script a bit then and write down some instructions when that's done. No worries about the technologies. The script is standalone and should work fine with either Python 2 or 3, but I'll double-check that. I've used the same strategy for making Poser render out texture map back in 2010-ish, so your Poser Pro 2014 will do just fine.

UDIMs have been working nicely with Poser since at least Poser 6, probably earlier, although we didn't call them UDIMs then (at least I know I hadn't heard that term). I was told back then that some of the other tools that people liked to use didn't, which is why Antonia's original UVs are not using UDIMs. But no part of the process actually requires UV manipulation as such, so there wouldn't be a problem even if your Poser version couldn't handle UDIMs.


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


Cage ( ) posted Wed, 28 December 2022 at 6:34 PM

In the posts where various users have referred to UDIM, it seems like those long, composite textures  show up a lot.  If the process is combining all of the textures into one long strip, it seems like that would make texture editing and modification a hellish sort of process.  I guess I'm wondering whether those strip-images illustrate the staggering of overlapped UV sets or an actual merged texture-on-a-strip.

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


odf ( ) posted Wed, 28 December 2022 at 7:45 PM
Cage posted at 6:34 PM Wed, 28 December 2022 - #4452652

In the posts where various users have referred to UDIM, it seems like those long, composite textures  show up a lot.  If the process is combining all of the textures into one long strip, it seems like that would make texture editing and modification a hellish sort of process.  I guess I'm wondering whether those strip-images illustrate the staggering of overlapped UV sets or an actual merged texture-on-a-strip.

It's just the staggering of overlapped UV sets. The textures are still created and edited separately. The long composite ones would just be previews. They won't be rendered out into files like that.

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


Cage ( ) posted Wed, 28 December 2022 at 9:02 PM

Good to know.  Thank you.

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


odf ( ) posted Thu, 29 December 2022 at 12:16 AM · edited Thu, 29 December 2022 at 12:17 AM

Content Advisory! This message contains nudity

Script is looking good now, I think, and I've tested it with both Python 2 and 3. So I'll start writing up the process in a minute. In the meantime, it occurred to me that we can now also make V3 wear Antonia's textures.

M4Gf2mPY7yTqr6VpHkZbs9yP41DLAUGvwxArqbLj.png

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


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.


odf ( ) posted Thu, 29 December 2022 at 2:06 AM · edited Thu, 29 December 2022 at 2:06 AM

Now in Poser:

- Change the units to native Poser units.

- Create an empty scene with no lights. 

- Import the transfer object created by the script. In the import dialog, uncheck "centered".

- Switch to the front camera, then in the settings for the front camera, set all dolly and rotation values to 0, and set all scaling values to 100%.

- Set the render dimensions to your intended texture size, say 2048 by 2048.

With the preview set to texture shaded, I now see something like this:

NBW8XqoTkTXZI6xadQ9o3wWauxALc5S8Eh6FG8tW.png

Now it's time to start loading the source textures. In the material room, select the transfer object and for each of the material zones create a material that looks something like this:

8zzsHkdGzFWxkfQA9n2zdOyMTfXYPPAV9tdBz6XJ.png

Lights are off, so diffuse and specular shouldn't do anything, but I'm setting them to black anyway to be safe. :-) But the main thing is to plug the texture map into the alternate diffuse. Thanks to the material zone translation done by the script, the transfer object should have a single material zone for each texture map. Here I've loaded the arms and legs maps from the Toni texture, but not yet the body map.

Once all textures are loaded, go back to the pose room. It's now time to render out the individual texture maps. Start with the front camera DollyX set to 0, render, save the file, increase to 1, render and safe again, and so forth until all the maps are rendered. Here's what I see in the preview for DollyX = 1:

fosKPDWvODCD4hECQHGs0th9nMOIbhyOOibXIFCq.png

I can't say much about render settings. SuperFly seems to produce sharper output for me than FireFly, but that might just be my lack of FireFly skills. When in doubt, you could just try rendering at a higher resolution and scaling down the result later.

That's it for Poser. The final step is adding a texture bleed to get rid of the visible seams.

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


odf ( ) posted Thu, 29 December 2022 at 2:15 AM

There are many methods for adding a texture bleed, so I'll just briefly describe how I do it in Blender. Similar methods may work in other 2d graphics programs, or one might use built-in functionality in a texture painting software.

0) While still in Poser, make sure to render on a transparent background and save as PNG so that there's an alpha channel.

1) Load the image into Blender.

2) Duplicate the layer.

3) Select the bottom layer and remove the alpha channel. Now the bottom layer has a white background, while the top one still has transparency.

4) Still in the bottom layer, apply the "Erode" filter a few times. This will "bleed" the texture into the white background. It will also destroy the texture, but we still have the original in the top layer.

5) Make sure the layer mode for top layer is set to "Normal", flatten the image and save it.

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


odf ( ) posted Thu, 29 December 2022 at 2:22 AM

PS: If anyone feels the urge to take my script and turn it into a more user-friendly tool for Poser with fewer manual steps, please be my guest. Consider everything in pydeltamesh as being under the Apache License 2.0, even if it doesn't say so on the tin.

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


hborre ( ) posted Thu, 29 December 2022 at 8:45 AM
@odf: did you mean "load into GIMP"?  You mentioned it earlier in the thread and I just wanted to verify that there is a mistake in your instructions.


odf ( ) posted Thu, 29 December 2022 at 1:32 PM · edited Thu, 29 December 2022 at 1:35 PM

hborre posted at 8:45 AM Thu, 29 December 2022 - #4452676

@odf: did you mean "load into GIMP"?  You mentioned it earlier in the thread and I just wanted to verify that there is a mistake in your instructions.

Yes, thanks! It’s Gimp, not Blender. Stupid brain of mine getting its wires crossed.

The GNU image manipulation program is what I‘m using.

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


  • 1
  • 2

Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.