Math function plotter inside blender

Hi all !

It’s been ages i say i need a math func drawer in blender for monitoring curves, response and anything in a curve drawing way according to shaders.

Some years ago, i made one in unity3D but never took the time to do it in blender.
Now it’s done :smiley:
And it’s pretty handy ! and simple !

The plane displayed is 20x20 ( -10 to +10 in all axes )
and it allows to display any func in this domain. if you need a wider domain, just scale up the plane. if you need accurate lookat, just roll the mouse wheel and zoom over your point of interrest.
That’s all :smiley:
Ah no… am not sure but… it looks like there’s a small bug in B-spline color ramp near x=0 :rofl:

So here’s the blend:
math_viewer.blend (749.6 KB)

Feel free to modify the shader and enhance it and share your results here :smiley:
It could easily be turned to an oscilloscope ( and more evolved measuring tool ).

Happy blending !

5 Likes

Man, this is really cool. I’ll put that into my startup file.
Why did I never think about this?

1 Like

Glad you like it :smiley:
I think we don’t thik about this till we hardly need it :rofl:
It is also in my startup file now…

Oh little question: Would you know a way for hiding the display plane so that it’s never seen in the 3D scene with models, but only in a separate 3D view ?
Collections are project-wide and the same for all 3D views :confused:

Well, there is the possibility of local collectinos.
Go to:
3D View → n-panel → View → Collections → checkbox “Local Collections”
Then you can turn the Collection off which the display panel is in.

Unfortunately this will have to be done each time you open a new 3D view because they are not set to “local collection” by default.

It can be added to the quick favorites, though.
In the local collections panel you can simply add the visiblity symbol of the display plane collection to the quick favorites.
And for the 3D view in which you want your display plane to be seen you can add the little circle left of the Collecion name to the quick favorites. The little circle is the “show only this collectoin” icon.

I gonna try this out :slight_smile: thanks @Lumpengnom

Happy blending !

Is this a commonly used thing I should feel stupid not knowing about or did you invent it?

sorry @Lumpengnom are you talking about the curve plotting ?
ahahah i guess even Pythagore used it :joy: so you surely know it :stuck_out_tongue:

For the principle it’s quite simple and based on comparisons and deltas ( thickness of the curve ). Some months ago i did it in unity3D in Shader Language and i did the same in blender as soon as i needed it :slight_smile:

Now for talking about oscilloscope, it comes from my past works in high speed electronics…

Don’t feel stupid man :stuck_out_tongue: we all learn things every day.

Happy blending !

Hehe, no I use curve plotting myself but with this online tool whose name I can not recall at the moment.
No I mean having a curve plotting shader to test shader math stuff within blender or your 3d app of choice. Now that I see it it seems so obvious yet it never occurred to me to use it like this.
So I just wondered if this was a commonly used technique I missed to pick up or if it was your idea.

1 Like

i guess it’s so common and obvious ( almost as much as handling binary things in shaders ) that i guess many other people did this before me and will do after ^^
IMHO the technique is not one as it’s quite simple and straightforward. It’s only the use of elementary math functions that reside in all shader languages.
Basically it was my idea just like was the idea of modeling Carcassonne for a real-time visit experience on low-end devices :stuck_out_tongue: I used tools to make a thing but i do not own the medieval city :rofl:

I wrote this when the state of the art didn’t answer my needs. When you googl math plot in GLSL or shader or blender you get many things but not what i wanted.

I made the unity shader, i’d say… almost 2 years ago for handling color & brightness of materials ( with their weird *2 on second maps ) and i also made it in blender some days ago. Now even if it was my idea ( 2 years old lol ) or not it’s nothing but a tool that i wanted to share here ^^ hoping people will make it better and also share here :slight_smile:

I can imagine the wide potential of this lil pack of nodes… even showing maths in classrooms; easily and securely modified by people… even going forward with neural nets and almost realtime result displaying…

It’s nothing but a tool. And it will be nothing more than what ppl do with it :wink:

Enjoy and share :smiley:
And thanks a lot for you interrest and enthousiasm :smiley:

Happy blending !

1 Like