0
$\begingroup$

In Blender 4.1 or higher, I want to write a custom modifier, which transfers values from a vertex attribute (on geometry generated by geonodes) to a vertex group (usable with other modifiers). This is so that I can use a GeoNodes simulation (which does not use the input geometry) to control the weights used by a subsequent Armature modifier.

I'm aware of the "delete where index>0 from input geometry, bool union the surviving input vertex with the generated geometry" trick to enable GeoNodes to set vertex weights, but this is incredibly slow in my case (bake time per frame goes from <1second to >1minute).

  1. Are you aware of anything similar already existing?
  2. Are there any examples / tutorials you're aware of for writing addons / custom modifier / custom geo-node, that might provide a good starting point for me?
  3. Do you know of any reason why this would not currently be possible with Blender 4.x, or any reason why this would be absurdly complicated and not worth attempting?

Thanks!

$\endgroup$
3
  • $\begingroup$ Are you trying to do something like Joel Reid here : get Vertex Group to survive Geometry Nodes ? Robin Betts conclusion was that "After constructive modification, the vgroup disappears, but does survive as an attribute". So I am afraid that there is no way to create ex nihilo a Vertex Group usable as such after a GN modifier. $\endgroup$ Commented May 8 at 16:23
  • $\begingroup$ That seems to be about creating a VG via GeoNodes. I know it's not possible via only GeoNodes, so I'm wondering if instead, I can code a custom modifier addon (not part of GeoNodes) that will basically transfer a vertex attribute/field (emitted by GeoNodes) to a vertex group, so subsequent modifiers can use it. $\endgroup$ Commented May 9 at 19:52
  • $\begingroup$ Here is a workaround based on a Python script: Is it possible to generate a vertex group using geometry nodes? $\endgroup$ Commented May 31 at 18:58

1 Answer 1

0
$\begingroup$

(Using Blender 3.6.8)

Is it the behaviour you are looking for ?

GN Graph with Bevel modifier

1. All three cubes have the same Vertex Groups setup, where the top (resp. bottom) 4 vertices have a Weight of 1 (resp. 0), as illustrated by the rightmost object.
2. For the center cube, the GeometryNodes modifier is disabled. Consequently, the top 4 edges are affected by the Bevel modifier with Limit Method set to Vertex Group.
3. For the leftmost cube, the GeometryNodes modifier is active. The VGroup attribute is set to 0 for vertices with X coordinate greater than 0 using a Stored Named Attribute node, to overwrite the values assigned in Edit Mode. Consequently, only one edge is affected by the Bevel modifier.
NB: The GN modified Vertex Group can be visualized by selecting the object in the Outliner in Weight Paint mode. In Edit Mode, only the GN unaffected Vertex Group can be Selected because modifiers are applied "after".

Resources:

$\endgroup$
1
  • $\begingroup$ No, that isn't setting vertex weights for generated geometry. Try generating a cube in the nodegraph instead of using the geometry group-input, and you'll see the issue $\endgroup$ Commented May 8 at 15:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .