Splitting the "Attribute Transfer" node #100010

Closed
opened 2022-07-26 23:42:32 +02:00 by Hans Goudey · 18 comments
Member

I propose to split the attribute transfer node into multiple smaller nodes.

History

{F13320174 size=full} {F9904877 size=full}

The original "Attribute Transfer" node was inspired by the "Data Transfer" modifier.
This was before fields, so the workflow was mostly the same as for modifiers but with attribute names instead.
During the fields transition, we discussed changing the design, but there wasn't much time to consider alternatives.
Geometry nodes have changed significantly now, but we're still using the same design.

Problems

{F13320166 size=full} {F13320168 size=full} {F13320170 size=full}
There are quite a few problems with the current design:
  1. Naming
  • After the fields transition, the node does not "Transfer" anything, it only retrieves data or samples it.
  • This makes the combinations of "Source", "Target", etc. very confusing.
  • Unlike other nodes, the name is based on a use case rather than what the node actually does.
  1. Scope
  • With the current design, there is no limit to the scope of the transfer node. Anything that retrieves attributes from a geometry would fit.
  • When the node is responsible for so much, it gets slower and more confusing to use. I can't say "Try using the transfer attribute node," I have to say, "Try the transfer node in this mode with these options"
  1. Inconsistency
  • We have other nodes like Raycast and Sample Curve (#91650) that retrieve attributes from a geometry. The current design says that they should be part of this node.
  • Even the sample volume node (D11353) would theoretically fit here, but the use case is entirely different.
  • Mixing the old pre-fields design and naming makes everything less intuitive.

Proposal

There are many very different ways to transfer attributes. Each significantly different method should be its own node, and they should be made more generic and flexible where possible.

1 Index 2 Nearest Element 3 Raycast 4 UV 5 Volume 6 Curve Parameter 7 Proximity Interpolated
{F13320229 size=full} {F13320215 size=full} {F13320235 size=full} {F13320243 size=full} {F13320252 size=full} {F13320263 size=full} {F13320279 size=full}
  1. Index-based attribute retrieval is very simple
  2. The "Nearest Element" is a generalization of finding close elements and retrieving their attribute values
  3. The existing raycast node is also a way of retrieving attributes.
  4. UV-based sampling is added in D15440
  5. Volume sampling is added in D11353
  6. #91650 is a task for sampling custom attributes in the sample curve node
  7. The "Sample Mesh Surface" node is probably the place for more advanced methods that take into account other bits of mesh topology, like #97070 maybe.

Open Questions

  • Where does the "Geometry Proximity" node fit in? I think it should probably be merged with the proximity/interpolated transfer
  • Can we come up with a better name for "Sample Mesh Surface"?
  • Is this whole design missing something even more general and flexible?
I propose to split the attribute transfer node into multiple smaller nodes. ## History | {[F13320174](https://archive.blender.org/developer/F13320174/image.png) size=full} | {[F9904877](https://archive.blender.org/developer/F9904877/image.png) size=full} | | -- | -- | The original "Attribute Transfer" node was inspired by the "Data Transfer" modifier. This was before fields, so the workflow was mostly the same as for modifiers but with attribute names instead. During the fields transition, we discussed changing the design, but there wasn't much time to consider alternatives. Geometry nodes have changed significantly now, but we're still using the same design. ## Problems | {[F13320166](https://archive.blender.org/developer/F13320166/image.png) size=full} | {[F13320168](https://archive.blender.org/developer/F13320168/image.png) size=full} | {[F13320170](https://archive.blender.org/developer/F13320170/image.png) size=full} | | -- | -- | -- | There are quite a few problems with the current design: 1. **Naming** * After the fields transition, the node does not "Transfer" anything, it only retrieves data or samples it. * This makes the combinations of "Source", "Target", etc. very confusing. * Unlike other nodes, the name is based on a use case rather than what the node actually does. 2. **Scope** * With the current design, there is no limit to the scope of the transfer node. Anything that retrieves attributes from a geometry would fit. * When the node is responsible for so much, it gets slower and more confusing to use. I can't say "Try using the transfer attribute node," I have to say, "Try the transfer node in this mode with these options" 3. **Inconsistency** * We have other nodes like Raycast and Sample Curve (#91650) that retrieve attributes from a geometry. The current design says that they should be part of this node. * Even the sample volume node ([D11353](https://archive.blender.org/developer/D11353)) would theoretically fit here, but the use case is entirely different. * Mixing the old pre-fields design and naming makes everything less intuitive. ## Proposal There are many very different ways to transfer attributes. Each significantly different method should be its own node, and they should be made more generic and flexible where possible. | **1** Index | **2** Nearest Element | **3** Raycast | **4** UV | **5** Volume | **6** Curve Parameter | **7** Proximity Interpolated | | -- | -- | -- | -- | -- | -- | -- | | {[F13320229](https://archive.blender.org/developer/F13320229/image.png) size=full} | {[F13320215](https://archive.blender.org/developer/F13320215/image.png) size=full} | {[F13320235](https://archive.blender.org/developer/F13320235/image.png) size=full} | {[F13320243](https://archive.blender.org/developer/F13320243/image.png) size=full} | {[F13320252](https://archive.blender.org/developer/F13320252/image.png) size=full} | {[F13320263](https://archive.blender.org/developer/F13320263/image.png) size=full} | {[F13320279](https://archive.blender.org/developer/F13320279/image.png) size=full} 1. Index-based attribute retrieval is very simple 2. The "Nearest Element" is a generalization of finding close elements and retrieving their attribute values 3. The existing raycast node is also a way of retrieving attributes. 4. UV-based sampling is added in [D15440](https://archive.blender.org/developer/D15440) 5. Volume sampling is added in [D11353](https://archive.blender.org/developer/D11353) 6. #91650 is a task for sampling custom attributes in the sample curve node 7. The "Sample Mesh Surface" node is probably the place for more advanced methods that take into account other bits of mesh topology, like #97070 maybe. ## Open Questions * Where does the "Geometry Proximity" node fit in? I think it should probably be merged with the proximity/interpolated transfer * Can we come up with a better name for "Sample Mesh Surface"? * Is this whole design missing something even more general and flexible?
Author
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Author
Member

Added subscriber: @HooglyBoogly

Added subscriber: @HooglyBoogly

Added subscriber: @Erindale

Added subscriber: @Erindale

Might just be worth extending the "Sample" naming to Sample at Index and Sample Nearest Element. Raycasting is more of its own thing so that wouldn't want changing names.
I think Geometry Proximity would be in 2. Nearest Element wouldn't it? You can select which specific mesh element you're checking position of or distance to.
Distance is something you can easily find with a vector math node as well although it is very frequently used so would be a shame to drop it.

Might just be worth extending the "Sample" naming to Sample at Index and Sample Nearest Element. Raycasting is more of its own thing so that wouldn't want changing names. I think Geometry Proximity would be in 2. Nearest Element wouldn't it? You can select which specific mesh element you're checking position of or distance to. Distance is something you can easily find with a vector math node as well although it is very frequently used so would be a shame to drop it.

Added subscriber: @SteffenD

Added subscriber: @SteffenD

Added subscriber: @Leo-Luther

Added subscriber: @Leo-Luther

A bit of a long shot, but I'll just throw it out there.
If they were to be reworked/changed, could the nearest Element node maybe get a toggle to "exclude self".
The issue so far has always been that you can't get the nearest from the same mesh as you are searching/casting from, because each element is always closest to itself.
With a toggle like this, you'd say give me the nearest element that is not myself, which should then return the nearest neighbor.
As said, a bit of a long shot, but a feature that could come in very handy imao.

A bit of a long shot, but I'll just throw it out there. If they were to be reworked/changed, could the nearest Element node maybe get a toggle to "exclude self". The issue so far has always been that you can't get the nearest from the same mesh as you are searching/casting from, because each element is always closest to itself. With a toggle like this, you'd say give me the nearest element that is not myself, which should then return the nearest neighbor. As said, a bit of a long shot, but a feature that could come in very handy imao.

Added subscriber: @Zhen-Dai

Added subscriber: @Zhen-Dai

Another suggestion: Attribute Transfer is used to facilitate index sorting and selection a lot, can we somehow make that easier?

I use the following pattern a lot in my daily work, there must be a way to simplify and speed up this by default, especially over grouped indices.

https://blender.stackexchange.com/questions/266231/finding-the-index-of-longest-edge-with-geometry-nodes

Another suggestion: Attribute Transfer is used to facilitate index sorting and selection a lot, can we somehow make that easier? I use the following pattern a lot in my daily work, there must be a way to simplify and speed up this by default, especially over grouped indices. https://blender.stackexchange.com/questions/266231/finding-the-index-of-longest-edge-with-geometry-nodes
Contributor

Added subscriber: @RedMser

Added subscriber: @RedMser
Author
Member

Might just be worth extending the "Sample" naming to Sample at Index and Sample Nearest Element. Raycasting is more of its own thing so that wouldn't want changing names.

Hmm, so Sample at Index, Sample Nearest Element, Raycast, Sample with UVs, Sample Volume, Sample Curve, Sample Mesh Surface.
I'm still not satisfied with the "Sample Mesh Surface" name. It doesn't distinguish the node from the "Nearest Element" properly. Or maybe that's a problem with the design...

I think Geometry Proximity would be in 2. Nearest Element wouldn't it? You can select which specific mesh element you're checking position of or distance to.
Distance is something you can easily find with a vector math node as well although it is very frequently used so would be a shame to drop it.

Agreed that they could be combined. However, there is a difference between the position of the closest face and the closest position on the closest face, so we'd probably still need the position output.
I would usually tend to remove redundant sockets like "Distance" but it seems fine if it stays too.

If they were to be reworked/changed, could the nearest Element node maybe get a toggle to "exclude self".

Since these nodes are meant to work on a separate geometry from the context geometry, that doesn't really make sense here.
That feature might make more sense in a field input node that doesn't have a geometry input.

Another suggestion: Attribute Transfer is used to facilitate index sorting and selection a lot, can we somehow make that easier?

Doesn't that come back to D13547? Or maybe we need a node to allow sorting somehow.

>Might just be worth extending the "Sample" naming to Sample at Index and Sample Nearest Element. Raycasting is more of its own thing so that wouldn't want changing names. Hmm, so `Sample at Index`, `Sample Nearest Element`, `Raycast`, `Sample with UVs`, `Sample Volume`, `Sample Curve`, `Sample Mesh Surface`. I'm still not satisfied with the "Sample Mesh Surface" name. It doesn't distinguish the node from the "Nearest Element" properly. Or maybe that's a problem with the design... > I think Geometry Proximity would be in 2. Nearest Element wouldn't it? You can select which specific mesh element you're checking position of or distance to. > Distance is something you can easily find with a vector math node as well although it is very frequently used so would be a shame to drop it. Agreed that they could be combined. However, there is a difference between the position **of** the closest face and the closest position **on** the closest face, so we'd probably still need the position output. I would usually tend to remove redundant sockets like "Distance" but it seems fine if it stays too. > If they were to be reworked/changed, could the nearest Element node maybe get a toggle to "exclude self". Since these nodes are meant to work on a separate geometry from the context geometry, that doesn't really make sense here. That feature might make more sense in a field input node that doesn't have a geometry input. > Another suggestion: Attribute Transfer is used to facilitate index sorting and selection a lot, can we somehow make that easier? Doesn't that come back to [D13547](https://archive.blender.org/developer/D13547)? Or maybe we need a node to allow sorting somehow.

Added subscriber: @GeorgiaPacific

Added subscriber: @GeorgiaPacific

Added subscriber: @LeonardSiebeneicher

Added subscriber: @LeonardSiebeneicher

This issue was referenced by dedc679eca

This issue was referenced by dedc679ecabb43e79b0160a7c64bbd616adfa829

Added subscriber: @crantisz

Added subscriber: @crantisz

I personally like the way how the nodes were grouped into one. The adding menu is huge already, so that grouping nodes with same functionality seems to be good idea, otherwise, why don't you "ungroup" math node and vector math node?

I personally like the way how the nodes were grouped into one. The adding menu is huge already, so that grouping nodes with same functionality seems to be good idea, otherwise, why don't you "ungroup" math node and vector math node?

Added subscriber: @pauanyu_blender

Added subscriber: @pauanyu_blender
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Jacques Lucke self-assigned this 2022-10-20 15:16:42 +02: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 project
No Assignees
12 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#100010
No description provided.