home..

Procedurally Generated Islands in Meor

game development procedural generation voxel

Disclaimer: The text in this post is generated by an AI chatbot based on a few bullet points.

The islands in Meor are generated in chunks, each measuring 16x16x16 voxels. The process begins by utilizing value noise and gradient noise fractals to create the foundation. These fractals generate a 2D heightmap, which is then enhanced with the addition of 3D noise to introduce captivating overhangs and intricate terrain features.

To optimize rendering and collision detection, the generated islands are converted into signed distance fields (SDF). This conversion allows for efficient calculations of distance and intersection tests, enabling smooth gameplay interactions within the voxel world.

Caves: A Subterranean Adventure

Meor offers more than just picturesque landscapes; it also boasts a vast network of intricate cave systems. The tunnels that wind through the islands are generated using a combination of voronoi noise and value noise algorithms. By subtracting the cave SDF from the island SDF, players can explore the depths of these procedurally generated caves, uncovering hidden treasures and secrets along the way.

Trees: Flourishing with Procedural Charm

The lush forests of Meor are adorned with procedurally generated trees, adding an enchanting touch to the vibrant scenery. The trees themselves are constructed using voxels, allowing for dynamic growth and manipulation. To bring these arboreal wonders to life, Meor employs a variety of noise fractals to generate 100 unique tree designs, which are then saved as part of the game file.

Placing these trees throughout the world is achieved through a technique known as a random offset grid. Each cell in the grid contains a tree with a certain probability. This probability is determined by a 2D map featuring a fractal gradient noise pattern. Furthermore, the placement of each tree within its designated cell is randomized, resulting in a visually diverse and captivating forest landscape. This same technique is employed for other voxel objects, such as huts, ensuring the world of Meor is rich with intricate details.

Grass: Nature’s Carpet

In Meor, the lushness of the landscape extends beyond the towering trees. Vibrant grass carpets the ground, adding a touch of realism and vitality to the environment. The growth of grass is restricted to specific voxel materials that receive ample sunlight, creating natural and visually pleasing patterns.

Similar to the tree placement technique, grass sprites are positioned using an offset grid. The grid determines the probability of grass appearing in each cell, guided by a 2D fractal gradient noise map. The result is a vivid and immersive landscape, where the grass sways gently in the breeze, breathing life into the world of Meor.

Clouds: Majestic Pillows in the Sky

The skies of Meor are adorned with captivating clouds, each uniquely shaped and generated in real-time. Meor achieves this dynamic cloud system through the use of voxel-based clouds generated frame-by-frame across different levels of detail (LODs). These clouds are formed using fractals derived from gradient noise, resulting in a diverse range of cloud formations and atmospheric conditions. As players explore the islands, the ever-changing skies above provide a breathtaking backdrop to their adventures.



© 2024 Lionel Pigou