WIP: Volume grid attribute support in geometry nodes #110044
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#110044
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "LukasTonne/blender:geometry-nodes-flip"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds attributes to the
VolumeComponent
in geometry sets. Each grid is presented as an attribute, with the condition that all grids in theVolumeGridVector
must share the same transform, topology, and active voxel set.A specialized
VArray
implementation is added for accessing values stored in a grid, and associated built-in values such as voxel coordinates/positions.A number of dummy nodes have been added as well. For the most part these are "aspirational" and not yet implemented, but they provide a test bed and motivation for features. The set of nodes is roughly what would be required for a basic FLIP/PIC fluid solver, on top of attribute support.
I think we should have some design discussions about this, because there are points where it diverges from #103248 in some fairly fundamental ways. I won't write that all here though, since it should probably happen elsewhere.
If you are referring to the "Grid Value" and "Set Grid Value" nodes in the screenshot: Those are already outdated again. I was playing around with the idea of a single grid per volume, but went back to the "grids are attributes" concept from the #103248 design (e.g. grid lookup by attribute id). I wanted to update the screenshots but then ran into #110052 on my work machine. Besides that, i'm playing fast and loose with design here, i just want to get something working. It's more about learning how to access OpenVDB grids and integrate with the rest of GN.
Had some discussion with Hans about how grids with different topology might work together as attributes. Grids don't necessarily have to have the same active voxel layout to work together, sampling grids is fast. If transforms are the same, which is easy to ensure, grid access should be well optimized by OpenVDB.
The difficulty is that domain size (number of active voxels) is not well defined when combining multiple grids. One possibility is to define domain size of the entire Volume as the maximum number of active voxels among all its grids. OpenVDB will use the background value when sampling at a coordinate that is not active on a grid. That leaves the question of what
get(int64_t index)
means, ifindex
does not map to a consistent active voxel for different grids. The recommendation is to use (i,j,k) coordinates for openvdb grid sampling, butVArrays
work with a 1D index space.Another possibility i've been considering is to move up one conceptual layer and define a dedicated
Field
type for voxels instead of just aVArray
. We'd probably need to specialize the FieldEvaluator, which could switch to grid evaluation based on theVolumeFieldContext
.I guess it's mostly necessary to know the domain size when creating the virtual array? That's essentially the problem with flattening things out I guess. I don't think we can really rely on having a meaningful domain size value for the whole volume data-block. That might be inconvenient with some attribute code that assumes this, but I think there's not much way around that.
I think this makes a lot of sense!
This is also how I imagined evaluating an arbitrary field to create a grid in the capture and store named attribute nodes-- the values would be sampled on the topology of an existing grid that's part of the field context. If the field refers to a volume grid directly though, that's an important optimization that will probably be essential for simple cases like passing a grid to the sample volume node.
Going a bit further, I'd imagine this allows the divergence and gradient nodes to be field input nodes that don't require a volume input.
EDIT: we may still want to have a virtual array implementation for grids though, to simplify displaying values in the spreadsheet.
Also, I think for volumes the implicit position attribute you have here doesn't quite work, since it relies on the matching topology and "domain sizes".
VolumeGrid
struct to avoid ambiguity. fd7c4a572b9020dc99d2
to3d99cd075d
d70d9ffa39
to36fedfa64f
3a3532a0e4
to67bd1671cf
@blender-bot
Superseded by #116021
Pull request closed