Evaluate/ExpressionPOP for complex Math operations?

So we can all agree that the Math Combines can get quite busy easily and it can be a hassle to set them up with all the blocks and then also parse them (middle-click info is great though), which makes the GLSL POP appealing even for what are basically one-liners.

I remember @greg mentioning at the MHS meetup that there’s a tool in the works that converts equations to Math Combine blocks, or something like that.

Would it not make sense to just give us the ability to type out e.g. P + Noise * AttenuateLookup in a field in the Math Combine and the like, or a new operator as Evaluate/ExpressionPOP or similar?

Or even mapping attributes/values/expressions to A, B, C, … etc and letting the user type out A + B * C and more whacky equations (possibly allowing in-line GLSL calls such as length min etc.).

I’ve done something similar in GLSL in a fractal explorer tool of mine that let me do something similar, and was a great way to do some quick math:


(The equation turns into a #define which gets prepended to the GLSL code in this case)

Curious of your thoughts and design choices around this!

3 Likes

Thanks for the suggestion @function.store.
This isn’t the first time this kind of operator has been proposed. I logged the suggestion so we can discuss it with the team.

2 Likes

Here’s a proof-of-concept!

expressionPOP.tox (39.9 KB)

In the end it’s just a quick wrapper, but I can imagine this making life easier.

1 Like