Cave Generator Final Year Project

For my final year project at University I chose the research question: “Could a development tool addon for the Unity Game Engine which procedurally generates caves produce results comparable in playability and quality to hand-made efforts”

To answer this question, I had to undertake a multi-month project where I researched how real-life caves are formed, the history and theory behind Procedural Generation, and the existing examples of procedural cave generation.

The goal was to produce an intuitive yet powerful tool for the Unity engine that produced high quality, game ready caves. I sent out an initial survey that asked for industry professionals’ opinions on whether the tool being proposed sounded useful, along with asking what features it should have and whether they would like to participate in future experiments when the tool is complete.

After investigating different methods of procedural generation, I settled on a combination of 3D Perlin noise and the Marching Cube algorithm, with is used to create a polygonal mesh using the voxel points generated by sampling the Perlin noise. This mesh can then be drawn by Unity using a Mesh filter and Mesh Renderer. I added realistic texturing using Triplanar mapping via a custom shader, which also supported blending between two materials to create a more genuine cave surface. All the materials and values for generating a cave are easily accessible to the user from the tool’s control panel.

The tool control panel

To test the effectiveness of the tool, I conducted two experiments, one involving a custom credibility test, and the other being an open-ended experiment where participants are sent a copy of the tool and given free reign before being asked to return their feedback on its features, output and ease of use.

Unfortunately, due to time constraints, my initial goal of using adaptive procedures, along with comparing the generated caves with handmade efforts, weren’t achievable, and instead I could only gather participants opinion on how credible the generated caves were, with the credibility program generating caves with pre-set size and noise values.

I lost focus on making the cave game ready, with requested features like the ability to customise the cave’s branches/pathways being absent in the final version of the tool, and the option to add a mesh collider to the tool being non-functional due to limits in how many vertices in a mesh Unity can support.

A generated cave

Participants seemed to favour caves of a large size with either low or medium noise settings, with small caves getting the lowest credibility ratings, and some high-noise caves being rated lower than their reduced noise counterparts.

The second experiment did happen, but where it was distributed late into the project’s timeline, I only received one response, which was positive about the tools output, but critical of the generation speed and layout of the UI.

These shortcomings are due to failings in project management. While a Gantt chart was used, deadlines were missed and I misjudged how long certain tasks would take, pushing other parts of the project back and ultimately resulting in features being dropped.

To conclude my findings, the output generated by the tool is acceptable, and participants generally gave high credibility ratings on the results they were shown, however the tools inefficient design, which leads to long loading times, along with lack of game-ready features such as custom pathways or base shapes, have led me to conclude that it needs more development time before being considered as a genuine product. I should have focused more on project management and my initial research question, as comparing to handmade caves would have been possible, but I was instead side-tracked with other, less important aspects of the project. Without re-running the credibility experiment with this comparison in place, it is impossible to answer my research question with 100% certainty.