1
$\begingroup$

So there are several nodes called "Sample ..." - for example, Sample Nearest - that can find a point by its attribute "position".

However, I want to search by other attributes, such as Mesh island index.

I am currently struggling with a particular setup:

enter image description here

I am using the UV pack node to pack my meshes in a square. However, my meshes are not single meshes, so I have to use Convex hull or Bound box to create one mesh per object.

Afterwards, I want to obtain an offset that originates from the UV Pack. Since I disabled rotation, this offset should be the same for every point within the same mesh island. However, I am unsure how to retrieve it. I need to search within the meshes to find at least one point with a mesh island index that matches the instance index. How can I accomplish this?

enter image description here Setup doesn't work, Sample nearest doesn't work with a custom attribute.

$\endgroup$
4
  • $\begingroup$ sort by the chosen criterion, then index equals the criterion. You could also set position to the criterion and then use geometry proximity to find the point with the nearest value to the chosen value. $\endgroup$ Commented Dec 12, 2023 at 23:04
  • $\begingroup$ @MarkusvonBroady Isn't that requires converting to curve? $\endgroup$
    – Crantisz
    Commented Dec 12, 2023 at 23:10
  • $\begingroup$ I could explain in detail, but then I would have to understand the question in detail, which I do not. It starts with bounding box / convex hull, I don't see why you do that. Can you provide the input and output example to make it clear what you want to achieve? $\endgroup$ Commented Dec 13, 2023 at 12:24
  • $\begingroup$ @MarkusvonBroady If I don't use bounding box / convex hull, pack islands will break objects apart because (as example) liquid and cup are two mesh islands. But the real question is how I can search by attribute in points/edges/instances etc. This is just an example to make question more obvious $\endgroup$
    – Crantisz
    Commented Dec 13, 2023 at 23:00

1 Answer 1

0
$\begingroup$

Found the solution by selecting one face per mesh island using Accumulate Field:

enter image description here

$\endgroup$

You must log in to answer this question.

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