- Home /
How to create a perlin noise heightmap with the values being the highest around a point?
I want to create a Perlin noise heightmap, but I want the values to go "up" as the X and Y coordinates are approaching a certain target. I want to do something like this (the target is in the middle):
So, how can I do something like that in Unity?
Answer by kbartek · Feb 05, 2020 at 04:46 PM
Nevermind, I've figured it out by myself. Basically, I've created a Vector2, with the coordinates ranging from 0f to 1f, then I looped over the heights array, and for every height (pixel) I've multiplied it by the distance between the target Vector2 and the current x and y, divided by the resolution, then I've subtracted 1 from this value to "invert" it. You can also multiply the distance by some value to get a more apparent effect.
Can you upload the script please? Thank you bro!
Your answer
Follow this Question
Related Questions
Random Island generation using Perlin Noise ? 1 Answer
Connecting Perlin Terrain Tiles 1 Answer
Perlin noise problem 0 Answers
Terrain help 0 Answers
Perlin Noise Questions 1 Answer