Perlin Noise (Classic2D) should output from 0 to 1?

0 favourites
From the Asset Store
Sound effects of monsters, ghosts, beasts and more
  • Currently it does not. And here you can see several mentions of ranges being classicaly from 0 to 1.

    Am I missing something with the tool or could it be a bug?

  • It should be and is 0-1. How do you have it set up?

  • This is the setup.

  • I also ran it 100 million times and the values never approach 0 and 1.

    EDIT: Both the outputs displayed consider "octaves" to be 1. The higher the octaves are set, the farther it grows from 0 and 1.

  • The types of noise and their ranges (100 million iterations each).

  • It makes sense that it never got to exactly 0 or 1 a lot because its being interpolated.

    dropbox.com/s/lfxs2bjzl1ydy3k/lerpcurve.c3p

    Watch the xy values in the capx. It will take a very long time to get to exactly 512.

    Another thing you can test is the average between top and low. It should be around 0.5.

  • This is normal, especially for perlin style noise, that the extremes are even rarer than strict random numbers.

    What you can do is normalize the numbers you do get by keeping track of the lowest and highest numbers you get in any given set, and scale/multiply all the numbers so the lowest number corresponds to 0 and the highest corresponds to 1.

    Note this is only recommended of you're using a fixed set of numbers. If you continue to generate numbers, the lowest and highest point might change, resulting in either a value outside the range of 0-1 or a shift in the value of all previously generated numbers in the set to accommodate the new min/max.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I’ve been trying to normalize the values by first running it 100 million times and getting the extremes, but I wish I could consistently get from 0 to 1, is there a better technique?

    I saw that simplex noise could be a solution, is that a reasonable resource?

  • Normalization is exactly what you're looking for to consistently fit a set of random values within in the range you desire.

    Procedural noise is often modified to get different effects (imagine biomes). Modifications can stack, and normalization is just one type or step of modification.

  • If all you want is 0 or 1 you can just do choose(0,1)

  • I clearly want a number from 0 to 1, not 0 or 1.

    My problem is that normalization works differently for each setup. Like if I ran 100 million times to normalize integers for instance, I’ll have to run that same amount for each noise configuration I’m using, and for terrain generation I’d have to normalize billions of calculations or reduce precision.

    My point is that if I had a noise, resembling perlin, but without the normalization, I could reduce initial loading times and also get more accurate settings.

    But from what I gather it doesn’t exist.

    I appreciate the help though. Thx.

  • Not sure what kind of terrain you're looking for.

  • If you use for instance from [1-30] is water and for [31-100] is dirt, you can choose some sections to be iron ores like from [2-4].

    The less precision I get with normalization, the more I lose ranges to work with.

    Like from [1-30] out of 100 is never really 30%.

    It’s a small detail, and maybe you are not bothered by the very same thing, but It’s there.

  • Its been my experience that values below or above the peaks would be the same thing.

    Then for minerals use a weighted random.

  • I don’t know if I understand the idea completely, but wouldn’t weighted tables still be affected by the range since they still work under coordinates generated by the noise?

    EDIT: and you mentioned values above or below the peaks would be the same thing, that would be if I already ran normalization calculations and know what the peaks are, right?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)