Clutter Generator: Randomized generation
About the project
As part of a two person team, I designed and coded this clutter generator over the course of a month for an SFU course in 2023.
It was created using C#, and its purpose is to populate a Terrain object with a number of objects selected by the user. The user can further customize the random generation by toggling options that include scale, rotation, minimum and maximum height within the terrain object, density of objects, and whether a copy of the terrain with all the generated clutter will be saved for future use as a prefab.

Ease of use
The main purpose of this tool was to ensure that it was not only easy to use, but also quick to fill the data required for object generation.
The user selects the terrain to be populated, the different number of objects to fill the terrain with, and the various options for each different kind of object.
Finally, the user can fill an address to save a prefab of the finished object, should they so desire.
Accessibility and error catching
The tool includes a toggle at the top that activates descriptions for each input, if the user needs further information as to what each different option does. It can be toggled off to minimize space usage and allow experienced users to have access to more vertical space should they need it.
The tool also has a number of bug catching tools that prevent the user from starting the clutter generation, including not having a proper terrain element and impossible scale and height ranges.


Classes and structures
The cornerstone of this tool is the dataSet structure, which stores information for each object and the randomization options for each. By having an array of these dataSet variables, the user can generate clutter of various different objects on the terrain in a single process.
Terrain pre-generation

Terrain post-generation

Swift iteration
When developing this tool, our main goal was to make sure environment designers could quickly generate randomized environments with certain features that would allow them to have a certain degree of control, which they would then be able to tweak to their liking. By also allowing the user to save prefabs of each individually generated environment, they can quickly share their creations and have a log of previous iterations without needing to save a whole scene, or to backstep in the Unity editor.
In reflection
This project helped me learn not only how to code a tool for general use, but to design it in a way that would make it easy to understand and use to someone unfamiliar with my own work.
There are more options and changes to be added to this tool in the future, but as it stands, it can be used to create randomized environments without much trouble.
Link to tool for download and use coming soon.