Procedural Terrain Generation

How it works:

The TerrainGenerator.cs takes in values for the perlin noise which is used to calculate the entire terrain height. I then added mountains that are generated by lifting up a random point on the terrain and then looping through each of the surrounding points to adjust their height values. 

I am basically doing the exact same thing for the holes but instead of raising a point, we are lowering a point. 

For the terrain painting I simply wrote a class that holds all the values for a splat prototype and I added a height value which will determine the terrain height for the set texture.

I am using noise and mapping to roughen the edges between two kinds of textures to ensure a more realistic look. 




Source Code:

Check out the Code on GitHub!

Author: itsmilkid

Self taught Unity C# Developer from Germany.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s