CUSTOM VOXEL ENGINE & WORLD GENERATOR


UE5 | Solo | 2025 | After finishing my year 1 university objectives early, I took on this project to enhance my PCG and Unreal C++ skillset.

Subterranean World

Inspired by the megastructure landscapes of Blame, this project combines both naturally cavernous and artificial grid-like topology. 3D seeded noise is used to produce large, organic open spaces. For mineshaft-esque excavations, various space types are generated recursively.

Optimized PCG

This project utilizes UE5’s asynchronous Runnable Threads to separate runtime world generation from the main game thread. This allows single tick operations which remain expensive – even after thorough optimization – to lesser impact FPS. Additionally, individual voxel (block) generation is cycled on a delay, avoiding sudden and noticeable lag spikes.
Voxels are grouped under chunks, each of which handling the multi-instancing of visible meshes. This instancing drastically decreases GPU memory usage and increases perceived performance.

Prototype Iterations:

Utilized mesh instancing to generate a chunk of voxels.

Created a hierarchy to manage multiple chunks.

Improved managerial hierarchy to allow for cross-chunk communication.

Added voxel destruction and replacing.

Designed an optimization algorithm by which only the surface of a chunk is spawned, removing 2774 unnecessary instances per chunk of 16 voxels cubed.

Improved said optimization algorithm to function above the individual chunk level.

Added data-based block type generation.

Added dynamic instancing logic for chunks with multiple block types.

Moved PCG calculations to a custom thread and distributed instancing times.

Implemented culling, saving, and loading.