This patch adds a Volume Cube primitive, with a field input to set the density at each grid voxel. This can be used to create procedural SDF-based meshes using the Volume To Mesh node:
Possible future improvements:
- Output an anonymous grid instead of hardcoding the name "density". Also see T91668.
- Support creating multiple grids at the same time (requires adding more sockets dynamically, we don't have that yet).
- Possibly allow specifying whether the grid is an fog volume or SDF.
- Support for grids with different data types (vector, int, ...).
- Support a selection input which is possibly evaluated at a lower resolution, so that the main grid values don't have to be evaluated at all positions.
- Support different resolution modes like in the Volume to Mesh node.
