Math with Nodes #68734

Open
opened 2019-08-16 16:29:28 +02:00 by Jacques Lucke · 28 comments
Member

Currently, there are two main math nodes: "[Float] Math" and "Vector Math". The current workflow for using these is that first the correct math node has to be inserted, and then the correct operation has to be selected. This approach has two problems:

  • It forces the user to do two steps for an operation that should only take a single step (e.g. "insert multiply node").
  • "Math" is a very generic term. When more operations are added, it becomes more and more unclear which should be added to the math node and which belong to another node. And the user has to remember that.

A more scalable approach is to remove the "Math" node entirely and create individual nodes for different operations. For example, there will be an "Add", a "Subtract" and a "Dot Product" node. These new nodes can adapt to the data types that are connected to them.

This is not a change we have to do in the short term, but in the long run it is the better solution in my opinion. Especially as we get more types and operations.

Currently, there are two main math nodes: "[Float] Math" and "Vector Math". The current workflow for using these is that first the correct math node has to be inserted, and then the correct operation has to be selected. This approach has two problems: - It forces the user to do two steps for an operation that should only take a single step (e.g. "insert multiply node"). - "Math" is a very generic term. When more operations are added, it becomes more and more unclear which should be added to the math node and which belong to another node. And the user has to remember that. A more scalable approach is to remove the "Math" node entirely and create individual nodes for different operations. For example, there will be an "Add", a "Subtract" and a "Dot Product" node. These new nodes can adapt to the data types that are connected to them. This is not a change we have to do in the short term, but in the long run it is the better solution in my opinion. Especially as we get more types and operations.
Jacques Lucke self-assigned this 2019-08-16 16:29:28 +02:00
Author
Member

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke
Member

Added subscriber: @EitanSomething

Added subscriber: @EitanSomething
Member

I generally like this idea, but it would take more time to switch between math operations

I generally like this idea, but it would take more time to switch between math operations
Author
Member

That is true. However, I'd argue that it is worth it. I expect that you have to switch the operation relatively rarely.

That is true. However, I'd argue that it is worth it. I expect that you have to switch the operation relatively rarely.
Member

Maybe a drop down menu by the name of the node would give options of the other nodes in the nodes path.

Example :You would be able to see everything inside of math section.

  • Math
  • Add
  • Subtract
Maybe a drop down menu by the name of the node would give options of the other nodes in the nodes path. Example :You would be able to see everything inside of math section. - Math - Add - Subtract
Member

Added subscriber: @Poulpator

Added subscriber: @Poulpator
Member

It's not possible to create shortcut to math node e.g insert "Multiply" add a math node with multiply operation ?

It's not possible to create shortcut to math node e.g insert "Multiply" add a math node with multiply operation ?
Author
Member

In #68734#754524, @Poulpator wrote:
It's not possible to create shortcut to math node e.g insert "Multiply" add a math node with multiply operation ?

Of course that is possible, I'm doing that for years already in Animation Nodes. But it does not solve the entire problem.

> In #68734#754524, @Poulpator wrote: > It's not possible to create shortcut to math node e.g insert "Multiply" add a math node with multiply operation ? Of course that is possible, I'm doing that for years already in Animation Nodes. But it does not solve the entire problem.

Added subscriber: @Momotron

Added subscriber: @Momotron

I agree Math sounds more like a general term and could be used for more complex nodes like decimal/exponential

I agree Math sounds more like a general term and could be used for more complex nodes like decimal/exponential

Added subscriber: @3di

Added subscriber: @3di

This could cause more problems than it solves.

Often people select the wrong type of function through lack of knowledge, then realise it when the results aren't as expected. Not much of a problem at the moment because you can change it easily from the existing node's dropdown. If you have to replace the entire node then it's a lot of steps to delete the node, add another node, and then hook things back up properly, if you get the math wrong a number of times this could become frustrating. Also the menus system would become bloated (although sub menus would help as Eitan suggested above).

I guess a solution that would fit all would be to have a sub menu off of the math listing, and then use whatever's selected to set the operation type in the math node's dropdown. That way it can be easily changed if necessary , and allow users to add with one click.

This could cause more problems than it solves. Often people select the wrong type of function through lack of knowledge, then realise it when the results aren't as expected. Not much of a problem at the moment because you can change it easily from the existing node's dropdown. If you have to replace the entire node then it's a lot of steps to delete the node, add another node, and then hook things back up properly, if you get the math wrong a number of times this could become frustrating. Also the menus system would become bloated (although sub menus would help as Eitan suggested above). I guess a solution that would fit all would be to have a sub menu off of the math listing, and then use whatever's selected to set the operation type in the math node's dropdown. That way it can be easily changed if necessary , and allow users to add with one click.

Added subscriber: @Rusculleda

Added subscriber: @Rusculleda

In #68734#761291, @3di wrote:
This could cause more problems than it solves.

