2
$\begingroup$

I'm trying to thicken a loop automatically with geo nodes.

I created a vertex group from the target loop and uses it as input within geometry nodes. But the "mesh to curve" node creates curves between nodes that do not belong to the selection, hence resulting in a rake more than a hoop.

Is this expected behaviour or did I miss something?

enter image description here

$\endgroup$
1
  • 1
    $\begingroup$ "Why" has been answered well IMO, but a different workaround to the problem is input->separate geometry->mesh to curve, which leaves you with only the edges you want going into the curve. $\endgroup$
    – Nathan
    Jul 29, 2022 at 16:44

3 Answers 3

6
$\begingroup$

You would simply have to apply the vertex group to the points first with Capture Attribute, and then use that as the selection for Mesh to Curve:

enter image description here

Here I use the node Named Attribute (Blender 3.2) for the vertex group, but of course you can also do this with a Group Input (Blender 3.0).


A short (simplified) explanation:

It has to do with "Domains".

A vertex group defines points, but Mesh to Curve works based on edges.

When you process a vertex group in Geometry Nodes, this selection is interpolated to all other domains, which also selects adjacent edges.

So all edges that have a point in this vertex group will be converted by the node Mesh to Curve.

With Capture Attribute, however, the selection is explicitly applied only to the points domain and then only edges are selected that actually have both points in this vertex group.

$\endgroup$
2
  • $\begingroup$ Amazing. I hadn't realized that a selection of vertices is not just a selection of vertices in geo nodes but that it can be specified what attributes are to be used. :) $\endgroup$
    – Jag JB
    Jul 29, 2022 at 11:16
  • 1
    $\begingroup$ @JagJB Values that are not explicitly restricted to a particular domain are interpolated ...I have attached an attempt at a brief explanation of this. $\endgroup$
    – quellenform
    Jul 29, 2022 at 11:26
4
$\begingroup$

It is because vertex group has a vector domain, while you want to get edges. This node setup solves the problem:

enter image description here

$\endgroup$
1
  • $\begingroup$ Thank you so much. Both answers are pertinent and converge to the same solution. I gave credits to both ;) $\endgroup$
    – Jag JB
    Jul 29, 2022 at 11:17
3
$\begingroup$

Another way of thinking about it?

enter image description here

This cluster selects as expected.

Vertex groups are Floats, (however you think you've stored them) .. and the cast to Boolean interprets everything above 0 as True.

So edges interpolated to 0.5 (1 at one end and 0 at the other) cast to True, but can be explicitly evaluated as False.

$\endgroup$
3
  • $\begingroup$ Very interesting perspective! Despite all expertise, in this way I have not looked at it at all. As so often, thank you for expanding my horizons! $\endgroup$
    – quellenform
    Jul 29, 2022 at 22:18
  • $\begingroup$ @quellenform .. and vice-versa .. yours and Cranitsz' method took me by surprise ..:) $\endgroup$
    – Robin Betts
    Jul 30, 2022 at 7:19
  • $\begingroup$ Yes of course, it's a float as you can have weight factors in a node group! I hadn't realized I was implicitely converting values when connecting the blocks. Thanks for the explanation! $\endgroup$
    – Jag JB
    Jul 30, 2022 at 11:07

You must log in to answer this question.

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