blender/scripts/startup
Brady Johnston 333b67cce0 Geometry Nodes: Grid Dilate & Erode
This PR exposes the OpenVDB dilate & erode operations as a single node.

This node importantly _only_ affects the active state of voxels, and does not
change their values at all. Dilating does expand the number of active voxels.

It is of particular use in combination with the _Advect Grid_ node. A common
source of frustration from users is that the velocity grid has to be slightly
larger than the value grid for advection to work properly. Dilating the grid
before advection is the approach taken by the crurrent "Volume Displace"
modifier.

### Value of newly activated voxels

When dilating, previously inactive voxels become active. There is some subtlety
in what value these voxels have after the node. In openvdb grids, inactive
voxels can have values stored which are different from the background value
(although when sampling them, they will appear to have the background value).

When a previously inactive voxel becomes active again, it will get the value
which was stored for it previously. Often that is the background value, but not
always. For example, when first eroding a grid with noise values and then
dilating it again, these noise values will still be there (unless an entire tile
was eroded in which case it is removed). If one wants to ensure that the newly
active voxels have the background value, one needs to make sure that the
inactive voxel values are properly set. This can be done with a slightly updated
Set Grid Background (#153525) node that can force-override all inactive values
in the grid.

In the future, the node could support writing an explicit value to each newly
activated voxel, or it could output a topology grid containing the voxels which
have changed active status. This comes with a fair amount of overhead and is not
necessary for many use-cases, so it's not implemented for now.

Pull Request: https://projects.blender.org/blender/blender/pulls/147430
2026-01-28 18:21:07 +01:00
..
bl_app_templates_system Compositor: Update default workspace 2026-01-20 09:39:40 +01:00
bl_operators
bl_ui Geometry Nodes: Grid Dilate & Erode 2026-01-28 18:21:07 +01:00
keyingsets_builtins.py
nodeitems_builtins.py