I'm trying to use vertex group to instance an object in geometry node, for example, a table with his legs. But don't work
2 Answers
Edit: I think that Gabriel's suggestion of using the "point separate" node is a more flexible solution.
Each vertex has a weight from each vertex group available attribute:
If we create a cube with a vertex group lid
, each vertex gets a new attribute "lid" that contains the vertex weight:
Then we can multiply the scale of each point by this vertex weight and create our instances on all vertices:
-
$\begingroup$ I cannot seem to find some of these Geo Nodes in v3.0 -- any hints? $\endgroup$– james_tJan 4, 2022 at 23:29
The above answer still keeps the instances with 0 scale, so if you use that in an object with a more complex geometry you will get lots of instances, resulting in an unresponsive viewport.
I found using a "pont separate" node instead solves the issue, you use the vertex group as mask and the "geometry 2" output gives you only the vertex group.
In my image I have an inverted U bike rack which have 2 vertex groups consisting of a single vertex on each side each, I used it to put bikes in the racks with particle systems, but geometry nodes make it much more controllable, now I can orientate the bikes as I want :D
-
$\begingroup$ Good solution. It also works if the first node is the default "Group Input" instead of "Object Info". $\endgroup$ Jun 19, 2021 at 13:08
-
$\begingroup$ This feels like a better solution than mine. Nice catch, Gabriel! $\endgroup$– Rob SymeJun 22, 2021 at 17:42