Procedural Island Generation

in #steemstem6 years ago

Island generation

Today I took my first step in the vast domain of procedural generation. I tried to create a simple looking island.

Selection_410.png

Generation of a heightmap

Drawing a circle

An island as seen in the image above is simply some perlin noise where the highest values are concentrated in the middle.
Selection_405.png
I started by creating a circle. You can used the distance between two points formula to have points getting darker as they get further from the center. This is how I did it.

Adding noise

If you want to know how to create noise you should search the terms "Perlin noise" or "Simplex noise"
Selection_406.png

The noise blends with the circle making the map darker on the ends but lighter in the center.

Smoothing

The noise is too hard in the picture above to have good results, we need to smooth our image. I smoothed my image by setting every pixel to the average of their neighbors. This smoothing function was iterated 300 times in my final Island image.

Selection_407.png

Adding colors

I used a shader to color the island, but you can use what you want.

Water

Selection_408.png

Final result

Selection_410.png

Smoothing in realtime (300 iterations)

smoothing.gif

Raising Sea level

flooding.gif

Conclusion

It was quite fun to create an island. I will try to read about procedural generation to showcase more impressive generations. If you like my content make sure you follow me :)

Sort:  

Next step would be making a procedural shape, right? ;) otherwise, amazing demo.

I could try, I would also like to make a better looking landscape with biomes!

Nice project. What programming language/framework did you use?

I used C++ and SFML

Coin Marketplace

STEEM 0.35
TRX 0.12
JST 0.040
BTC 70601.11
ETH 3576.21
USDT 1.00
SBD 4.78