https://www.posetteforever.com/viewtopic.php?f=68&t=4081
-----------------------------------
Nik
Wednesday, 03 August 2022, 01:53 PM

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.

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

I've stumbled across a partial solution, though found a different problem...

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

Windows' free Wordpad has no problem opening multi-megabyte DUF files, but finding anything within them is a different matter...

I met this while trying to port an SCG 'Terrain' freebie by Internetmoi.
https://sharecg.com/v/99181/browse/21/DAZ-Studio/Terrain

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

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.

This time, I turned the problem about: I searched for the texture file calls...

Don't need the full file name, which is fortunate as most were forty (40) characters long, 45 if suffixed with 'alpha'...

So, I used the last four characters of first texture, searched DUF for its 6328.PNG. 
After a couple of hits in the early part of DUF, I got...

(NikNote: indents suppressed to fit on page...)
"id" : "Mat_6-1",
"url" : "#Mat_6",
"geometry" : "#AL1-terrain2023-3",
"groups" : [ "Mat_6" ],
"diffuse" : {
"channel" : {
"id" : "diffuse",
"type" : "float_color",
"name" : "Diffuse Color",
"value" : [ 0.7529412, 0.7529412, 0.7529412 ],
"current_value" : [ 1, 1, 1 ],
"image_file" : "/F%3A/000000POBELLE000/2025163662_2048x2048_5085786608578006328.png"

Which tells me this belongs to material 'Mat_6', and Poser may complain as files on G:, not F:...

Okay, make a note, hunt the next texture call. I ended up with...
mat	png		has alpha
0	7908.png		no
1	7124.png		no
2	3332.png		yes
3	6052.png		no

4	1396.png		yes
5	1256.png		no
6	6328.png		no
7	9224.png		no

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

After trying a bunch of stuff, I shrugged and went to 'Plan_B', Exporting from DS as OBJ+MTL.

Upside, it worked. And, happily, my prompt migraine was *mild*.
Down-side, I cannot figure what was wrong with the ($$) DSF Tools' export...

Here's the two versions...
 [img]https://www.posetteforever.com/files/posted_images/680/terraincombo1.jpg[/img]


