Sometimes, The Easy Way Just Will Not Work... »  Show posts from    to     

♥ PosetteForever ♥


Texture knitting - Sometimes, The Easy Way Just Will Not Work...



Nik [ Wednesday, 03 August 2022, 01:53 PM ]
Post subject: Sometimes, The Easy Way Just Will Not Work...
I port a lot of models to Poser-compatible formats, either via FBX or OBJ. I prefer to rip DS DUF and DSF to OBJ using ($$) DSF Tools, as DS UI gives me a prompt migraine. <br /> <br /> One down-side is that DSF Tools does not make a complementary MTL. Not a problem when there's only a few mapped textures, but can get exasperating with more. And, sometimes, it is not obvious which belongs to what... <br /> <br /> I've stumbled across a partial solution, though found a different problem... <br /> <br /> Have you ever opened a DS DUF file in a text editor ? Okay, you may have to un-zip it first. Then it looks like a Poser PP2, MAT or CR2, just bigger... <br /> <br /> Windows' free Wordpad has no problem opening multi-megabyte DUF files, but finding anything within them is a different matter... <br /> <br /> I met this while trying to port an SCG 'Terrain' freebie by Internetmoi. <br /> <a class="post-url" href="https://sharecg.com/v/99181/browse/21/DAZ-Studio/Terrain" target="_blank">https://sharecg.com/v/99181/browse/21/DAZ-Studio/Terrain</a> <br /> <br /> The DUF was ~11 MB, the OBJ that DSF Tools exported was ~4MB. Of the eight (8) mapped PNG diffuse / albedo textures, two had alpha channels, which I saved out using free Irfan View. Yes, you can configure Poser's 'Cycles' nodes to grab the alpha channel from texture, but is messy... <br /> <br /> I've tried to search DUFs for 'Mat' calls, struggled to find the file references in the pages and pages of code following the section title. <br /> <br /> This time, I turned the problem about: I searched for the texture file calls... <br /> <br /> Don't need the full file name, which is fortunate as most were forty (40) characters long, 45 if suffixed with 'alpha'... <br /> <br /> So, I used the last four characters of first texture, searched DUF for its 6328.PNG. <br /> After a couple of hits in the early part of DUF, I got... <br /> <br /> (NikNote: indents suppressed to fit on page...) <br /> "id" : "Mat_6-1", <br /> "url" : "#Mat_6", <br /> "geometry" : "#AL1-terrain2023-3", <br /> "groups" : [ "Mat_6" ], <br /> "diffuse" : { <br /> "channel" : { <br /> "id" : "diffuse", <br /> "type" : "float_color", <br /> "name" : "Diffuse Color", <br /> "value" : [ 0.7529412, 0.7529412, 0.7529412 ], <br /> "current_value" : [ 1, 1, 1 ], <br /> "image_file" : "/F%3A/000000POBELLE000/2025163662_2048x2048_5085786608578006328.png" <br /> <br /> Which tells me this belongs to material 'Mat_6', and Poser may complain as files on G:, not F:... <br /> <br /> Okay, make a note, hunt the next texture call. I ended up with... <br /> mat png has alpha <br /> 0 7908.png no <br /> 1 7124.png no <br /> 2 3332.png yes <br /> 3 6052.png no <br /> <br /> 4 1396.png yes <br /> 5 1256.png no <br /> 6 6328.png no <br /> 7 9224.png no <br /> <br /> I loaded the bare OBJ into Poser, iterated scaling until okay, hand-applied 8+2 mapped textures. But then I noticed the textures were not working correctly. Thought they might be okay when rendered, seems not... <br /> <br /> After trying a bunch of stuff, I shrugged and went to 'Plan_B', Exporting from DS as OBJ+MTL. <br /> <br /> Upside, it worked. And, happily, my prompt migraine was *mild*. <br /> Down-side, I cannot figure what was wrong with the ($$) DSF Tools' export... <br /> <br /> Here's the two versions... <br /> <a href="https://www.posetteforever.com/files/posted_images/680/terraincombo1.jpg" target="_blank" title="Click to open image in new window"><img src="https://www.posetteforever.com/files/posted_images/680/terraincombo1.jpg" alt="Image" width="400" title="Image" /></a>


Powered by Icy Phoenix based on phpBB