# Using geometry nodes, is it possible to transform vertices, that are in a specific vertex group?

Let's say I create object primitive plane and I create a vertex group. I add one vertex of the plane into the group but leave the other 3.

Is it then possible to transform that one vertex in the group using geometry nodes?

It's possible and really really easy to do. You just need two nodes to make it happen

Demonstration:

Node Setup: Note that test is the name of the vertex group. Also the vertex group should have weight of 1

(I am using blender 2.93)

To change material_index follow this node group:

Demonstration:

P.s. For it to work, U have to select the target faces(editmode)-> right click-> shade smooth them

• As a follow up question, would it be possible to change the material index instead of the position? Commented Apr 19, 2021 at 12:03
• !My attempt uses a vertex group (r) and checks if it's weight is 0 and puts the result into a custom c attribute. The c attribute is created as boolean within vertex domain, so I convert it to d attribute that's in the face domain and is an integer. Then I'm trying to add/subtract the d attribute to/from the material index, but the material index doesn't change. Commented Apr 19, 2021 at 16:14
• Hey, turns out I was being an idiot. You can change material_index. I have edited my answer please read it.......The key is to instead of putting material_index as result of attribute math, u have to keep a different attribute and later convert that attribute as an integer to material_index Commented Apr 20, 2021 at 11:15

# A Blender 3.0+ solution

As of Blender 3.0 the Attribute Vector Math node is legacy. And there is now a much simpler way to transform vertices by group.

The Set Position node has a Selection input socket, so you can connect that to the Group Input node to access your vertex group.

Then in the Geometry Nodes modifier, click the icon resembling a Swedish flag and the input field will change from a boolean value of 1 to a clickable area where your vert groups will show up in a drop-down menu.

You can control the placement of vertices by Position or Offset (or both) from the modifier settings by connecting those sockets to the Group Input node too.

• Thank you for updating the answer for the fields workflow ! It shows how more straightforward this kind of operations is now compared to the first iteration. Commented Feb 22, 2022 at 12:24