What’s the math behind Noise Texture Node?

No worries! It wasn’t patronizing at all!

1 Like

@Orange_Cat I’ve seen your previous posts here (and elsewhere), and I’m surely missing something in your arguments!

You’re asking about the math of shaders and render stuff, but you’re unwillingly embrace the idea of coding or even about algorithmic logic?

You cannot split the two, in order to understand what’s happening. You need to know why!

A shading function is something that is called for every independent fragment of your render. A Pixel, a Ray, a Sample, you name it.
This function has a lot of limitations! It doesn’t knows what’s it’s right next to it unless you tell them that specifically. Of course you can think that you may feed it with the information all together with the fragment you want to probe, but a computer processor cannot handle so much information at the same time and it will be spending most of the time moving around amounts of data instead of calculating something… And your render will last years;
… Or you find something clever to do something similar with the minimum of bandwidth.

In case of shading functions, a typical solution is to use some lattice grids, where the data for each lattice point is generated by some PseudoRandom function that produces allways the same result whenever it’s called. And the result of some point X will just be the median (or some other function) between just the neighbouring lattice points that can be Pseudo generated, so each call to the sample function don’t need to get a specifc ammount of data from anywhere.

And that said… here’s the basics:

  • Simple shadings are typically an algebraic or trignometric function.
  • Noise functions normally use the lattice coordinate for a random value.
  • Worley/Cell or Gabor noise use that value as a seed for a secondary function for generating other attributes inside a lattice cell (from floor(x) to ceil(x))
    (WorleyNoise is the correct term for what you name as “Voronoi”… You don’t have a true Voronoi shader in Blender!)
  • Recursion(or fractal) is achieved by scaling the lattice grid and adding (or something else) the same result.
  • And all these can be sampled many types with specific seeds for their random functions in order to get values, colors, etc.

And for a nice (not so programming directed, although inevitable) readings, I’d advise you to read all of this website.

3 Likes

Thank you for the thoughtful post.

your previous posts here (and elsewhere)

Good catch. I post literally everywhere, DevTalk, Reddit, StackExchange, BlenderArtists, (…) and hope that I get the answer.


To summarize, I’m more of an artist (specifically, a Blender user/artist), and I only study the math of whatever function that exists in Blender. How I study math is:

  1. Look at the functions that are available in Blender.
  2. Check if there is any function that I don’t know how to use (in other words, don’t understand the math behind it).
  3. Research online about that function and study the math behind it.

I only care about how to create a shape in Blender procedurally, for example, I want to create Sine waves, if I hadn’t known about Trigonometry in Math then I wouldn’t be able to pick the specific node/function implemented in Blender that creates Sine waves. And once I studied math, I know that Sine function creates Sine waves, so I picked Sine node. So I successfully achieved what I desired. And even better, after learning math, I now know how to flatten the waves, stretch it, slice it, (…)
So that’s the reason why I didn’t learn coding, because learning math was sufficient enough for me to use Blender procedurally.

but you’re unwillingly embrace the idea of coding or even about algorithmic logic

I do study the algorithm of any function if it’s available, I just don’t code. I wanted to use Smooth Minimum but didn’t know how to use it, so I’ve studied and derived everything about Inigo Quilez’s Smooth Minimum’s algorithm, and once I’ve got it, I use it in Blender. Still, didn’t touch codes.

This function has a lot of limitations!

Thank you, I get it. But I’m not smart enough to digest math, codes and art at the same time like you guys here. I only intended to make arts but got myself into math after having seen the vast potential of procedural modelling, and I got what I anticipated. I’m aware that the shader functions are limited and I’m missing a lot of things, but it’s also because my brain is too limited to learn new things.

(WorleyNoise is the correct term for what you name as “Voronoi”… You don’t have a true Voronoi shader in Blender!)

Thank you, I’m aware. However, the output color of F1 Worley Noise is pretty close to intuition of Voronoi, should I consider it Voronoi, or is it just the Worley Noise’s imitation of Voronoi?


Really appreciate your help! I’ve read and taken notes of everything. You post is very detailed so I hope it will reach more people than just me.