Attribute Processor for UX improvement #85655

Closed
opened 2021-02-15 14:26:39 +01:00 by Dalai Felinto · 36 comments

Plan of Attack

  • Support changing the data type of a group input/output socket.
  • New nodetree type with domain property, and treating geometry in/out sockets differently (they are not shown inside.
  • Group input/output socket option to expose it outside or leave it only inside.

Design

A new nodegroup type that supports attribute dataflow. This is added as a node and created from inside out (as oppose to the existing Node Group where you first group existing nodes).

  • The domain (point, corner, ...) is exposed outside as a node property.
  • When creating new input/output sockets users can type the name of the attribute directly.
  • This uses the attribute search
  • This creates a new input/output with the default value matching its name.
  • Connecting sockets to the Group Input/Output nodes also work

Changes that affect other node groups as well:

  • The node group datablock show go to the sidebar.
  • The socket input/output can have its type changed (Color/Geometry/String/...).

{F9887618, size=full}

Background

While the attribute workflow is a powerful way to do complex operations, and its generality will make it useful in a lot of situations, but common feedback is that node trees will become very linear, because temporary values must be stored in attributes, rather than passed around with node links.

This is an example of a typical more complex attribute operation. While just a few attribute nodes are simple and easily readable, this sequence of nodes is hard to understand.
{F9805345, size=full}

Key Concepts

  • Scope This node only changes attributes, and it can only read attributes. It is not a change to the entire execution method of geometry nodes.
  • Visually, this is a variation of a node group:
    It has two different kinds of inputs: Group Inputs and Attributes Inputs (strings) - besides the Geometry It has no outputs - besides the Geometry
    ** When collapsed more attribute inputs can be visible (the ones not exposed).
  • Attributes are added explicitly on the left side of the node, it does not automatically populate with all available attributes.
  • Domain selector on the left side This defines the "element" part of the processor idea. Every input attribute will be read with this domain, with interpolation if necessary.
  • Data type selection Because it is not possible to know the data type of every attribute statically (without executing the node tree), this information needs to be stored by the node for each attribute.
    When you add a new input attribute with the + button, the data type is chosen based on the data stored for "attribute search". After, you can adjust the input data type. I propose putting this option in a drop-down next to the attribute.
    ** You can decide to expose the attribute as an input attribute visible/editable when the node is collapsed.
  • The node can use the function nodes evaluation system, so any node supporting that can be used (currently only nodes available in the geometry node tree).
### Plan of Attack - [ ] Support changing the data type of a group input/output socket. - [ ] New nodetree type with domain property, and treating geometry in/out sockets differently (they are not shown inside. - [ ] Group input/output socket option to expose it outside or leave it only inside. ### Design A new nodegroup type that supports attribute dataflow. This is added as a node and created from inside out (as oppose to the existing Node Group where you first group existing nodes). * The domain (point, corner, ...) is exposed outside as a node property. * When creating new input/output sockets users can type the name of the attribute directly. * This uses the attribute search * This creates a new input/output with the default value matching its name. * Connecting sockets to the Group Input/Output nodes also work Changes that affect other node groups as well: * The node group datablock show go to the sidebar. * The socket input/output can have its type changed (Color/Geometry/String/...). {[F9887618](https://archive.blender.org/developer/F9887618/mockup-processor.png), size=full} ### Background While the attribute workflow is a powerful way to do complex operations, and its generality will make it useful in a lot of situations, but common feedback is that node trees will become very linear, because temporary values must be stored in attributes, rather than passed around with node links. This is an example of a typical more complex attribute operation. While just a few attribute nodes are simple and easily readable, this sequence of nodes is hard to understand. {[F9805345](https://archive.blender.org/developer/F9805345/image.png), size=full} ### Key Concepts * **Scope** This node *only* changes attributes, and it can only read attributes. It is *not* a change to the entire execution method of geometry nodes. * Visually, this is a variation of a node group: **It has two different kinds of inputs: Group Inputs and Attributes Inputs (strings) - besides the Geometry** It has no outputs - besides the Geometry ** When collapsed more attribute inputs can be visible (the ones not exposed). * Attributes are added explicitly on the left side of the node, it does not automatically populate with all available attributes. * **Domain selector on the left side** This defines the "element" part of the processor idea. Every input attribute will be read with this domain, with interpolation if necessary. * **Data type selection** Because it is not possible to know the data type of every attribute statically (without executing the node tree), this information needs to be stored by the node for each attribute. **When you add a new input attribute with the `+` button, the data type is chosen based on the data stored for "attribute search".** After, you can adjust the input data type. I propose putting this option in a drop-down next to the attribute. ** You can decide to expose the attribute as an input attribute visible/editable when the node is collapsed. * The node can use the function nodes evaluation system, so any node supporting that can be used (currently only nodes available in the geometry node tree).
Author
Owner

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

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

Added subscriber: @dfelinto

Added subscriber: @dfelinto
Hans Goudey self-assigned this 2021-02-15 14:29:12 +01:00
Hans Goudey changed title from Attribute "Container" for simplified nodetrees for UX improvements to Attribute "For Each Element Frame" for UX improvement 2021-02-15 21:59:34 +01:00
Member

Added subscriber: @lone_noel

Added subscriber: @lone_noel
Contributor

Added subscriber: @AndresStephens

Added subscriber: @AndresStephens
Contributor

Could be a nice replacement for groups, or to add this kind of IN/OUT nodes inside of groups, but I don't think it's a good alternative to what groups provide. Though for looping structures, this would make sense.

Could be a nice replacement for groups, or to add this kind of IN/OUT nodes inside of groups, but I don't think it's a good alternative to what groups provide. Though for looping structures, this would make sense.

Added subscriber: @MiroHorvath

Added subscriber: @MiroHorvath
Member

Added subscriber: @CharlieJolly

Added subscriber: @CharlieJolly
Member

In #85655#1112593, @AndresStephens wrote:
Could be a nice replacement for groups, or to add this kind of IN/OUT nodes inside of groups, but I don't think it's a good alternative to what groups provide. Though for looping structures, this would make sense.

The For Each Element Frame title suggests looping but I'm not clear if this task is suggesting it is for looping or not. Can this be clarified or will that be another task?

> In #85655#1112593, @AndresStephens wrote: > Could be a nice replacement for groups, or to add this kind of IN/OUT nodes inside of groups, but I don't think it's a good alternative to what groups provide. Though for looping structures, this would make sense. The **For Each Element Frame** title suggests looping but I'm not clear if this task is suggesting it is for looping or not. Can this be clarified or will that be another task?
Member

This isn't about looping. It's about using a different evaluation method to change attributes on a geometry.

This isn't about looping. It's about using a different evaluation method to change attributes on a geometry.
Contributor

Added subscriber: @KenzieMac130

Added subscriber: @KenzieMac130
Contributor

How about the name along the lines of "Attribute Processor"? Since the user is designing a network which processes attributes in a sandboxed environment.

I think this name also adapts well if the process was done in parallel since a "for loop" concept might make the user expect or want some sort of feedback from a "previous itteration" which in this case cannot be guaranteed.

How about the name along the lines of "Attribute Processor"? Since the user is designing a network which processes attributes in a sandboxed environment. I think this name also adapts well if the process was done in parallel since a "for loop" concept might make the user expect or want some sort of feedback from a "previous itteration" which in this case cannot be guaranteed.
Member

I like that name a lot, thanks!

I like that name a lot, thanks!
Hans Goudey changed title from Attribute "For Each Element Frame" for UX improvement to Attribute Processor for UX improvement 2021-02-19 18:07:48 +01:00

Added subscriber: @brecht

Added subscriber: @brecht

This seems quite similar to what we need for new texture nodes #54656 (Cycles/Eevee texture nodes for modifiers, painting and more). I imagine you'd want to be able to access the same kinds of texture nodes, color ramps, etc here too. The big difference being that in this attribute processor design the attributes are passed in explicitly, whereas in texture nodes they are brought in through nodes, either explicitly by name or automatically by some node types. So hopefully both systems can shared a lot of code in the end or even converge to the same thing.

An alternative would be to support evaluating expressions. Again not quite the same since they only evaluate to a single value and the UI is quite different, but in many cases it's a solution to the same problem. We already have an implementation for drivers:
https://developer.blender.org/diffusion/B/browse/master/source/blender/blenlib/BLI_expr_pylike_eval.h

This seems quite similar to what we need for new texture nodes #54656 (Cycles/Eevee texture nodes for modifiers, painting and more). I imagine you'd want to be able to access the same kinds of texture nodes, color ramps, etc here too. The big difference being that in this attribute processor design the attributes are passed in explicitly, whereas in texture nodes they are brought in through nodes, either explicitly by name or automatically by some node types. So hopefully both systems can shared a lot of code in the end or even converge to the same thing. An alternative would be to support evaluating expressions. Again not quite the same since they only evaluate to a single value and the UI is quite different, but in many cases it's a solution to the same problem. We already have an implementation for drivers: https://developer.blender.org/diffusion/B/browse/master/source/blender/blenlib/BLI_expr_pylike_eval.h
Member

Right, I believe Jacques has been talking about expression node for a while. Personally I would strongly prefer to prioritize a node-based approach first.

It's a bit silly, but a texture fits surprisingly well into the idea of geometry component attributes. So I expect it wouldn't be too hard to share code, it should just be a matter of gathering the input and output arrays and making sure the relevant nodes have a multi-function implementation.

Right, I believe Jacques has been talking about expression node for a while. Personally I would strongly prefer to prioritize a node-based approach first. It's a bit silly, but a texture fits surprisingly well into the idea of geometry component attributes. So I expect it wouldn't be too hard to share code, it should just be a matter of gathering the input and output arrays and making sure the relevant nodes have a multi-function implementation.
Member

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke
Member

I think it should be relatively straight forward to use some node groups in shading and geometry nodes (and possibly other contexts). Obviously, only a subset of the available nodes can be used in such node groups.
The Attribute Processor design mockups are mostly just syntactic sugar for the geometry nodes context imo. The same functionality could be achieved without introducing new ui concepts. E.g. one could just have a different kind of Group node (which is similar to what I did in Animation Nodes, given that I couldn't introduce new ui concepts there).

I think it should be relatively straight forward to use some node groups in shading and geometry nodes (and possibly other contexts). Obviously, only a subset of the available nodes can be used in such node groups. The Attribute Processor design mockups are mostly just syntactic sugar for the geometry nodes context imo. The same functionality could be achieved without introducing new ui concepts. E.g. one could just have a different kind of Group node (which is similar to what I did in Animation Nodes, given that I couldn't introduce new ui concepts there).

Added subscriber: @hadrien

Added subscriber: @hadrien

I'm not sure why a new UI is necessary since this seems to cover exactly what node groups do ? Is the idea to communicate to the user that they are working in a special sandbox and only certain nodes are allowed ?(as opposed to a regular node group which has no such limitations)
Apart from that you have my blessing. I've also started finding long string of attribute nodes unnecessarily difficult to read.

With the introduction of this attribute processor, would attribute-specific nodes still be necessary ? (attribute color ramp, etc) Would they keep existing alongside the attribute processor ?

I'm not sure why a new UI is necessary since this seems to cover exactly what node groups do ? Is the idea to communicate to the user that they are working in a special sandbox and only certain nodes are allowed ?(as opposed to a regular node group which has no such limitations) Apart from that you have my blessing. I've also started finding long string of attribute nodes unnecessarily difficult to read. With the introduction of this attribute processor, would attribute-specific nodes still be necessary ? (attribute color ramp, etc) Would they keep existing alongside the attribute processor ?
Contributor

In #85655#1118629, @hadrien wrote:
With the introduction of this attribute processor, would attribute-specific nodes still be necessary ? (attribute color ramp, etc) Would they keep existing alongside the attribute processor ?

I feel like the already existing attribute nodes can stay since they are useful in a pinch when you want to just do a simple operation or two (maybe the attribute texture would need to eventually be depreciated and moved to a processor when the blender internal textures are finally removed). Aside from that there would likely need to be other attribute management nodes (like delete, set defaults, and rename) that wouldn't fit well in the attribute processor design.

> In #85655#1118629, @hadrien wrote: > With the introduction of this attribute processor, would attribute-specific nodes still be necessary ? (attribute color ramp, etc) Would they keep existing alongside the attribute processor ? I feel like the already existing attribute nodes can stay since they are useful in a pinch when you want to just do a simple operation or two (maybe the attribute texture would need to eventually be depreciated and moved to a processor when the blender internal textures are finally removed). Aside from that there would likely need to be other attribute management nodes (like delete, set defaults, and rename) that wouldn't fit well in the attribute processor design.
Author
Owner

@brecht is the idea for texture nodesfor them to be part of the material nodetree? as a special "custom texture" node?

@brecht is the idea for texture nodesfor them to be part of the material nodetree? as a special "custom texture" node?

In #85655#1118781, @dfelinto wrote:
@brecht is the idea for texture nodesfor them to be part of the material nodetree? as a special "custom texture" node?

I think it's effectively a node group with an arbitrary number of inputs and outputs, that supports a subset of all shader nodes and can be created or used outside of materials. So it would be integrated the same as a shader node group, but with naming / icons / coloring to distinguish it.

> In #85655#1118781, @dfelinto wrote: > @brecht is the idea for texture nodesfor them to be part of the material nodetree? as a special "custom texture" node? I think it's effectively a node group with an arbitrary number of inputs and outputs, that supports a subset of all shader nodes and can be created or used outside of materials. So it would be integrated the same as a shader node group, but with naming / icons / coloring to distinguish it.

Added subscriber: @RC12

Added subscriber: @RC12

Added subscriber: @Erindale

Added subscriber: @Erindale

Added subscriber: @lateasusual

Added subscriber: @lateasusual
Contributor

Added subscriber: @IyadAhmed

Added subscriber: @IyadAhmed
Member

Here are a few thoughts on the interface side of this:

  • While it might not be strictly necessary, a UI that is different from existing node groups should be prioritized to make this usable (after all, the task is for UX improvement).
  • If it's possible to collapse this, it should be possible to see both the input and output attribute names in separate lists on the collapsed version.
  • If it's possible to collapse this, it should not work like a frame node. Instead the node group should always display collapsed on the top level, and open like in the mockups when you enter the node group.
  • Input attributes are interpolated to the domain chosen in the drop-down, and all output attributes use that domain as well. The domain choice is very important.
  • Input attributes are read with a certain data type chosen statically in the interface. The data type can be chosen automatically with a similar method to attribute search when you add a new input attribute, but it must be possible to change this with a drop-down.
  • Any drop-down choices should be exposed in the main node editor region, not just the sidebar.
  • Connecting a link from inside the "frame" to the right side can add an attribute output, but you would need to choose the name.
Here are a few thoughts on the interface side of this: - While it might not be strictly necessary, a UI that is different from existing node groups should be prioritized to make this usable (after all, the task is for UX improvement). - If it's possible to collapse this, it should be possible to see both the input and output attribute names **in separate lists** on the collapsed version. - If it's possible to collapse this, it should **not** work like a frame node. Instead the node group should always display collapsed on the top level, and open like in the mockups when you enter the node group. - Input attributes are interpolated to the domain chosen in the drop-down, and all output attributes use that domain as well. The domain choice is very important. - Input attributes are read with a certain data type **chosen statically in the interface**. The data type can be chosen automatically with a similar method to attribute search when you add a new input attribute, but it must be possible to change this with a drop-down. - Any drop-down choices should be exposed in the main node editor region, not just the sidebar. - Connecting a link from inside the "frame" to the right side can add an attribute output, but you would need to choose the name.

Added subscriber: @BartekMoniewski

Added subscriber: @BartekMoniewski

Added subscriber: @karmaral

Added subscriber: @karmaral

Added subscriber: @satishgoda1

Added subscriber: @satishgoda1
Author
Owner

For the records, I removed these mockups since they are outdated. I also removed any reference to layout since this behaves more like a node group.

"The same behavior can be basically recreated with non-attribute nodes executed per every element. Here is a rough mockup of that same node tree with parallel evaluation:"
Per Element Frame.png
"And a different take on visuals by @lone_noel:"
image.png

For the records, I removed these mockups since they are outdated. I also removed any reference to layout since this behaves more like a node group. "The same behavior can be basically recreated with non-attribute nodes executed per every element. Here is a rough mockup of that same node tree with parallel evaluation:" ![Per Element Frame.png](https://archive.blender.org/developer/F9805352/Per_Element_Frame.png) "And a different take on visuals by @lone_noel:" ![image.png](https://archive.blender.org/developer/F9805363/image.png)
Author
Owner

Updated the task with the discussions the node group team had today. I added the following:

Plan of Attack

  • Support changing the data type of a group input/output socket.
  • New nodetree type with domain property, and treating geometry in/out sockets differently (they are not shown inside.
  • Group input/output socket option to expose it outside or leave it only inside.

Design

A new nodegroup type that supports attribute dataflow. This is added as a node and created from inside out (as oppose to the existing Node Group where you first group existing nodes).

  • The domain (point, corner, ...) is exposed outside as a node property.
  • When creating new input/output sockets users can type the name of the attribute directly.
  • This uses the attribute search
  • This creates a new input/output with the default value matching its name.
  • Connecting sockets to the Group Input/Output nodes also work

Changes that affect other node groups as well:

  • The node group datablock show go to the sidebar.
  • The socket input/output can have its type changed (Color/Geometry/String/...).

{F9887618, size=full}

Updated the task with the discussions the node group team had today. I added the following: ### Plan of Attack - [ ] Support changing the data type of a group input/output socket. - [ ] New nodetree type with domain property, and treating geometry in/out sockets differently (they are not shown inside. - [ ] Group input/output socket option to expose it outside or leave it only inside. ### Design A new nodegroup type that supports attribute dataflow. This is added as a node and created from inside out (as oppose to the existing Node Group where you first group existing nodes). * The domain (point, corner, ...) is exposed outside as a node property. * When creating new input/output sockets users can type the name of the attribute directly. * This uses the attribute search * This creates a new input/output with the default value matching its name. * Connecting sockets to the Group Input/Output nodes also work Changes that affect other node groups as well: * The node group datablock show go to the sidebar. * The socket input/output can have its type changed (Color/Geometry/String/...). {[F9887618](https://archive.blender.org/developer/F9887618/mockup-processor.png), size=full}
Contributor

(Edit: Upon further inspection of the mockup it seems the potential issue was already accounted for)

(Edit: Upon further inspection of the mockup it seems the potential issue was already accounted for)

Added subscriber: @CreatorSiSo

Added subscriber: @CreatorSiSo

I think the best way of doing this is actually to introduce the attribute prozzesor node which allows you to select a attribute nodes graph like for a group node (but just with this graph type) and then opening the graph via TAB in a completely new nodes editor (no transperancy like in a group node). This is also how i would structure everything nodes in general because it just makes sence to dive deeper into the Objects/Geometry/Attributes for all of the little parts you want add to something (also its probably best way to do iterational and more complex stuff like bluring and so on in a place with a lot of space and not inside a frame inside the geometry nodes

not like this:

Per Element Frame.png

image.png

Also the other nodes that use should obviosly stay because they are used to manipulate the geometry with attributes and the attribute nodes would be uses to make changes to one or multiple attributes.

I think the best way of doing this is actually to introduce the attribute prozzesor node which allows you to select a attribute nodes graph like for a group node (but just with this graph type) and then opening the graph via TAB in a completely new nodes editor (no transperancy like in a group node). This is also how i would structure everything nodes in general because it just makes sence to dive deeper into the Objects/Geometry/Attributes for all of the little parts you want add to something (also its probably best way to do iterational and more complex stuff like bluring and so on in a place with a lot of space and not inside a frame inside the geometry nodes not like this: > ![Per Element Frame.png](https://archive.blender.org/developer/F9805352/Per_Element_Frame.png) > ![image.png](https://archive.blender.org/developer/F9805363/image.png) Also the other nodes that use should obviosly stay because they are used to manipulate the geometry with attributes and the attribute nodes would be uses to make changes to one or multiple attributes.
Author
Owner

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
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
17 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#85655
No description provided.