2
$\begingroup$

I don't know how to specify the index like in this image. When using mesh island node, an unintended index is assigned. I ultimately want to control this tooth mesh along a curve using an instance on point node.

enter image description here

$\endgroup$
3
  • 1
    $\begingroup$ You could use a Vertex group, manually adding specific weight for each part (from 0.01 to 0.16) then retrieve the vertex group inside your geometry node, and multiply by 100 to get your index from 1 to 16. $\endgroup$
    – Lutzi
    Commented Mar 2 at 3:43
  • $\begingroup$ thank you After all, you have to set it manually to some extent. $\endgroup$
    – vector man
    Commented Mar 2 at 3:50
  • $\begingroup$ Warning: As Markus mentioned, there is in the provided Blender file a loose vertex at tooth 16, making a 17th island. $\endgroup$ Commented Mar 2 at 11:33

2 Answers 2

3
$\begingroup$

The simplest solution here is to manually sort the indices of the input geometry (Stef is working on automatically sorting by angle).

You can do so by selecting the first vertex, then from menu Mesh → Sort Selected → Selected. Then ⬆ ShiftClick the 2nd vertex, and sort again - you can make it easier by using the ⬆ ShiftR shortcut to repeat the last operation:

This works with groups of vertices:

So you can use the L shortcut to select entire islands, and sort them in order. Unfortunately the ⬆ ShiftR uses the last operator, and Select Linked is an operator, so in order to perform this manual sorting fast, right-click on the menu item and assign a shortcut. Now sorting is easy:

I assigned a ; key as a shortcut for sorting, because it's next to L. At the end you can see I press H to hide selected geometry, because I realized there's a loose vertex. I deleted it with X.

If you wonder how I display the mesh island indices (keep in mind you don't need to recreate this node tree, sorting will work without it!):

If that's not clear: mesh islands are sorted based on indices. So by sorting groups (islands) of vertex indices, I sorted island indices as well. Now all you need is to offset mesh islands to the chosen points. For readability I do it in two steps:

  • move all teeth to origin
  • offset all teeth by the equivalent (by index) point position

$\endgroup$
2
$\begingroup$

(Using Blender 3.6.8)

Objectives

Associate an IcoSphere to each tooth and connect these with a curve:

Teeth IcoSpheres

Approach

GN graph

1. The barycentre of each Mesh Island is computed by dividing the sum of vertices position by the number of vertices per island. This position is captured at each vertex.
2. A point cloud is spawned at each barycentre, then the number is reduced to the number of mesh islands using a Merge by Distance node.
3. A Quadratic Bezier curve is initialized based on the number of mesh islands, i.e. the size of the point cloud.
4. The position of each control point is copied by sampling the point cloud with sorting.
5. The sorting criterion is the angular position of each mesh island. The angle origin is chosen at X=0, Y>0 (back of mouth).
6. The sorting algorithm is based on a Points of Curve node. NB: Since Blender 4, a Points to Curve node should be favoured.

Resources:

$\endgroup$
1
  • $\begingroup$ Reading Markus's answer, I realize I might have misunderstood the final goal... $\endgroup$ Commented Mar 2 at 11:35

You must log in to answer this question.

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