A small improvement for geograft geometry nodes

Issue #1021 closed
Алексей Беседин created an issue

Hi, I've been looking through a few topics on geometry nodes here, and would like to suggest a small improvement
I don't know if this is helpful, but I thought I'd share

The thing is that in some poses, they geograft didn't merge with the body as because of the some shape keys
Instead of trying to merge specific vertices the edge of the geograft and the edge of the body after removing the geograft area, I thought it would be better to align their positions first before merge

I tried several ways, but only one way looked logical, but didn't work) So I asked for help on blenderartists and one person helped me how to make everything work

Using a new group of vertices I assigned weights to the geograft edge according to vertex index numbers on the main mesh and then gave them those values as ID and transferred the position of the corresponding vertices from the main mesh and then merge with a minimum distance

Comments (4)

  1. Midnight Arrow

    This has already been discussed. We didn’t come up with a good method but I have to admit using vertex weight values as indices is clever.

    But this workflow has issues:

    • Using floats in place of integers is bad practice.
    • The indices will change depending on the geograft.
    • Blender will be getting attribute editing soon anyway.

    But the biggest problem is it’s just too complicated.

    import bpy
    
    mesh = bpy.context.active_object.data
    attr = mesh.attributes.new("Deltas", "INT", "POINT")
    attr.data[4].value = 123
    attr.data[5].value = 456
    attr.data[6].value = 789
    attr.data[7].value = 111
    

    If you want to assign known integers as attributes it’s much faster with a Python script.

  2. Thomas Larsson repo owner

    I think you can avoid the issue completely with the current implementation, provided that you transfer shapekeys after the merge. The merge tool moves the geograft boundary vertices to the locations of the corresponding body vertices. This change is destructive even if you merge with geometry nodes. The boundary of a transferred shapekey should then be exactly the same as the original shapekey, at least if you don’t allow for vendor morphs.

    So the following steps should avoid the problem:

    1. Merge geografts with geometry nodes.
    2. Disable the nodes modifier and unhide the geograft.
    3. Transfer shapekeys to the geograft, with vendor morphs disabled.
    4. Enable the modifer and hide the geograft again.

  3. Thomas Larsson repo owner

    Hm. I looked into the code and shapekey boundary locations are already moved into position by the Merge Geograft tool. Provided that both the body and geograft have shapekeys with the same name. So I don’t understand how the glitches can appear.

  4. Log in to comment