Feedback request; add curve profiles to the map range node or new node for curve functions?

In my work, I come across a situation quite often, especially when working with volumes and procedural materials, where every node that reads a bezier curve (color ramp, vector curves, etc) cannot accurately make a formulaic curve, and on top of it, have limited resolution well before float errors should be occurring.

I want a node that can output a curve between two values. The map range node could hold this functionality, but I’m conflicted, as map range would also limit useful side-features, like extrapolation, or additional options for each formula, but it’s all technically doable in nodes already.

The issue is, the map range node already has some curve profiles built in. As well, they are arbitrary, not based in commonly known math, whereas my node would map things to a math function within a range… essentially the same thing. This may sound like an easy “just add to the map range node”, however, there are definite pros and cons to adding a new node for this. From what I can tell, they basically boil down to:
cons:
“more nodes take more work to maintain, there’s already a similar functionality in map range node, there hasn’t been a distinct call for this outside of my own, and all these functions are technically doable in a node group.”
pros:
“a new node would be able to introduce new functionality like a default output, blending, or extrapolation, if you add it to map range, you’ll flood its drop downs with dozens of options, map range already has more lines of code than 90% of all nodes and adding a dozen more options could triple it, and adding function curves to map range would be new functionality- all its current curves are arbitrary.”

an example of what can be done right now just adding more functions to map range


I’m already successful at adding to map range, and as a novice, it was striking how many files I had to change to do it, though from what I understand half was the UI element.

so, I need some input.
Should I just roll it into the map range node?
If it was its own node, what are your thoughts, additions or needs for it to be useful?
Am I asking for something better tackled by a node group collection?

It really depends on which functions you want to add, and how many. Maybe it logically fits, maybe not.

that’s sort of my point, too, and my idea of it is currently in flux- for the last week I’ve found a dozen reasons why it’s good, and why it’s unnecessary.

For example, most people add atmospheres to planets by stacking color ramps and hoping their bezier resolutions don’t make an interference pattern and accept a hard cutoff, or using pure math nodes to calculate falloff between values from the surface of a sphere or something… it’s clear anything but math nodes just aren’t up for parametric values that precise.

I thought I would just add the basic interpolations found elsewhere in blender- sinusoidal, quadratic, circular… However, I noticed many of them, such as square root, have interesting math that go beyond the 0-1 range it’s limited to when naively added to map range,


and it would be useful to have a checkbox to extrapolate it, or one where you can smoothly adjust the functions’ values for interpolation using proper inputs, instead of just having arbitrary “smooth”, “smoother” interpolation. There’s nowhere else in all of blender that uses “smoother interpolation”, either (which made it easy to search where I needed to add to, but still).

something in my head doesn’t like the idea of taking a node with 500+ lines of code, and bloating it more, too, even if most people would probably agree the basic interpolation modes make sense to add.

so, here I am, while I figure out how to fix reflection normal maps elsewhere in blender, asking for interest, so someone can say “get on it”, “actually, adding x would make it worth being a node” or “stick to your node groups”.

Smoothstep and smootherstep are well known interpolation functions in graphics, not that arbitrary. I think if there are a few others generally useful interpolation functions they can be added, but not dozens.

But it’s hard to given an opinion without a list of functions you want to add.

ah, well excuse me, then. I knew I’d seen it before, but I’ve never been exposed to those formulas in math or computer science, so I assumed they were the sort of thing that had tons of variations all over various softwares.

The biggest feature that I’m interested in adding is extrapolation, along with functions that would benefit from it, I think. Those are the main things that don’t fit with the current map range node. Note that I’m not all too interested in extrapolation. just that it should probably be added if there are functions that have useful values beyond 0-1.
As for what interpolation I’d want to add, specifically, the ones we already have elsewhere, plus a few others:

interpolation (in, out):
sinusoidal, quadratic, cubic, quartic, quintic, exponential, circular, sigmoid, half-sigmoid
(most of these could be done by adding an exponent option, and are separate in interpolation because anything between them is rarely needed, if I recall)

easing (in, out, both):
back, bounce, elastic

the biggest issue is that adding things like an extrapolate checkbox or an extra input that appears when you change the mode feels like a complication for what should be a simple node.

and, once again, I’m even more conflicted, because I don’t want to bloat the node, or its drop-down… but then the math node is sitting there like


with most of the functions I just mentioned, and more- the very ones I use to do this without a dedicated node- which again begs the question of whether or not this is even remotely necessary!..

from an artist perspective, it can be a timesaver, and help artists who aren’t mathematically inclined. on the other hand, if we get built in node groups it would probably be just as good there.