Adding Morphs with Geometry Nodes

Issue #871 wontfix
Midnight Arrow created an issue

Continuing my exploration into Geometry Nodes I have come up with a way to apply morphs to a figure without needing to add them as a shape key. It’s not optimized right now since it requires two separate copies of the base mesh to apply it alongside JCMs and other morphs but it can be useful in some circumstances.

The top Object Info node contains a copy of the base mesh with morph deltas applied. That’s fed into a Transfer Attribute node that records its vertex data. The “Index” enum is important. Since our base meshes are identical this will deform the mesh based on the vertex order directly instead of trying to find the nearest surface.

The bottom Object Info node contains a copy of the base mesh without any morphs, just plain vanilla G8. Both are fed into a Vector Math node. By subtracting the morphed mesh from the default mesh we isolate the morph deltas and feed those into a Set Position node which deforms our main mesh.

In most circumstances it’d be quicker to just add the morph as a shape key however this workflow has some advantages. For one it can be used on linked meshes. Linked meshes disable editing since the mesh is instanced from a different file, but geometry nodes are modifiers and can be added to any linked mesh without issue. I developed this technique specifically to sculpt corrective morphs on linked figures on a scene-by-scene basis. By creating two local copies of a figure (and deleting their shape keys) I can edit the figure without needing to break encapsulation and put scene-specific shape keys into the figure’s main file.

The other chief advantage is some morphs have no business being part of a figure. It makes no sense to bloat a model with micropressure morphs that deform it based on what clothes it’s wearing but that’s exactly what Daz Studio does. With this technique such morphs could be loaded from a Duf file and injected only in a scene where the character is wearing the clothes it’s made for.

The main drawback is needing an unmorphed base mesh which doubles the memory count over a regular morph. This is necessary because geometry nodes are run after the target figure’s shape keys which causes the vertices to desynchronize. Still I am hopeful I can find a way to grab the default mesh from the target figure or Blender will introduce a node to handle that.

Comments (3)

  1. Thomas Larsson repo owner

    This can be an interesting technique, but it could be implemented as a separate addon. The daz importer is too bloated already, and adding feature that almost nobody is going to use (that includes myself) will not help. Personally I avoid geometry nodes in my private projects, but keep an unedited copy of the character in a separate blend file.

  2. Log in to comment