Motivation & Goal
A significant focus of this project has been familiarizing myself with Unreal Engine 5, learning how to use the editor, and programming through its visual scripting system. Given that Unreal Engine is widely used by studios in the industry, I felt it was a valuable investment of my time during my specialization.
The project included planning, creating the assets, and developing this portfolio. The scheduled time for this was 110 hours over 6 weeks.
The project included planning, creating the assets, and developing this portfolio. The scheduled time for this was 110 hours over 6 weeks.
Procedural content generation caught my attention during my time at The Game Assembly. I was particularly interested in both developing the algorithm and visualizing the generation process in action. In my research into procedural content generation, I discovered the Wave Function Collapse algorithm and decided to use it to create buildings.
The goal was to develop an asset that could be placed into the game world, allowing users to generate a building with a simple click, all procedurally generated.


The Asset
The primary use case for this asset is to easily create varied yet similar buildings, ideal for scenarios such as building smaller towns, city skylines, or even entire cities.
The blueprint is simple, consisting of just a "Build" button and adjustable size settings. The size is clamped within a specified range, which can be easily modified as needed.
The algorithm runs within the construction script, which I later learned cannot be threaded. As a result, the size of the bounding box greatly impacts the time required to generate the building. When the number of cells reaches around 400, the generation process becomes noticeably slow. Since this process runs on the main thread of the editor, it creates a performance bottleneck.
Workflow
Through my studies, I’ve come to realize that the pipeline is crucial and must be meticulously planned when working with an asset like this. The asset needs to flow seamlessly from environment artists to level designers, and my goal was to make it as easy as possible for everyone involved in the process.
Create Modules.
Start by creating modules derived from the base class, each with a predetermined size. For example, a mid-level wall or a foundation corner.
Start by creating modules derived from the base class, each with a predetermined size. For example, a mid-level wall or a foundation corner.
Build Example Buildings.
Using these modules, build example buildings or sections in a separate level. Use the editor function to define their possible neighbours.
Using these modules, build example buildings or sections in a separate level. Use the editor function to define their possible neighbours.
The possible neighbours are then added to the constraints that the algorithm uses. The algorithm processes the constraints and automatically incorporates the new examples without requiring additional work.

Assets and Environment by Agnes Hallin
When I first started this project, I had planned to use simple colored blocks for the build. However, after learning that an Environment Artist at TGA had created a modular kit for her own portfolio, I knew I had to ask if I could use it for my project.
I had the pleasure of working with Agnes during the fourth TGA project, and she is a wonderful person and colleague. She generously lent me her entire scene, including landscapes and foliage.
With these fantastic assets, I did my best to contribute artistically... though I have to admit, I probably didn't do them justice—sorry, Agnes!
Be sure to visit her portfolio to see her great work and how these buildings could have turned out with an actual environment artist working on the modules, and if I had had the time to implement a decoration pass into the algorithm.
Reflection
As a programming student, it felt a bit strange to embark on a specialization project without writing any code. In hindsight, I wish I had chosen to use C++ from the start with the Unreal Engine. However, since a key part of my project was to familiarize myself with Unreal, it seemed wise to start with the scripting aspect to understand how it works. This approach also aligned with the recommendations from Unreal Academy for programmers just getting started with the engine.
Getting started was not as difficult as I had imagined, and everything I discovered could be linked back to what I learned as a game developer at TGA. Having knowledge of C++ programming was definitely an advantage. I only needed to figure out how to translate that knowledge into the Unreal Engine's user interface, including how to manage inheritance, create functions, macros, and member variables. During scripting, since I knew what I was looking for, I never struggled to find the node that accomplished my goals.
During the last week of this project, I began the process of writing the asset as a C++ class in Unreal. I realized that I wanted to create editor tools for our designers in the upcoming TGA Project #8, so I decided to delve into coding in Unreal, as we are using it as the editor for our engine. Unfortunately, I won’t be able to finish the entire asset, but I feel I have gained enough knowledge to hit the ground running when entering the next project.
I do now understand why Unreal Engine is so widely used, it has everything you need to create great games, and I know I have only scratched the surface of what it is capable of.

Future Improvements
Decoration Pass.
Implement a decoration pass during building generation to add details such as stairs, doors, windows, chimneys, and interiors. This can be achieved by identifying specific cases in the generation process and using them to insert another module or switch modules.
Implement a decoration pass during building generation to add details such as stairs, doors, windows, chimneys, and interiors. This can be achieved by identifying specific cases in the generation process and using them to insert another module or switch modules.
Size Constraints.
Ensure that no more than one building is generated per grid space. The building should fully utilize the designated width and height. This can be accomplished through techniques like corner-counting and improved roof constraints.
Ensure that no more than one building is generated per grid space. The building should fully utilize the designated width and height. This can be accomplished through techniques like corner-counting and improved roof constraints.
Modularity Improvement.
To introduce greater variation in appearance and style, i would use tags instead of class references. By doing so, you can fetch a module based on its tag. For example, a brick corner could be one of many different variations, all sharing compatible neighbors.
To introduce greater variation in appearance and style, i would use tags instead of class references. By doing so, you can fetch a module based on its tag. For example, a brick corner could be one of many different variations, all sharing compatible neighbors.
Performance.
Rewriting this asset as a C++ class would have provided me with more options for addressing the performance issues. I am certain there is a workaround for the limitation I encountered, which prevented me from threading the process within the construction script using visual scripting alone.
Rewriting this asset as a C++ class would have provided me with more options for addressing the performance issues. I am certain there is a workaround for the limitation I encountered, which prevented me from threading the process within the construction script using visual scripting alone.