Material Conversion (ex. G2F to G9)
I've seen a lot of discussion about this and some people think it's not possible, but I think it is. I could do it myself, but I don't have the time. I'd be willing to do portions of it. It's the DAZ meterial side of it that would take me a while to do. If such a product already exists, please let me know. I've seen a product at Renderosity, but it seems the company is no longer listed and you can't even search for it anymore.
Here's the idea. And let me know if there's a flaw in it.
The first step is getting the figure split along the materials of the older figure. These already exist for G3 and G8 with the legacy figures and the geografts. Otherwise, a program will need to be written to splice the new figure along the material edges of the older figure and calculate the UVs for them. This step is not necessary if legacy figures product comes out for G9. We could just use that. Otherwise, splicing and calculating the UV's along the older material regions will be necessary. There are huge areas around the head that aren't remapped even in the existing legacy UVs for G9 for example.
So here's the main technique. Let's use G2F to G8F as an example. You would export G8F with G8F UVs. You would then export G8F again with the legacy G2F geograft. Then a program would take the UV positions of the first figure and store them as the 3D positions of the second. Z would be set to 0. Polygons would need to be split along material edges. And UV locations would need to be calculated for the new vertices where the splicing is taking place in the geograft locations. Those points don't exist in the original G8F. But that's just interpolation. I could even create such a shape.
So what you get is a 3D representation of the G8F UVs (a flattened G8F that looks exactly like its UVs) but where its actual UVs are from G2F. All you need to do is render each texture for each UDIM if necessary and export them to produce G8F textures.
Now, I could create a flattened G8F figure (of the geografted version). You could easily apply G2F materials to it. The problem is rendering the textures individually. I can do it in Direct X 9, but that's getting quite old by now. I've tried Direct X 12 and it's a nightmare. Maybe I could use OpenGL, but I'd have to start from scratch. The issue here is that you need to render the texture without any lighting. Just use global illumination at 100%. In fact, if you're coding at a low level, there's no lighting involved at all. You just do a simple render to texture and save it.
DAZ Studio can even render the view in OpenGL and save the image, but there's no way to turn off shading from some random light, or rather there is, but it's all black. There's no way to set global illumnation (not the iRay thing, but have textures at 100%). And even then, there'd have to be a way to disable everything else in the material except diffuse. No bump maps, no normals, no glossiness, nothing. Only diffuse. And each map (bump, SSS, etc.) would need to be rendered as a diffuse map individually and exported.
I could probably do it in Unreal Engine. I'm getting quite familar with it, but repackaging that would be gigantic and overkill.
Anyways, posting this in case some creative people get some inspiration. :) Maybe a custom shader for OpenGL could be done in DAZ? Is that even a thing? I have no idea.
I could create a windows executable to produce the flattened gemetry if someone wants to take this up. I can provide the source as well.
To recap:
- Split the destination figure along the material regions of the source figure and calculate new UVs for those new points. (Already done with legacy figures that are available)
- Copy the UV positions of the destination figure into 3D positions of the spliced figure (Z = 0). New points will need to be interpolated and poygons split along material sections.
- Render each type of texture as diffuse (diffuse, bump, normal, specular, etc.) without lighting of any kind.
- Cut up each section for each UDIM if necessary and save textures.
#1 and #2 can be done once ahead of time. These could be separate scripts.
Comments
There are many applications that will bake a texture from one mesh to the other if they are both the same shape, there is no need to rearrange UVs or surface/material grouping.
I tried Blender and it doesn't work. What other software can do this?
Well, I would use modo - but that isn't cheap (now, it was a lot less when I started). I thought blender was an option, but I've not tried. This looks as if it may be relevant - you would need to shape one figure to match the other, the clone shapes should help there https://www.katsbits.com/codex/texture-bake/
I got Blender to "work" somewhat, but it's really not an option. I was actually doing everything right and it still wasn't working. Once you do have a "valid' output, you have to clean up the textures afterwards. What I'm proposing would require no such cleanup and would be a single button click (aside from setting where you want to save the textures and maybe the DAZ material file). With Blender, I had to set a really obscure option to get it to actually produce something viable. Though most of Blender is like that and a lot of basic functionality still doesn't work (like sync UV or selecting objects in the modeling tab, we're talking really basic stuff here). And even if Blender did work properly, the setup is absolutely insane.
Modo is too expensive. I own Lightwave, but it doens't have texture baking. Its UV tools are probably the worst of all the 3D packages out there. I've written many plugins for it that make life a lot easier though. And you can select UV points and the points in the other views shows up automatically. Blender can't do that (again, sync UV is broken, but it's designed broken). A baking plugin wouldn't be too difficult to write in Lightwave, but it would take me a LONG time. Still, I'm thinking a couple Lightwave plugins might be the way to go regardless. One to unwrap the figure and fixup the extra points. And another to just do UV sampling manually. Ironically, Lightwave and Modo are made by the same developers. But Modo can't be purchased directly anymore. There are only subscriptions and I'll never buy that. The personal license doesn't seem to allow you to use it for commercial use. So you can't create a mesh and use it in your own commercial product. Only personal projects though I could be wrong, but I can't be bothered.