Created by: DolphinDream
Howdy y’all :) I have played with an idea of a new node which I called mixNumbers (for lack of a better name) which is basically mixing numbers with some interpolation and I wanted to get your feedback.
This node is currently interpolating two values (ints or floats) using a selectable interpolation and easing option (the ones already supported in blender for f-curves). I borrowed most of the interpolation code actually from AnimationNode (thanks Jacques Lucke .. I hope you don’t mind) since i don’t think blender exposes these interpolation functions to the BPY. The node is vectorized of course. Also the interpolation parameters for the more complex interpolation (e.g elastic, exponential, bouncing etc) are hidden in the tool bar (extra parameters) so the user can still adjust these interpolations rather than using some default hardcoded values (more power to the users).
Any suggestions, comments, critique ?
I know that this node could be broken into two.. one that does just interpolation, and one that does a mix of two values with a given factor. I decided to combined them into one since I think the users may frequently do this kind of mixing anyway. If they don’t want a sophisticated interpolation they can just use this node with the linear interpolation which is: f = v1*(1-f) * v2*f (where f=0..1) which will give them the typical mix functionality found in other blender nodes.
I was also thinking of adding another “number” type to the node, namely a vector type and even a matrix or color? I don’t want to turn this into a frankenstein node, but if it makes sense to have a swiss army knife type of value interpolator node then perhaps it’s worth adding them. Perhaps at that point the node would be called simply Uber-Mix :)
Also I remember seeing a node somewhere (perhaps animation nodes?) where you can add any number of numbers (inputs) to a mix node and the interpolation is done for all of them v1 -> v2 -> v3 etc. I’m not sure how useful would this be in sverchock, but it’s an idea to keep in mind.
Also it would be great to have some sort of visualizer that can show the exact curve the interpolation is generating.. similar to the viewer node but to draw an f(x) curve (if it’s possible). Could such functionality be added to a stethoscope node ?
Here some blend files I used for the developing and testing. I put them on pasteall.org site for now since I don’t know what’s the best way to add non-image files to GitHub yet (any suggestions are welcome)
MixNumberNodeDev http://pasteall.org/blend/index.php?id=45517
MixNumberNodeTest1 http://pasteall.org/blend/index.php?id=45518