For this project, my team and I built a procedural generation tool to create new, random 3D environments. This tool allows users (such as game designers) to create and iterate through their ideas rapidly without needing domain-specific knowledge.
The user can upload their own 3D building blocks and rules specifying which blocks can be adjacent. We include other fine-grain controls such as map size, block frequency, etc. When the user is done, they can save their work to an account and access it anytime.
My role: The algorithm we use to generate the environments is called Wavefunction Collapse (WFC), inspired by quantum mechanics (for more details, see below*). However, the algorithm relies on the user tediously providing the adjacency rules for their all their building blocks. To this end, I wrote the code to automate this process. When the user uploads their building block, my code analyzes and labels the topology of its faces. From there, my code automatically generate a list of adjacency rules that allow appropriate blocks next to each other. The user can then change these rules as needed.
*WFC works by starting with an empty grid, where each coordinate is a "superposition" of the blocks it can be. It then chooses the block to be placed at the location with minimum entropy (fewest possibilities). Each block has a set of rules specifying what other types of blocks are allowed to be adjacent to it; by choosing one block, we eliminate possibilities for adjacent blocks. WFC repeats this process of placing blocks with minimum entropy and updating their neighbors until the entire map is generated.