Often people select the wrong type of function through lack of knowledge, then realise it when the results aren't as expected. Not much of a problem at the moment because you can change it easily from the existing node's dropdown. If you have to replace the entire node then it's a lot of steps to delete the node, add another node, and then hook things back up properly, if you get the math wrong a number of times this could become frustrating. Also the menus system would become bloated (although sub menus would help as Eitan suggested above).

I guess a solution that would fit all would be to have a sub menu off of the math listing, and then use whatever's selected to set the operation type in the math node's dropdown. That way it can be easily changed if necessary , and allow users to add with one click.

I know things should work fine by default, but node wrangler is an very commonly used shipped addon that maybe should be enabled by default, and it solves the problem you are pointing out (shift+s)

> In #68734#761291, @3di wrote: > This could cause more problems than it solves. > > Often people select the wrong type of function through lack of knowledge, then realise it when the results aren't as expected. Not much of a problem at the moment because you can change it easily from the existing node's dropdown. If you have to replace the entire node then it's a lot of steps to delete the node, add another node, and then hook things back up properly, if you get the math wrong a number of times this could become frustrating. Also the menus system would become bloated (although sub menus would help as Eitan suggested above). > > I guess a solution that would fit all would be to have a sub menu off of the math listing, and then use whatever's selected to set the operation type in the math node's dropdown. That way it can be easily changed if necessary , and allow users to add with one click. I know things should work fine by default, but node wrangler is an very commonly used shipped addon that maybe should be enabled by default, and it solves the problem you are pointing out (shift+s)
Member

Added subscriber: @EAW

Added subscriber: @EAW

Added subscriber: @MauroPfister

Added subscriber: @MauroPfister

Added subscriber: @lemenicier_julien

Added subscriber: @lemenicier_julien

Added subscriber: @BartekMoniewski

Added subscriber: @BartekMoniewski

Added subscriber: @hadrien

Added subscriber: @hadrien

If there's a single multiply node that can handle floats and vectors, how does it interface ? We should keep the value field when nothing's connected to the socket, but how should it behave then ? as a vector, or a single value field ?

If there's a single multiply node that can handle floats and vectors, how does it interface ? We should keep the value field when nothing's connected to the socket, but how should it behave then ? as a vector, or a single value field ?
Member

Added subscriber: @HDMaster84

Added subscriber: @HDMaster84
Member

In #68734#754521, @JacquesLucke wrote:
That is true. However, I'd argue that it is worth it. I expect that you have to switch the operation relatively rarely.

I do switch between math nodes all the time. It is like the blend modes for a color mix node. It does definitly make sense to put it in a single node. I really like how the current math node in cycles material nodes works right now. From a technical point of view it might not make sense but from an artistic point of view where experimentation is a common thing it does make sense.

We could add shortcuts to the most common math operations though (like multiply, add, substract, divide and power)

> In #68734#754521, @JacquesLucke wrote: > That is true. However, I'd argue that it is worth it. I expect that you have to switch the operation relatively rarely. I do switch between math nodes all the time. It is like the blend modes for a color mix node. It does definitly make sense to put it in a single node. I really like how the current math node in cycles material nodes works right now. From a technical point of view it might not make sense but from an artistic point of view where experimentation is a common thing it does make sense. We could add shortcuts to the most common math operations though (like multiply, add, substract, divide and power)
Member

Added subscriber: @CharlieJolly

Added subscriber: @CharlieJolly
Member

I touched on some design aspects in #73512 when looking to add a Vector Map Range to Cycles.

I touched on some design aspects in #73512 when looking to add a Vector Map Range to Cycles.
Contributor

Added subscriber: @RedMser

Added subscriber: @RedMser

Added subscriber: @Aeraglyx

Added subscriber: @Aeraglyx

Added subscriber: @1D_Inc

Added subscriber: @1D_Inc

In #68734#900376, @HDMaster84 wrote:

In #68734#754521, @JacquesLucke wrote:
That is true. However, I'd argue that it is worth it. I expect that you have to switch the operation relatively rarely.

I do switch between math nodes all the time. It is like the blend modes for a color mix node.

Yes, changing math node mode is like changing layers blending modes, like in photoshop or krita - with the ability to check the result immediately.

> In #68734#900376, @HDMaster84 wrote: >> In #68734#754521, @JacquesLucke wrote: >> That is true. However, I'd argue that it is worth it. I expect that you have to switch the operation relatively rarely. > > I do switch between math nodes all the time. It is like the blend modes for a color mix node. Yes, changing math node mode is like changing layers blending modes, like in photoshop or krita - with the ability to check the result immediately.
Philipp Oeser removed the
Interest
Nodes & Physics
label 2023-02-10 08:47:53 +01:00
Jacques Lucke removed their assignment 2023-02-22 18:11:28 +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 project
No Assignees
16 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#68734
No description provided.