How do I increase contrast in perlin noise?

0 favourites
  • 6 posts
  • I've recently started working with noise mechanics, so this may be trivial, but is there a "Construct-way" of adjusting the contrast in a perlin noise final result (because it's too grey).

    After some basic testing, I can confirm that the rgba values always fluctuate between 29 (lowest) and 71 (highest). I want them to reach 0 and 100, do I have to code the math for it myself?

    Thanks in advance.

    ps: if you do know the math or reference to it, I'd appreciate it a lot as well.

    EDIT: To better explain why I need this, here are some visualizations with the color gradient. You can see from the gradient below, how the green in dominant, and also the lowest and highest values achieved in the upper right corner of the image.

    Nepeo I believe you'd be the right person to ask about this? also there could be clarification on the docs about how to use the gradient. It is simple, but I had to look up your answers from this topic.

  • If that’s the range you can make it from 0 to 100 with

    (X-29)/(71-29)*100

  • rojohound thanks a lot! As always, seeing your answer I feel pretty stupid I didn't see it sooner.

    EDIT: just if anyone wants to know what it looks like.

    ps: I still am curious on why the noise doesn't naturally go from 0 to 100, is there a reason for it? Could it be a bug?

    EDIT 2: Also, I don't quite understand the hard green lines that formed. I was expecting a smoother transition.

  • Glad it worked. I’ve never used that noise function. I thought for a second I may have answered wrong as I’m not sure what those rgb stops do exactly.

    I agree with you it would be more useful if the noise function was in a more useful range.

    Edit: as for the hard lines, it could be clamping. Isn’t the noise value a decimal number?

    You could try to use 28 and 72 to be the low and high values in the equation to give a slight buffer.

  • Actually I was wrong about the 29-71 limits, it is closer to 40-60, which is even worse. I discovered it going through the Z properties of 3d noise.

    In the gif below I used your equation with 40-60 so the color difference can be visible, otherwise it would have just been a green fuzz ball.

    I realized from this tutorial that the higher the octaves setting, the closer to the center the curve stays, so I guess the green dominance is accounted for, but now I want to understand this FBM Nepeo is talking about.

    It seems FBM is able to get closer to the top and bottom of the curve limits, but is this on C3 already? Is it going to be? How could one implement it in the current C3 workflow?

    Also, the file I'm messing with. It's just the Scirra file with some alterations.

    ps: Thanks again rojohound for the reply.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I forget the exact mechanics on how I normalised the output, but perlin noise normally returns a value between -1 and 1. It doesn't fill out the whole range, due to how the math works. Values aren't linearly distributed along that range. There are also areas where the value is exactly 0. I believe I made some adjustments to try and suppress these artifacts for users, because it's really frustrating when all your results come out as 0 ( trust me, I've been there... ).

    As previously discussed on this topic you can adjust the distribution by trimming a bit off the bottom and a bit off the top, then rescaling the value. Another good technique is increase the value to a power, as this adjust the distribution of the points ( higher power increases the likeliness of highs and lows ).

    By using FBM you are merging several copies of the noise field at different scales, and taking the average value. As such you may be exposing areas of the distribution curve you weren't hitting before, giving you a higher distribution. You could get a similar effect by changing the scale of your input values.

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