Inject HD Shape (to Xin and Thomas)

Issue #438 resolved
Alessandro Padovani created an issue

With the last release the HD addon by Xin has become extremely fast. It is now possible to generate a HD mesh in just a few seconds. This opens up new possibilities.

Specifically, below it's a procedure to "inject" the HD shape into the base mesh. That will use the dhdm to generate the multires. The advantage is that's much faster than the HD exporter, and it doesn't get issues with the daz geometry editor and/or geografts. Plus we don’t need a separate HD collection anymore. The idea is to get the procedure into a "Inject HD Shape" tool that does the steps for the user. May be this fits better the HD addon side.

steps:

  1. Import the base mesh with the dbz option. This will get the base shape both for the mesh and the armature.
  2. Generate the HD mesh with the HD addon (HD mesh from base), without transfer rig.
  3. Load the HD shape (HD shape key from morph). Please note that we have to get the dhdm since the dsf is already baked in the dbz.
  4. Apply the generated HD shape key. That is, first do object > apply > visual geometry to mesh, then delete all shape keys. This is necessary for multires to work.
  5. Add a multires modifier then unsubdivide.
  6. The multires gets the same vertex order as the base mesh, so we can copy vertex groups and parent to the armature.

Below an example with Mutation for G8F that I got to work fine.

Comments (15)

  1. Alessandro Padovani reporter

    I’m not sure I was clear enough. I mean the user would select the base mesh, then use the inject tool specifying the dhdm and subd level. Then the tool will do steps 2-6 and delete the base mesh that’s no more necessary.

  2. Xin

    I will look into creating an operator for this. The “HD mesh from base shape and morph” already does something close to this (basically steps 2, 3 and 4 combined, provided the base mesh is in rest pose). It would only be a matter of adding the multires and duplicating the rig/vertex groups.

  3. Alessandro Padovani reporter

    Xin, version 7a works great I can convert the base version to multires HD in a breeze, then import expressions on the multires version with diffeomorphic, so it seems working and fully compatible here.

    Below an example with mutation that I used as test.

    steps:

    1. import mutation for G8F at base resolution
    2. select the dhdm morph
    3. generate the HD mesh with the “rigged with multires” option
    4. import expressions

    As for the HD jcms I’m not sure to understand what I have to do. When I try I get an error “no morph files selected”.

    steps:

    1. import G8F at base resolution
    2. import jcms
    3. generate the HD mesh with the “rigged HD” option

    edit. As a minor note, I see the addon gets version 0.14 in the panel, may be you could use the same instead of 7a just to be clear as for the version number.

  4. Xin

    For the jcms you need to use the “HD shape key” operator with “Morphs” as “source”. Then select the generated HD as the HD mesh.

    Then select the JCMs in the morph lists. Here you have to select the .dsf files (not the .dhdm ones, those are included by the .dsf already if they exist). You create one group for each JCM you want to import. Then click the button (remember that the driven jcms must exist on the base mesh for the drivers to be created on the HD mesh too).

  5. Xin

    I uploaded the fixed version in the other Issue. That one should work if you follow the instructions from the previous post.

  6. Alessandro Padovani reporter

    Xin, I followed your instructions and it works great. That is, we first generate the HD mesh, then add jcms to it. Below an example where I imported the forearm jcms.

    This is highly unpractical though. I mean, the user has to die to add jcms this way. Since the jcms are already defined in the shape keys, couldn’t we just grab them from there, so the user has to do nothing ? May be Thomas could add the dsf path in the custom properties of the shape keys, together with a jcm flag.

    Please @Thomas Larsson and @Xin let me know what you think if this may be viable.

  7. Xin

    If Thomas made a function that listed the JCMs' dsf (or the directories where you can find them) then it would be easier to do. Otherwise it would be like redoing what this addon already does.

    I don’t think more properties are needed, just a function to get the dsf list.

  8. Alessandro Padovani reporter

    Xin, I see that when we generate a multires we can choose a morph as base. While when we generate a HD mesh we can’t. For example if I want to generate mutation HD from the base mesh I can’t select the dhdm. Then I can add the dhdm later after generating the HD mesh and apply the shape key in blender. But since we can choose a morph for multires may it be we could do the same for HD ? This would also make the interface more coherent and clean without the morph panel switch.

    Please let me know what you think.

  9. Xin

    Yeah, I excluded that since it’s more flexible to use shape keys whenever possible (you can change the weight dynamically with shape keys for example, or exceed the limit). But adding the option there is easy anyway, so I will add it to the next version.

  10. Alessandro Padovani reporter

    Thank you Xin, I believe that will be easier for the user. Then @Thomas Larsson please let us know if you may implement the jcm function for Xin so the user doesn’t have to select all the jcms by hand in the HD option.

  11. Alessandro Padovani reporter

    Xin, in version 0.22 the multires HD doesn’t transfer jcms that was the original request here. As I understand it in #357 this is on purpose because you believe this would be a bad workflow since we can already do multires with diffeo. Then you could discard the mutires option all together beacuse without jcms it is unuseful. My opinion is that the multires option with jcms would be great, just because diffeo is so slow with its own HD exporter, while your plugin is way faster.

    Please let me know what you think so I’ll close this one if you’re not interested.

  12. Xin

    You can keep using the generated mesh with multires with the import_daz addon, it’s compatible with it unlike the true HD meshes. When I said “good workflow” I meant that such generation should be done at the very beginning after you import the base mesh with import_daz, because in such case you only import JCMs once, on the generated multires mesh, and no transfer is necessary at any point.

    You can import jcms on it with import_daz, and do everything else you could do with the base mesh with import_daz. It’s basically a base mesh with multires, hence why you can’t import HD shape keys to it and why the other HD mesh generation options are necessary.

    The way I see it, the generation of the “baked” HD mesh with multires on this other addon was so you don’t have to export the HD mesh from daz, which takes longer than generating it here. But after the generation, you have the same mesh you would have if you used the import_daz HD export script from daz (assuming you picked the right HD morphs in the list).

  13. Alessandro Padovani reporter

    Ah you mean to import jcms after generating the multires I didn't get it. I agree it's fine this way thank you Xin for the explanation.

    Marking as resolved.

  14. Log in to comment