Procedural Terrain Generator in Unity3D
The app generates a mountain landscape on initialise based on a pre-determined seed (the pictures you see here come from seed 146).
I made 2 scenes to showcase several applications.
The app is now acting like a base for some of my future projects.
This concept was originally the basis of my geometry shader ( planet painter ). I changed course a little bit in the shader and made a painter instead of a generator. I always wanted to make a procedural terrain so I made one in Unity ( without shaders ) which was a lot easier in hindsight than if I should’ve made it in HLSL.
I made the generator in C# with help of the lessons of Sebastian Lague ( on Youtube ) as teacher. I highly recommend his tutoring, very clear and straight to the point.
You can download the app here ( the app includes the first scene which lets you overview the world at seed 146 )
WASD or arrows: Move the world around.
‘F’: Resets the camera to the starting point.
Scroll-wheel: increase/decrease movement speed in first scene.
The first shots are from the first scene which shows you an overview of how the terrain gets generated ( performance heavy upon fast scroll )
The next series is of the other scene which lets you roam around in the endlessly creating generator ( in first person ). The movement and jumpstrengt have been cranked up significantly.
First, here are some pics with the flat-shaded texturing method:
Here are some pictures with the normal shader:
I used the standard unity skybox and put a point-light in at (0,0,0), so nothing special. What you see in the app is the default unity look.
Shadows are on but don’t seem to be working the way I want them.
The scale is pretty huge so I had to put the speed of the first person player really high.
If you want the first person player build ( it’s mostly for testing for me so I have not build it yet ), message me and I’ll send you a download link.
Here’s a preview of how the texture is created in Unity
And here you can see all the variables regarding the mountain creation: