Python Math Node (Blender 3.1+ & 4.0+Geometry Node)

€1 €0+
4 ratings




The file "Python Math.blend" contains the node "Python Math" for blender v3.1+ whereas the file "Python Math 4.0+.blend" contains the node "Python Math 4.0+" for blender v4.0+ (floored modulo function has been added). The nodes are marked as aset.

The Python Math Node allows calculations in python syntax - especially useful for complicated functions.


Setup:

Either append this file to your current project

(File > Append... > Python Math.blend > NodeTree > Python Math)

(File > Append... > Python Math 4.0+.blend > NodeTree > Python Math 4.0+)

or add to your asset browser (Edit > Preferences... > File Paths > Add Asset Library [+] and choose Python Math.blend or Python Math 4.0+.blend)



Slot explanation:

Show NodeInfo: Boolean to toggle node information display in geometry output.

X, Y and Z: Inputs accepting fields (attribute vectors).

a, b, c, d, f, g and h: Inputs accepting scalar float values.

Error-Msg/NodeInfo: Geometry output. Only for information purposes. Contains NodeInfo if active or error information such as unknown expressions, faulty brackets, missing numbers or operators or wrong number of function arguments for easy expression debugging (not perfect, but still helpful).

Value: Output for calculation results.



Supported expressions:

"+", "add(◦,◦)", "-", "subtract(◦,◦)", "*", "multiply(◦,◦)", "/", "divide(◦,◦)", "multiplyadd(◦,◦,◦)", "power(◦,◦)", "pow(◦,◦)", "**", "^", "log(◦,◦)", "log2(◦)", "log10(◦)", "sqrt(◦)", "abs(◦)", "exp(◦)", "<", "less(◦,◦)", ">", "greater(◦,◦)", "<=", ">=", "sign(◦)", "compare(◦,◦,◦)", "round(◦)", "floor(◦)", "//", "ceil(◦)", "trunc(◦)", "fraction(◦)", "%", "mod(◦,◦)", "modulo(◦,◦)", "wrap(◦,◦,◦)", "snap(◦,◦)", "pingpong(◦,◦)", "ping-pong(◦,◦)", "sin(◦)", "cos(◦)", "tan(◦)", "asin(◦)", "acos(◦)", "atan(◦)", "atan2(◦,◦)", "sinh(◦)", "cosh(◦)", "tan(◦)", "toradians(◦)", "todegrees(◦)", "smoothminimum(◦,◦,◦)", "smoothmaximum(◦,◦,◦)", "pi", "tau", "e"

Additional expressions for Blender v4.0+: "flooredmod(◦,◦)", "flooredmodulo(◦,◦)"


Caution:

This node relies on geometry operations and is therefore slower than using blender math nodes. Use is recommended for formula experimentation (to avoid large node trees while experimenting) or in single use cases. Avoid using for time/frame dependent calculations (e.g. simulation nodes). If calculation time is an issue, better translate the final formula back to blender math nodes.


Feel free to send bug reports to born2zorn@gmail.com


€1 off will be applied at checkout (Code B2Z_4FREE)
I want this!
8 sales

You'll get the "Python Math" & "Pyhon Math 4.0+" geometry nodes. Use python math syntax for calculations!

Copy product URL

Ratings

5.0
(4 ratings)
5 stars
100%
4 stars
0%
3 stars
0%
2 stars
0%
1 star
0%
€1 €0+

Python Math Node (Blender 3.1+ & 4.0+Geometry Node)

4 ratings
I want this!