Geometry Nodes: Add SDF grid boolean nodes #118879
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
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
EEVEE & Viewport
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
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
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
EEVEE & Viewport
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
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#118879
Loading…
Reference in New Issue
No description provided.
Delete Branch "HooglyBoogly/blender:geometry-nodes-sdf-grid-boolean"
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?
Add a simple node to compute the intersection, difference, or union
between SDF grids. This should be the first new use case for the
new volume grid nodes that wasn't possible before.
For naming and multi-inputs, the node uses the same design as the
mesh boolean node. We considered splitting each operation into a
separate node, but though most users considered these different
"modes" of the same operation.
One thing to keep in mind is that it's important for the grids to
have exactly the same transform. If they have different transforms,
the second grid must be resampled to match the first, because the
OpenVDB CSG tools have that requirement. Resampling is expensive
(for SDF grids it means a grid -> mesh -> grid round trip) and should
be avoided.
@blender-bot build
80090abed9
to84c792dfa1
What do you think about splitting this node up into multiple and using multi-inputs where appropriate?
I like that idea!
Geometry Nodes: Add SDF Grid Boolean Nodeto Geometry Nodes: Add SDF Grid Boolean NodesGeometry Nodes: Add SDF Grid Boolean Nodesto Geometry Nodes: Add SDF grid boolean nodesToo bad that
Difference
seems difficult to use as verb, otherwise we could useUnion SDF Grids
andIntersect SDF Grids
as names.@ -0,0 +18,4 @@
static void node_declare(NodeDeclarationBuilder &b)
{
b.add_input<decl::Float>("SDF Grid 1").hide_value();
b.add_input<decl::Float>("SDF Grid 2").hide_value();
Second input could probably be a multi-input too.
@ -0,0 +17,4 @@
static void node_declare(NodeDeclarationBuilder &b)
{
b.add_input<decl::Float>("SDF Grid").hide_value().multi_input();
Feels like the name should be plural, same in other multi-inputs.
OpenVDB seems to throw an exception when the first input to the difference operation is empty (maybe other cases too). Probably simplest to just catch them instead of trying to do preprocessing.
I concur, would add more flexibility.
When i tried this first a while ago it didn't work because the multi-input would have required
CPPTypes
for all the grid types. Now i think this should be possible with theSocketValueVariant
.How about "Subtract" instead of "Difference"?
Subtract SDF Grids
? Not sure if it would be confused with the math operation.Works for me too, but unsure if it's too unconventional. (I used the same in
ExprBuilder
in #117805 btw)@ -0,0 +1,83 @@
/* SPDX-FileCopyrightText: 2024 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
#define WITH_OPENVDB
that looks wrong
Looks good to me.
I guess the "combine topology" node in the
volume-grid-nodes
branch should also be separate nodes instead of an operation enum?aac1167f6f/source/blender/nodes/geometry/nodes/node_geo_combine_grid_topology.cc (L73-L86)
Would be nice to have it consistent with the Mesh Boolean node though.
This design makes creating mid-level node group for Boolean impossible since one of them needs two inputs and others multi socket.
This is creating problems with non-English speaking (and non-technical artists) that I spoke of in chat.
I kindly ask you to reconsider that anti-user UX or at least open devtalk thread and gather feedback from users about splitting nodes. Lot of other voices need be to heard and taken into consideration besides usual couple technical artists.
I don't understand how the design makes anything impossible. Can you clarify?
@JacquesLucke I want to create Grid Boolean node-group, because I know my students will find it easier than remembering words like Union, Difference, Intersection, which are not related to 3D and are general English words, not easy to remember when English is second or third language (especially if native is Georgian).
But that is impossible. I can create node group that has two grid geometry inputs, but that means group will not be able to take advantage of multi-socket inputs that Grid and Intersection have, they'll be limited to two inputs only if you use node group. And there is no way to make sockets dynamically change, and probably will not be for years.
Me and many other users laid out arguments against splitting nodes in module chat, but namings are biggest problem for me. They make them less discoverable, especially for non-English speakers, and words like Difference and Union are not translateable in any meaningful way that will tell user what they are. If you don't already know what Union and Difference are you won't guess what they do. While boolean is something users are already familiar with from modeling when they approach geometry nodes. Design that splits nodes might be good for technical artists who are at home in Geometry Nodes already, but they're intimidating and not user-friendly for beginners. How will user find those nodes if they want to perform boolean, without going in internet and searching for tutorials? Typing Boolean in menu will not give them the result.
I apologize I talk about node names a lot, but that's because I see what works and doesn't work for beginners daily and deal with that, and I can talk about that for long time.
Based on feedback here and elsewhere, I'll probably switch back to a single node here, the same as the mesh boolean node. We're still working on finding a balance in the "splitting nodes" topic, and I think I've come down on the "no-split" side for this feature in particular.
@blender-bot build