Perlin Noise Linear Amount

Question Materials and Textures

Hello, I came across a problem and maybe it's not possible to solve due the nature of perlin noise. But what I'd like to do is to generate perlin noise map with values of only 1 and 0. What I don't know how to solve is linear amount of either 1 or 0 values. The image shows my setup and it works for static noise where my color ramp set to 0.1 outputs a map of 10% 1.0 and 90% of 0 values.

noise_node_setup.jpg

1 love
Reply
  • Martin Bergwerf replied

    Hi Forlorn Void,

    Forgive me, but I do not know what you mean by "linear amount".

    Do you maybe mean something like this:

    Noise.png

    1 love
  • Forlorn Void(ForlornVoid) replied
    Hi, Martin Bergwerf, no problem. By linear amount I meant that when I set the color ramp to 0.1, that will be exactly 10% brightness when viewed in HSV mode in Photoshop or other program like that. I don't know if you can see it in the bottom setup that creates static noise, but when the color ramp is set to let's say 0.15 the baked texture has 15% brightness and roughly 15% of 1.0 pixels values and 85% of 0.0 pixel values. This is what I'd like to have with the Perlin noise map, but when I set the ramp to 0.15 the output in brightness is maybe 3%. I tried multiple nodes, but couldn't figure it out. The static noise generator map is voronoi set to squares -> white noise -> color ramp set to constant btw.
    1 love
  • Martin Bergwerf replied

    Okay, I get it now,

    The fact is, my setup above, is already linear (0.5 gives 50% white and 50% black). The Perlin Noise, however doesn't usually (if ever) reach 0 or 1 and is not evenly distributed (more like a Bell curve, with a peak at 0.5).

    This will get you closer to what you expect:

    Noise_01.png

    That also works with a Color Ramp, but a Math Node is easier.

    1 love
  • Martin Bergwerf replied

    ...and yes, the White Noise is evenly distributed between 0 and 1.


    1 love
  • Forlorn Void(ForlornVoid) replied

    So Perlin noise cannot be setup so it's evenly distributed? And has to sort of be eye balled? Only value I can get with my OP image setup is at 0.5 which is exactly 50% other values look lie they are on a exponential curve, but when color ramp is set to either 0 or 1 the map is exactly pitch black or pure white. So I don't know what math to use and how to set it up exactly.

    1 love
  • Martin Bergwerf replied

    Yes, indeed!

    Perlin Noise is constructed using the Dot Product and the Dot Product can be calculated using Cosine...so that's not linear/evenly distributed.


    1 love
  • Forlorn Void(ForlornVoid) replied

    Can it be somehow recalculated with sin/cosin math node back to be evenly distributed or not?

    1 love
  • Martin Bergwerf replied

    You can also think of it as a 'landscape generator' (that was sort of the original idea) and not all heights in a landscape are evenly distributed.

    1 love
  • Martin Bergwerf replied

    You ask if it can be re-calculated...maybe, but I doubt it...and it will anyway be a lot easier to just use an evenly distributed noise to begin with.

    1 love
  • Martin Bergwerf replied

    I mean, it no longer a Perlin noise if it's evenly distributed, so...


    1 love
  • Forlorn Void(ForlornVoid) replied
    Yea I get the idea behind the "natural" distribution of patterns, soo it cannot be then. Okay, thank you.
    1 love
  • Forlorn Void(ForlornVoid) replied

    Is there some other noise that is evenly distributed and can be mapped linearly that doesn't use voronoi or isn't static noise?

    1 love
  • Martin Bergwerf replied

    Okay, as far as I can tell from my testing, this one is pretty accurate:

    Noise_02.png

    1 love
  • Martin Bergwerf replied

    That was before I read your last question.


    1 love
  • Forlorn Void(ForlornVoid) replied
    Yeah I have this one, can be random shapes or just squares...
    1 love
  • Forlorn Void(ForlornVoid) replied

    Sorry to resurrect this thread again, but with the setup you have above where you don't use any shader node and you feed the data straight into material output. When I do that to ensure that the principled shader is not affecting black and white values, and when I bake, the object has no image texture to be saved in UV Editor tab. Do I need to have at least some shader for it to work? The texture shows when using viewport shading, but when I bake there is nothing.

    Edit: I found that setting bake type to combined does it. But is that the correct way of doing it?

    1 love
  • Martin Bergwerf replied

    If you plug a Color (or Value) directly into the Material Output, Blender inserts an Emission Shader in between (in the background). You can Bake the Emit to an Image Texture...I guess Combined would also work, but it's a bit weird to Bake a combination of Ambient Occlusion, Diffuse, Glossy, Roughness, etc., when you only have an Emiision Shader...

    1 love
  • Martin Bergwerf replied

    Forgot to tag you ForlornVoid ,

    You might not see responses to older posts, unless you set the Filter to: 

    Sort by > Last Updated...

    1 love
  • Forlorn Void(ForlornVoid) replied
    Alright, gotcha. Well I tried to bake it in emit and combined type and both were the same in my case, only 0 or 1 gray scale values so I can use either of them. Good to know it's defaulted to emit behind the scenes.