# 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](https://steemitimages.com/DQmXyXho24Ksvhw2g8nt1Ynxgbe1By7ud6JmiQSqMkSipKA/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](https://steemitimages.com/DQmTL3fEiNTVk4HviQpK13rzBdDtjGJijUXYM23Rjy7asxc/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](https://steemitimages.com/DQmebYZpmBNMhxPqfELwcbksUQW4dNeP52FELwjhFSaddmV/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](https://steemitimages.com/DQmYxkLDLCyLQvCTwjD81q1iBm6pFWZnisn5m9abpnhDBBm/Selection_407.png) # Adding colors I used a shader to color the island, but you can use what you want. ## Water ![Selection_408.png](https://steemitimages.com/DQmZKth4aPJLUkFjuERHU3ezkHRFuQ1emcUp2mxUnKxaNQn/Selection_408.png) ## Final result ![Selection_410.png](https://steemitimages.com/DQmXyXho24Ksvhw2g8nt1Ynxgbe1By7ud6JmiQSqMkSipKA/Selection_410.png) # Smoothing in realtime (300 iterations) ![smoothing.gif](https://steemitimages.com/DQmZQ2gUeqqao6nL9wLTV1xXi8BA3t61c9o7yRFyweoraUp/smoothing.gif) # Raising Sea level ![flooding.gif](https://steemitimages.com/DQmY1pZ4nVCNjDa8BSevhRAV4Ww8Q49qJM6soedqESDKeAR/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 :)
post_id | 37,872,514 |
---|---|
author | loomy |
permlink | procedural-island-generation |
category | steemstem |
json_metadata | "{"app": "steemit/0.1", "format": "markdown", "image": ["https://steemitimages.com/DQmXyXho24Ksvhw2g8nt1Ynxgbe1By7ud6JmiQSqMkSipKA/Selection_410.png"], "tags": ["steemstem", "programming", "art", "gamedev", "coding"]}" |
created | 2018-03-10 20:37:36 |
last_update | 2018-03-10 20:37:36 |
depth | 0 |
children | 4 |
net_rshares | 87,842,697,856 |
last_payout | 2018-03-17 20:37:36 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.228 SBD |
curator_payout_value | 0.058 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 2,216 |
author_reputation | 827,518,626,017 |
root_title | "Procedural Island Generation" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
hr1 | 0 | 51,765,637,798 | 0.02% | ||
kryzsec | 0 | 6,772,608,023 | 20% | ||
katamori | 0 | 1,819,020,650 | 100% | ||
robertlyon | 0 | 4,771,139,430 | 100% | ||
vigilantrespawn | 0 | 2,872,830,616 | 100% | ||
ajayyy | 0 | 1,756,813,852 | 100% | ||
cpufronz | 0 | 2,146,749,320 | 100% | ||
loomy | 0 | 12,607,682,312 | 100% | ||
roundbeargames | 0 | 401,274,380 | 20% | ||
sp33dy | 0 | 2,085,992,357 | 100% | ||
rj1 | 0 | 230,418,355 | 100% | ||
clayjohn | 0 | 612,530,763 | 100% |
Next step would be making a procedural *shape*, right? ;) otherwise, amazing demo.
post_id | 37,892,003 |
---|---|
author | katamori |
permlink | re-loomy-procedural-island-generation-20180310t235635167z |
category | steemstem |
json_metadata | "{"app": "steemit/0.1", "tags": ["steemstem"]}" |
created | 2018-03-10 23:55:03 |
last_update | 2018-03-10 23:55:03 |
depth | 1 |
children | 1 |
net_rshares | 12,607,886,515 |
last_payout | 2018-03-17 23:55:03 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.030 SBD |
curator_payout_value | 0.010 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 82 |
author_reputation | 607,202,195,690 |
root_title | "Procedural Island Generation" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
loomy | 0 | 12,607,886,515 | 100% |
I could try, I would also like to make a better looking landscape with biomes!
post_id | 37,904,152 |
---|---|
author | loomy |
permlink | re-katamori-re-loomy-procedural-island-generation-20180311t015858347z |
category | steemstem |
json_metadata | "{"app": "steemit/0.1", "tags": ["steemstem"]}" |
created | 2018-03-11 01:58:57 |
last_update | 2018-03-11 01:58:57 |
depth | 2 |
children | 0 |
net_rshares | 2,049,600,733 |
last_payout | 2018-03-18 01:58:57 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 78 |
author_reputation | 827,518,626,017 |
root_title | "Procedural Island Generation" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
katamori | 0 | 2,049,600,733 | 100% |
Nice project. What programming language/framework did you use?
post_id | 38,023,574 | ||||||
---|---|---|---|---|---|---|---|
author | cpufronz | ||||||
permlink | re-loomy-2018311t193843995z | ||||||
category | steemstem | ||||||
json_metadata | "{"app": "esteem/1.5.1", "format": "markdown+html", "community": "esteem", "tags": ["steemstem", "programming", "art", "gamedev", "coding"]}" | ||||||
created | 2018-03-11 18:38:45 | ||||||
last_update | 2018-03-11 18:38:45 | ||||||
depth | 1 | ||||||
children | 1 | ||||||
net_rshares | 0 | ||||||
last_payout | 2018-03-18 18:38:45 | ||||||
cashout_time | 1969-12-31 23:59:59 | ||||||
total_payout_value | 0.000 SBD | ||||||
curator_payout_value | 0.000 SBD | ||||||
pending_payout_value | 0.000 SBD | ||||||
promoted | 0.000 SBD | ||||||
body_length | 62 | ||||||
author_reputation | 3,753,569,352,183 | ||||||
root_title | "Procedural Island Generation" | ||||||
beneficiaries |
| ||||||
max_accepted_payout | 1,000,000.000 SBD | ||||||
percent_steem_dollars | 10,000 |
I used C++ and SFML
post_id | 38,033,134 |
---|---|
author | loomy |
permlink | re-cpufronz-re-loomy-2018311t193843995z-20180311t195916265z |
category | steemstem |
json_metadata | "{"app": "steemit/0.1", "tags": ["steemstem"]}" |
created | 2018-03-11 19:59:15 |
last_update | 2018-03-11 19:59:15 |
depth | 2 |
children | 0 |
net_rshares | 1,926,192,883 |
last_payout | 2018-03-18 19:59:15 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 19 |
author_reputation | 827,518,626,017 |
root_title | "Procedural Island Generation" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
cpufronz | 0 | 1,926,192,883 | 100% |