Lets say I have a square meshed with a lot of triangles. I would like to generate a box following the position of a vertex group of the square mesh.

This is my input, with the vertex group selected. enter image description here

I would like to obtain as a result something like this enter image description here

That boxes should have a different material.

I am trying to achieve this using geometry nodes, but I am completely new to them and I have no idea where to start. Any tip would be very useful!

  • $\begingroup$ You can try duplicating the mesh, then mask modifier > VG > Inverse ? and then a skin modifier $\endgroup$
    – Gorgious
    Sep 29, 2021 at 15:17
  • $\begingroup$ Guess I can do it that way, but I preferred something using geometry nodes, as I would learn another way to do it $\endgroup$
    – jjcasmar
    Sep 29, 2021 at 15:24

1 Answer 1


First you would have to prepare the inputs of your node accordingly. Just create two new inputs and set their type to Boolean. Assign the identifiers of your two vertex groups to these two inputs in the properties panel.

This way your node group gets the information which vertices fall into a certain group.

Then you have several options:

  1. First, separate the vertices of the two vertex groups from your mesh and convert both to a curve. Assuming that it is indeed a rectangle or a square, you capture the length of one of the two curves. This will give you the side length.

    With this side length you create a cube.

    The two curves previously captured are resampled with three points, so that if you extract the center point of each, you get the center point for instantiating the cube.

    enter image description here

  2. Another variant would be (assuming that it is a square) to simply offset the cube by half of a side length in each direction.

    enter image description here

There are several other (also simpler) possibilities, depending on what exactly you want to achieve and what your starting point is, but these examples should be able to point you in the right direction.


You must log in to answer this question.

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