2
$\begingroup$

I minimized the problem to this form:

I'd expect the only instance to be found, and the attribute to be transferred… Switching the mode to Index passes the integer. No error icon is displayed on the node…

If I'm not doing anything wrong here and it's just the current limitation, what workarounds do you propose?

$\endgroup$

2 Answers 2

4
$\begingroup$

This is a known bug (missing feature) in Blender versions lower than 3.4, which is now considered solved.

The current solution for 3.4 looks like this:

enter image description here


Update

Either I am completely wrong now, or it should actually also work without problems with version 3.3.

At least the following example correctly transfers the index of the instances to the other geometry:

enter image description here

...please don't hit me right away, if I still haven't completely understood the question ;-)

$\endgroup$
9
  • 1
    $\begingroup$ Since 3.3 is LTS, I'd think they should fix it there too… 🤔 $\endgroup$ Oct 24, 2022 at 9:48
  • 2
    $\begingroup$ Now I'm foxed.(Please shoot this down.) Sample Nearest 's target is an unrealized instance, which has no points. So it always returns 0. (You get lucky sampling index at index 0, because that's the only one.) If I try this with a grid of instances, it's essentially non-functional? $\endgroup$
    – Robin Betts
    Oct 24, 2022 at 14:53
  • 1
    $\begingroup$ @RobinBetts ...you may be right: something is wrong here. Thinking error? I'll have to take a closer look. $\endgroup$
    – quellenform
    Oct 24, 2022 at 15:07
  • 1
    $\begingroup$ @q Ahh! That's better. Thanks for having a look! It's a shame IMO that an instance is not considered to be a point, (with a transform matrix). Then you wouldn't have to convert it explicitly. I don't think that would break the grammar.. $\endgroup$
    – Robin Betts
    Oct 24, 2022 at 15:56
  • 1
    $\begingroup$ @MarkusvonBroady I'm right there with you, I also build now and then quite a bit of crap or I make mistakes. But please do not hold back, I appreciate your criticism and comments very much! ;-) $\endgroup$
    – quellenform
    Oct 25, 2022 at 9:36
2
$\begingroup$

My current workaround is to scale the instances to 0, capture their positions, space them to make sure they don't overlap, realize them and merge by distance, restore positions and then sample the resulting vertices... 🥴

Edit: Just realized, the Distance in Merge by Distance should definitely be larger than $0.001/1000$ due to how the positions lose precision fast as you go away from 0. Since I set the offsets to $1$ on each axis, the distances turn out to be:

$$\sqrt{\sqrt{1^2 + 1^2}^2 + 1^2} = \sqrt{2 + 1} ≈ 1.73$$

So I changed the distance to $1$ m, which should be safe for a small number ($<16777218$) of instances, otherwise probably should use modulo to position on X, Y, Z separately to fully take advantage of float precision…

$\endgroup$

You must log in to answer this question.

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