top of page

Procedural Island Generator

Screenshot 2025-09-17 001737.png

A custom-built procedural terrain generation system designed for Unity, capable of creating expansive island archipelagos with high efficiency and visual variety. This tool leverages the GPU’s parallel processing power through compute shaders to perform intensive terrain generation and noise calculations, enabling the creation of up to 100 unique islands simultaneously with minimal performance overhead.

Every aspect of the generation process is fully configurable, allowing developers and designers to fine-tune parameters such as island size, spacing, elevation profiles, biome density, and surface textures to achieve a wide range of environmental styles — from small, clustered tropical islets to sprawling volcanic archipelagos.

This system was developed with scalability, flexibility, and creative control in mind, making it an ideal foundation for open-world or exploration-based games that require diverse and dynamic island landscapes.

Terrain Generation

The procedural terrain generation system is built upon an adapted version of the Perlin noise algorithm, implemented through GPU compute shaders to achieve high-performance, real-time terrain synthesis. Each island’s terrain is constructed from a Perlin noise–based heightmap, generated entirely on the GPU using a dedicated compute shader. The shader computes multi-octave noise values—taking into account frequency, amplitude, lacunarity, and gain parameters—to produce smoothly varying yet detailed height data. These noise values are written directly to a structured buffer, enabling efficient communication between GPU kernels without costly CPU–GPU synchronization overhead.

Screenshot 2025-10-08 000813.png

Once the heightmap is generated, it is passed to a secondary compute shader responsible for procedural mesh generation. This shader constructs the island’s geometry at the vertex level, generating quads (each represented as two triangles) and mapping corresponding height values from the buffer to the vertices. The approach allows for complete control over vertex placement, ensuring consistent topology and high spatial resolution across the generated terrain chunks.

​

To shape the otherwise planar mesh into a dome-like island, the heightmap is modulated by a custom Gaussian falloff function. This falloff function is parameterized by a mean offset and standard deviation, defining the island’s curvature and the position of its highest elevation. The Gaussian curve ensures that terrain height smoothly tapers off toward the edges, naturally forming island-like silhouettes. Randomized Gaussian means are introduced to offset the peak positions, resulting in diverse and asymmetrical island shapes across multiple terrain chunks.​

Screenshot 2025-10-08 000944.png

Each island chunk is generated as part of a configurable grid, with the system capable of spawning dozens of independent terrain meshes simultaneously. Chunk positioning and scaling are randomized within user-defined constraints, creating naturalistic spacing and variety between islands. By utilizing compute buffers for vertices, indices, UVs, and heights, the pipeline efficiently manages GPU resources, reconstructing mesh data directly in GPU memory before being read back into Unity’s Mesh objects for rendering.

​

The entire process is designed for modularity and scalability—supporting adjustable resolution, configurable noise parameters, and real-time regeneration. This architecture enables developers to rapidly prototype or generate expansive archipelagos with minimal CPU cost and high visual fidelity.

Screenshot 2025-09-17 001800.png
image.png

Water Plane Shader

The stylized water plane shader was created using Unity's Shader Graph system. I was able to implement my version by following this excellent tutorial from Alexander Ameye. You can check out the article to learn more about the details of how the shader graph works by clicking here.

​

To simulate realistic wave motion, the shader uses Gerstner waves, a mathematical model that displaces both the vertical and horizontal positions of vertices to mimic the circular motion of water particles. Unlike simple sine waves—which only move vertices up and down—Gerstner waves produce natural-looking peaks and troughs with rolling, directional movement, making them ideal for stylized or semi-realistic ocean surfaces.​​

image.png

​In the original tutorial, four wave components were computed directly within a single custom function. To improve modularity and configurability, I restructured the shader so that each Gerstner wave is calculated independently by a reusable custom function node. The final displacement is created by summing four separate wave components within the graph itself. This design allows for easy fine-tuning—such as adding, removing, or modifying individual wave layers—to achieve diverse and dynamic water behaviors.

Screenshot 2025-10-08 002835.png
Screenshot 2025-10-08 002620.png

Prop Generation

I implemented a procedural prop generator to populate islands with foliage and rocks. The system randomly selects vertices above a set height on the terrain mesh and places props with randomized rotation and scale for natural variation.

 

To handle large numbers of props efficiently, I used GPU instancing via Graphics.DrawMeshInstanced. This allows many copies of the same mesh to be rendered in a single draw call, with each instance having its own transform, drastically reducing CPU overhead and improving performance. Each prop type maintains a list of transformation matrices, which are batched and drawn every frame.

 

The result is a visually diverse, high-performance foliage system that can be reset or regenerated dynamically.

Bush Generator.png
image 1.png
image 2.png

©2025 by Ashank Rajendran.

bottom of page