baking is a mess (and how to fix it)

Issue #1364 resolved
Alessandro Padovani created an issue

daz studio 4.21.0.5, blender 3.4.1, diffeomorphic 1.7.0.1395

I never baked before so this is my first time, did it because of a request in the daz forum. I used “bake maps“ that’s a great tool, then loaded back with “load baked maps“. Everything fine, apart it’s a mess.

I mean if we look at the nodes we see the plugin adds one custom group for every displacement map. This is not necessary, also because the custom group consists of a single displacement node, so the displacement node can be used instead.

steps:

  1. import a HD figure, I used Victoria 8.1 HD but any is good
  2. bake maps
  3. load baked maps

Comments (8)

  1. Alessandro Padovani reporter

    note. Unless I miss something of course. If we have to make a custom group for some reason, then we can keep the texture out so we just need one custom group. But in this case it seems to me the custom group is really not necessary.

  2. Thomas Larsson repo owner

    The same custom group is also used to load hd morphs from Xin’s plugin, and in that case it is more complex because it can contain several displacement nodes added together. It seems that the scale of each displacement node can be driven by the morph strength, although the code looks a bit fishy and I am unsure if it works. But there was a reason for the custom group and I don’t dare to remove it.

    That all groups are named the same is of course confusing. The group name now includes the material name.

  3. Alessandro Padovani reporter

    If you keep the texture out then it’s possible to make a single custom group for the displacement. To me doesn’t really make sense to make one custom group per texture, it’s not a shell where we have a whole material so in that case a custom group makes sense.

    Let me know, if you really mean it then I’ll close as invalid though I would disagree.

    edit. Just to be clear I mean as below where the height input is added to the displacement group and the texture is out. So a single custom group is needed.

  4. Thomas Larsson repo owner

    If it were only for the baked base map, I agree. But the same group was used with displacement maps generated from Xin’s plugin, and then the node group contains many displacement maps, one for each morph. But I haven’t used the HD morph textures for a long time, and don’t remember. One could probably separate the disp map used to define the character and the disp maps for the HD morphs. The former could probably use the standard displacement node rather than a custom group. Will look into that.

  5. Alessandro Padovani reporter

    I agree for HD expressions a custom group makes sense since it overlays multiple maps, also it’s just one custom group per figure since expressions take the face. The same for the HD body morphs always by the Xin plugin. But, for the standard baked HD it is one map per body part, so in this case custom groups are unnecessary.

    As I understand it we have to distinguish between Xin which requires custom groups because it overlays multiple maps, that’s the HD morphs. And HD baking that doesn’t, that’s the HD shape.

    note. Eventually, “bake maps“ and “load baked maps“ could also be a single operator “bake multires“, doing “bake maps“ + apply multires + “load baked maps“. Just to note that this is the baked HD shape, that’s different from Xin’s baked HD morphs.

  6. Thomas Larsson repo owner

    The HD morph code has undergone a quite significant update. The custom displacements groups are gone completely, and instead the displacement and add nodes are added directly to the material. The old way wasn’t right, because the displacement scales have to be driven individually for the morph displacements, and that wasn’t possible inside the group. Well, not when the group had a scale input which was linked to the displacement scale.

    New textures can now be added incrementally. Thus you could start by adding a few morph textures, then the baked HD textures, and then some more morph textures. However, there is no convenient way to remove textures.

    All displacement and normal textures are collected on the left side. This is somewhat inconvenient if you only add the standard maps, but if you have morph textures too it is noice to collect all HD textures in one place.

  7. Alessandro Padovani reporter

    Commit 606318a works great and far exceeds my personal needs and expectations. Thank you for this nice HD upgrade.

    If nobody has anything to add I’ll mark as resolved.

  8. Log in to comment