采样最近#

采样最近节点。

The Sample Nearest node retrieves the index of the geometry element in its input geometry that is closest to the input position.

This node is similar to the 几何接近, but it outputs the index of the closest element instead of its distance from the current location.

Tip

If you want to find nearest to each point in same geometry, its better to use the 最近编号 node.

输入#

几何数据

要采样的几何体。

Note

该节点仅支持点云和网格输入。

采样位置

The position to start from when finding the closest location on the target geometry. By default, this is the same as if the 位置节点 was connected.

属性#

The attribute domain to consider the distance from.

输出#

编号

The index of the closest geometry element of the chosen domain.

示例#

../../../../_images/modeling_geometry-nodes_sample_nearest-example.png

Combining this node with the 采样编号 gives a setup that can retrieve the closest attribute value from another geometry. This is the same behavior as the Transfer Attribute node in versions of Blender before 3.4.#