Geometry Nodes: add Voxel Index node

This node gives access to the integer coordinates of the the voxel that is
currently being evaluated by a field. It can be used together with e.g. the
Integer Math and Sample Grid Index node to sample neighboring voxel values.
Previously, one could only get the position of the voxel in object space.

Since sometimes field are evaluated on tiles of many voxels, just having the
voxel coordinates can be misleading. Therefore, this same node also outputs
whether it is a tile and the extent of the tile (which is 1 for normal voxels).

Pull Request: https://projects.blender.org/blender/blender/pulls/147268
This commit is contained in:
Jacques Lucke
2025-10-03 14:25:14 +02:00
parent 8508bb953a
commit 2a0a07654a
6 changed files with 242 additions and 40 deletions

View File

@@ -911,6 +911,7 @@ class NODE_MT_gn_volume_read_base(node_add_menu.NodeMenu):
layout = self.layout
self.node_operator(layout, "GeometryNodeGetNamedGrid")
self.node_operator(layout, "GeometryNodeGridInfo")
self.node_operator(layout, "GeometryNodeInputVoxelIndex")
self.draw_assets_for_catalog(layout, self.menu_path)