top of page

Procedural Endless Terrain

A procedurally generated endless terrain system in Unity using C# with Perlin noise, LOD optimization, and multithreading for smooth performance

Role: Programmer | Technical Artist

Tools Used: Unity, C#, Shader Graph


Overview:This project is a procedurally generated endless terrain system built in Unity using C#. Inspired by games like No Man’s Sky and Minecraft, I aimed to understand and implement the fundamentals of procedural world generation. The system dynamically generates terrain using Perlin noise, supports multithreading for performance, and implements Level of Detail (LOD) optimizations based on player distance.

My Contributions:

  1. Procedural Terrain Generation:

    • Implemented Perlin noise to generate a height map that serves as the base for terrain formation.

    • Applied offsets to ensure unique terrain formations at different coordinates.

  2. Biome Differentiation:

    • Mapped height values to different terrain types (water, sand, grass, mountains, etc.).

    • Created a texture-based biome system using the generated Perlin noise height data.

    • Built a custom Unity editor tool to allow easy biome editing directly in the inspector.

  3. Mesh Construction & Optimization:

    • Created a vertex and triangle array based on the height map and converted it into a mesh.

    • Fed the mesh into Unity’s Mesh Renderer and Mesh Collider to enable collision and rendering.

    • Implemented Level of Detail (LOD) by simplifying distant terrain meshes for better performance.

  4. Multithreading & Performance Optimization:

    • Used multithreading to generate terrain on a separate thread, ensuring smooth gameplay.

    • Dynamically spawned and despawned terrain chunks based on player position, reducing memory overhead.

    • Lower LOD meshes were used for distant terrain, improving performance without sacrificing visual fidelity.

Impact & Future Possibilities:This project introduced me to procedural terrain generation and multithreaded optimization, opening up exciting possibilities for developing roguelike worlds, open-world exploration games, or survival experiences. The system is in its early stages but has immense potential for expansion into dynamic world-building games.



https://www.youtube.com/watch?v=7BR__hQjtwk

Project Gallery

bottom of page