Question

I've been using perlin noise to generate tile based, isometric landscapes. So far I've been using the noise value as a height map for the tiles themselves: Math.floor(noise * 10), basically. This generates perfectly nice looking but linear maps. However, I found the "mountains" rather boring looking so I applied an exponent: Math.floor(Math.pow((noise / 4), 2.3)). This pushes the higher values up, producing the image attached.

These height values are the are stored in a 2d grid, giving me the x, y and z i need to draw the map to the screen.

The drawback is kind of obvious: there are gaps in my mountain that should be filled up. I'm just not sure where to start since that is information that I can no longer store in a 2d grid. I guess I can cheat using "longer" tiles but that is kind of lame. Any suggestions?

If you need more info I'm happy to explain. Maybe I'm barking up the wrong tree.

isometric perlin noise

Was it helpful?

Solution

Before you draw the first tile far in the back have a look to the two neighboring tiles on the left and right that are closer to the viewer. Get the lowest height of them and check if this height is lower than your back-tile minus one height. (Because this would cause a gap). Now you can start to draw on the pile in the back starting with this "low height" and stack tiles on it until you reach the height you want. Then you can draw the next tile that is closer to the viewer using the same algorithm.

Edit: But I am just wondering if it would maybe look a but awkward with so many stacked tiles. Maybe it better to just stretch the soil layer until the "low height".

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top