1
$\begingroup$

After banging my head multiple times against the wall I've decided to reach out to this community again because I'm sure the answer is simple and it's me who is missing something.

So I have this very simple setup:

enter image description here

At the moment i'm capturing the shortest path selection (Values of the Viewer column):

enter image description here

What I want is -

  1. Instead of 0 for none selected give me -1 (I can do this easly with a switch node).
  2. Instead of 1 give me the order value for each index according to the shorted path (first vertex of the shortest path should get the value 0 second should get 1 third should get 2 etc.). Here is where I have a problem so I've illustrated the desired result:

enter image description here

I've tried using accumulate field node without success because the field accumulation (I think) is based on index order and not the shortest path order, but there might be a different approach.

any suggestions on how to tackle this?

$\endgroup$

1 Answer 1

1
$\begingroup$

Sorry if I wasted anyone time because of course the solution was very simple indeed. If someone will ever find it useful here is the correct setup:

enter image description here

the key was to extract the selection to a curve and sample the nearest index which obviously is in the same location.

$\endgroup$

You must log in to answer this question.

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