Geometry Nodes: Sample grid node #118397

Merged
Hans Goudey merged 11 commits from HooglyBoogly/blender:geometry-nodes-sample-grid into main 2024-02-22 17:58:19 +01:00
Member

This simple node finds the values of a volume grid at
positions in the local space used in geometry nodes
evaluation. There are three interpolation modes to
choose how to mix values between neighboring voxels.

For the implementation, first the values are sampled
with the grid's type directly, then implicit type conversions
are used to get the final type. This makes gives us flexibility
in case there aren't exact matches in support between grid
types and Blender types.


image

This simple node finds the values of a volume grid at positions in the local space used in geometry nodes evaluation. There are three interpolation modes to choose how to mix values between neighboring voxels. For the implementation, first the values are sampled with the grid's type directly, then implicit type conversions are used to get the final type. This makes gives us flexibility in case there aren't exact matches in support between grid types and Blender types. --- ![image](/attachments/8ebad911-a31f-44fa-b991-2e5c2ecc776c)
Hans Goudey added 3 commits 2024-02-16 22:09:51 +01:00
Hans Goudey added the
Interest
Geometry Nodes
label 2024-02-19 14:44:16 +01:00
Hans Goudey added this to the Nodes & Physics project 2024-02-19 14:44:24 +01:00
Hans Goudey added 3 commits 2024-02-19 15:12:59 +01:00
Hans Goudey requested review from Lukas Tönne 2024-02-19 15:51:48 +01:00
Hans Goudey requested review from Jacques Lucke 2024-02-19 15:51:48 +01:00
Hans Goudey added 1 commit 2024-02-19 16:42:59 +01:00
Jacques Lucke requested changes 2024-02-19 20:54:57 +01:00
@ -0,0 +234,4 @@
params.set_output("Value", std::move(output_field));
#else
params.set_default_remaining_outputs();
Member

node_geo_exec_with_missing_openvdb

`node_geo_exec_with_missing_openvdb`
HooglyBoogly marked this conversation as resolved
@ -0,0 +249,4 @@
{0, nullptr, 0, nullptr, nullptr},
};
static const EnumPropertyItem grid_type_items[] = {
Member

I think using a filter function is better than duplicating the enum item descriptions etc.

I think using a filter function is better than duplicating the enum item descriptions etc.
HooglyBoogly marked this conversation as resolved
@ -0,0 +250,4 @@
};
static const EnumPropertyItem grid_type_items[] = {
{CD_PROP_FLOAT, "FLOAT", 0, "Float", "Floating-point value"},
Member

I think it's more correct to use socket types instead of custom data type here.

I think it's more correct to use socket types instead of custom data type here.
Author
Member

Thanks for the reminder! Yeah, they make much more sense here.

Thanks for the reminder! Yeah, they make much more sense here.
HooglyBoogly marked this conversation as resolved
Hans Goudey added 3 commits 2024-02-20 03:49:10 +01:00
Hans Goudey requested review from Jacques Lucke 2024-02-20 04:08:31 +01:00
Lukas Tönne approved these changes 2024-02-22 12:29:42 +01:00
Lukas Tönne left a comment
Member

Looks good to me.

Low priority: We should eventually try to be consistent with how we do dispatching to static types: eCustomDatatype, VolumeGridType, CPPType, OpenVDB's internal type names, can all be used for the purpose.

Looks good to me. Low priority: We should eventually try to be consistent with how we do dispatching to static types: eCustomDatatype, VolumeGridType, CPPType, OpenVDB's internal type names, can all be used for the purpose.
Jacques Lucke approved these changes 2024-02-22 14:45:08 +01:00
Hans Goudey added 1 commit 2024-02-22 17:18:57 +01:00
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-lint Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
eddcf0ec94
Merge branch 'main' into geometry-nodes-sample-grid
Author
Member

@blender-bot build

@blender-bot build
Hans Goudey merged commit 77cba3d551 into main 2024-02-22 17:58:19 +01:00
Hans Goudey deleted branch geometry-nodes-sample-grid 2024-02-22 17:58:21 +01:00
Sign in to join this conversation.
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 Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#118397
No description provided.