2
$\begingroup$

I found this reproduce-able in blender 3.5 and 4.0.2

For a project I'm working on I need to be able to programmatically assign a vertex group which can be used in later modifiers to geometry I'm generating using Geometry Nodes. Specifically the Curve to Mesh node.

I couldn't get this to work right in my big complicated file so I made a small test file. Subdivided plane has Group data for each vertex and appears in weight paint mode

I found that with a regular mesh this method works fine and I can add for example a Displace modifier with the "Group" Vertex Group as an input and it works as expected.

Curve generated Mesh not working even though in the spreadsheet the group is there

With the mesh generated by two curves however, the group does not show up in weight paint mode nor does it behave as expected with other modifiers despite being assigned with the same Geometry Nodes tree. Note that pictured is the Geometry Nodes which generate the mesh which combines with the original geometry to preserve the Vertex Group (There are no vertices on the original object.), the nodes that assign Fac to Group are identical to the one pictured above. Also note that in both instances the Spreadsheet shows that there are values for each vertex under "Group".

I'm failing to see why these two instances would behave differently especially when they appear to be the same in the spreadsheet. Is there something I've missed that I need to do to get the curve to mesh object to behave like the regular mesh?

$\endgroup$
1

1 Answer 1

1
$\begingroup$

Attributes and vertex groups are different types of data, looks similar though. Vertex groups are said to be replaced by generic attributes for a very long time, but for now they are not compatible. When you create new geometry from curves, it has no vertex groups, so it creates an attribute instead of vertex group.

Currently, there are no nondestructive ways to convert attribute to vertex group. (You can modify vertex group if it exists though, but it doesn't work in all cases) The destructive way is the following. Apply Geometry nodes modifier. In Attributes tab, click on down icon and select convert attribute. Select mode to Vertex group.

enter image description here

Now you can use newly created vertex group.

You can also try to use a workaround that you have found.

Alternatively, you can replace a generic modifier that uses vertex groups by node setup. For example, to replace displace you can offset position by normal.

$\endgroup$

You must log in to answer this question.

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