2
$\begingroup$

The geometry proximity-node position output is quite mysterious to me, it is able to dynamically split space into position cells, as shown in the gif below. I would like to have a better understanding of how it is mathematically possible to achieve such a result.

In this gif example I'm using vertices with the geometry proximity node, however, these vertices are only but simple Location vectors after all! Could we replicate this behavior only using math nodes & 3 location vectors? thus the title, can we reproduce such position-cells from scratch?

enter image description here

Here's a setup, the goal is to reproduce the behavior of the gif

$\endgroup$
5
  • 2
    $\begingroup$ If your geometry is really just a single point, then you use the Vector Math node with the operation Distance for that. But if you have a complex geometry, you can't just replace this node (at least not unless you are more precise about what you want to do). $\endgroup$
    – quellenform
    Sep 14, 2022 at 15:15
  • $\begingroup$ Distance could be done indeed, I'm wondering what's the formula of this field of location cells $\endgroup$
    – Fox
    Sep 14, 2022 at 20:56
  • $\begingroup$ let me reformulate my question :-) $\endgroup$
    – Fox
    Sep 14, 2022 at 20:58
  • $\begingroup$ @quellenform here we go, sorry I hope that the question is much more clear now $\endgroup$
    – Fox
    Sep 14, 2022 at 21:11
  • $\begingroup$ "Could we replicate this behavior only using math nodes & 3 location vectors?" ...No, i don't think so. Hm... but wait... $\endgroup$
    – quellenform
    Sep 15, 2022 at 14:07

1 Answer 1

1
$\begingroup$

enter image description here

The node Geometry Proximity basically provides you with the position of the closest element of a certain domain at the output Position.

Since you only have three points here, you can also capture these nearest positions with Transfer Attribute.

However, you would first have to convert your objects, which in your case have no geometry, into points.

To do this, you must first retrieve these objects with Object Info and the option As Instance. Then you join these instances and convert them into points.

From these points you can then retrieve the position of the nearest one, and the result should be identical to Geometry Proximity:

enter image description here

And here's another variant that, with a little logic, comes up with the right vector:

enter image description here


(Blender 3.1+)

$\endgroup$
5
  • $\begingroup$ thanks :-) so you believe it is not possible to get the same result with only math nodes & location vectors? $\endgroup$
    – Fox
    Sep 15, 2022 at 14:07
  • $\begingroup$ I don't think this is possible, because you always need the position of the nearest object. This would mean that you would somehow have to sort these three positions. Maybe it would work if you would compare with all three positions and filter out the lowest value with logic (switch, boolean, etc)? $\endgroup$
    – quellenform
    Sep 15, 2022 at 14:12
  • $\begingroup$ I don't know either, i wonder what's the formula to achieve such cells from scratch $\endgroup$
    – Fox
    Sep 15, 2022 at 14:15
  • 1
    $\begingroup$ @DB3D But I don't quite understand the point: if you can solve this with Transfer Attribute anyway, why do you need vector math? Is this a hypothetical question? ;-) $\endgroup$
    – quellenform
    Sep 15, 2022 at 14:45
  • 1
    $\begingroup$ woaw you did it! >why do you need vector math? I'm trying to understand how this data is calculated, I was trying to merge 3 position cells field the other day and it is very difficult to do with no understanding on how these are calculated! $\endgroup$
    – Fox
    Sep 15, 2022 at 15:12

You must log in to answer this question.

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