← All ideas
  • Published 13 Aug 2022

Multiple Inputs for Math Operations

A Node that allow a lot of input for commutatives operations like Add and Multiply . SumNode.png AddAddAddAddAddAddAddAddAddAddAddAdd.png

100%

Development Status: Open

Upvote 51 Downvote 0
arthurbourquin
13 Aug 2022

8 Comments

hariedo

Also Boolean AND, OR, MAXIMUM, etc.

8
skypatcher

It is the associativity of the operation that allows us to combine arbitrary number of operands. Associativity is required because the manner of 'merging' of two sockets at a time is not explicitly marked in the sockets. Commutative property is not required because the order of the sockets is clear. It just happens that Add, Multiply, Or, And, Min, Max, etc are associative and commutative.

If the order of 'merging of two sockets' is explicitly specified: example: from top to bottom; then neither associativity nor commutative property is required. This is just to explain my previous remarks, NOT necessary an argument to support implementing multi-sockets for subtraction or the likes.

While commutativity is not required, I do think both associativity AND commutativity should be required for implementation of multi-sockets, because when working with a small elongated socket, it is so easy to accidentally rearrange the noodles up and down; hence changing the order. Commutativity will guarantee such rearrangement will not cause any harm.

4
modormoder

It is on the list of what I will try to add, although it will not be soon (Until then, anyone can do it). The main difficulty for the design so far is how to make a shader of arbitrary complexity to support this in the render.

3
arthurbourquin Author

Ok, thanks for the reply. I have a trick to sum values with the Accumulate Field for now.

modormoder

Updated news. Things got even more complicated, now it will potentially be on a new random number socket that got into the plans after the dev conference.

jd.knox

"how to make a shader of arbitrary complexity to support this in the render."

Could you elaborate? Do you mean it's difficult to translate the node into shader code for a GPU?

Do you have a link where this is being discussed at a lower level?

modormoder

No progress yet, but it was decided that it would be a good idea to present this as an expandable multi-socket

jd.knox

Like the dynamic sockets of the Group Input/Output nodes?

This was my idea as well. Do you have a link where this is being discussed?