Terrain Mesh Generation
The mesh is made up of Quads, each consisting of two triangles. Each triangle has three vertices added to an array in clockwise order. A key challenge was ensuring the last triangle in each row was not generated twice — doing so causes unwanted issues with mesh normals.
Perlin Noise
To transform a flat square grid into natural mountainous terrain, Perlin noise controls the Y value of each vertex. A Perlin noise image uses black (0) and white (1) as a gradient — this float value is multiplied against each vertex's Y position to produce organic height variation.
Research for this process drew heavily from Sebastian Lague's procedural landmass generation tutorial series (Lague, 2016).
Sine Wave Fall-off
To create an island shape, a sine wave is used as a fall-off mask over the Perlin noise. After finding the centre of the generated mesh, each vertex's Perlin value is multiplied by the sine function output. Tweaking the amplitude and frequency of the wave shapes the island's silhouette — combining both produces the final result.
Small: 4×4 · Medium: 8×8 · Large: 16×16
Low: 16 · Medium: 64 · High: 128
Mid-Point Reflection
Throughout this project I developed my technical skills by watching over 40 videos and reading papers on procedural generation, branching into fields like procedural animation and procedural storytelling. One paper helped clarify exactly what PCG is:
"Procedural content generation (PCG) refers to the algorithmic creation of content. It allows content to be generated automatically, and can therefore greatly reduce the increasing workload of artists." — van der Linden, Lopes & Bidarra, 2014
I researched and followed tutorials repeatedly until confident enough to write my own procedural mesh. After several rewrites I produced clean, well-structured code with a polished inspector interface. Creating a custom island shader proved unexpectedly time-consuming due to limited tutorial resources on Unity's Shader Graph.
This was nominally a group project, but only myself and one other student (Mitchell) contributed meaningful work. Despite reduced participation, Mitchell and I gave each other useful feedback — for example, I helped assess the readability of his Day/Night Cycle. The experience reinforced the value of finding collaborators who are equally invested.
Project-Completion Reflection
I'm pleased with the outcome, though I would have loved to add auto-scaling water assets for different island sizes and a procedural tree-placement system using mesh normals. The project didn't match my initial scope expectations, but after properly researching the topic I feel I achieved something solid and I'm proud of the result.
The biggest challenge was implementing a fall-off to the terrain generation. I tried Sebastian Lague's fall-off map method and got it working in isolation, but couldn't integrate it with my chunked terrain system. I eventually solved the problem using sine waves — a method I found through further research. This experience reinforced the importance of broad research when solving specific coding problems.
I'll continue improving across game development, Unity, and C#. In future group projects I'll be more deliberate about team selection. Most importantly, I'll keep setting myself challenges outside my current knowledge — the process of unpacking procedural generation significantly improved my coding skills and confidence.
- Complete Guide To Unity Procedural Generation — GameDev Academy
- Beginners Guide to Procedural Generation
- Procedural Terrain Generator! UNITY
- The Theory of Noise: An Overview of Perlin Noise
- How to make a procedural grid world in under 2 minutes in Unity (series)
- GENERATING TERRAIN in Unity — Procedural Generation Tutorial
- Unity Scripting Reference — Mesh
- Procedural Landmass Generation (E01: Introduction) — Sebastian Lague (series)
- How Minecraft ACTUALLY Works
- How does procedural generation work? — Bitwise
- Why I'm Using Wave Function Collapse for Procedural Terrain | Unity Devlog
- How to create and modify a plane mesh in Unity (Procedural mesh generation tutorial)
Lague, S. (2016). Procedural Landmass Generation (E02: Noise Map) [YouTube Video]. youtube.com/watch?v=WP-Bm65Q-1Y
van der Linden, R., Lopes, R., & Bidarra, R. (2014). Procedural Generation of Dungeons. IEEE Transactions on Computational Intelligence and AI in Games, 6(1), 78–89. doi.org/10.1109/tciaig.2013.2290371