I created a blueprint in Unreal Engine 4 to manage the generation of buildings with randomized modularity for more streamlined level design.
The designer is given the following editable parameters to control the generation of a building:
Which wall mesh to use for each side of the building
Material to use for the building
Number of stories
Width of the building in number of modular pieces
Depth of the building in number of modular pieces
How far, if at all, to extrude the left and right side of the building and how far back in number of modular pieces (in order to generate a L or T shaped building)
The script works by first looping through the number of stories specified by the designer, and performing the rest of the script for each story. It then loops through each modular wall piece, assigning it the correct mesh, material, and position in space according to the parameters set by the designer. Additional parameters including room brightness and window blinds height are randomized to add variation. Lastly, the building is capped with roof pieces scaled to fit the shape of the building.
The building materials include interior mapping which gives the illusion of an interior through each window without using additional geometry.
I also created a blueprint to control the movement of hover-cars in my scene. First, a spline is created which the designer can edit through control points in the scene. The blueprint has editable variables for the speed of traffic, the number of hover-cars, and the average spacing between them. The blueprint loops through each hover-car, spaces them apart appropriately, and increases their position along the spline until they reach the end, at which point they jump back to the beginning. At this point the color of the hover-car is randomized so that there is seemingly an endless flow of unique traffic.
I created a blueprint in Unreal Engine 4 to randomize the parameters of books placed in the scene. In the construction script of the blueprint, a random floating-point integer determines the mesh of the book to use: from thin to thick with 5 variations.
After the mesh to use is determined, the book is scaled slightly by a random value to give variation in the height of the books. Next, the parameters of the book material attributes are randomized, giving each book a unique color within a particular range of hue and saturation. Finally, the textures for the spine and cover of the book are randomly chosen from an array of textures and assigned to the book material.
An additional blueprint references the book generator blueprint and loops through the process by an integer stored in the variable “Books”. This allows the designer to simply place one blueprint in the scene and input a number, and the blueprint will spawn that number of randomly generated books in a row.
Materials made using Substance Designer