Math formula node
Complicated node networks often have a lot of connected math nodes in them. You could simplify them a lot by having a math formula node. This would have multiple inputs (labeled x, y , z...), a text box where you can enter a math formula and then a single output.
You can then for example just enter “sqrt(x^2+y^2+z^2)” and this would replace 6 math nodes that would otherwise be needed; and at the same time it is much easier to see what is going on at a quick glance.
8 Comments
I wished having this a multiple times too.
I started working on a code to accomplish this task.
I think this needs special attention, even wonder wtf this still s not implemented in the master branch... :(
Also need this for geometry nodes attribute math. If you want to keep everything clean you have to name all the intermediate results, which causes even more overhead/bloat.
Edit: This has been somewhat mitigated by the introduction of attribute fields.
there's a scripting node, if you're wanting to write complex expressions that seems like it would be the thing to use?
* @testure * I looked into the scripting node to do exactly this. I couldn't make it work. I even copied someone else's code. No inputs or outputs were being created. :(
Otherwise I would say this sounds like a great solution.
* @testure * I don't think this is the best approach though. I don't really like the idea of new data blocks being created just to do some math.
* @testure * I didn't know about that, thanks for mentioning. However it is overkill for simple math expressions, you shouldn't have to learn a scripting language for that. Also, as the script code isn't displayed in the node itself, it obfuscates rather than simplifies the node networks.
This is currently in development for all node editors ( #149091 ) and it looks very promising. Hopefully it will land in 5.1.