Learn how to create a procedural Level Builder that uses a single curve to create the walls, ceiling and floor along with doors and props. This lesson brings together Sci Fi panels, crates and tanks into a single tool that makes it easy to generate a complete level inside Unity. Follow along to learn all the steps needed to build this tool then use the Houdini Engine for Unity plug-in to bring the resulting digital asset into the game editor for direct manipulation and assignment of prefabs and materials.
These lessons use the SideFX Labs
tools. Make sure the latest release (non production build) is installed when doing this lesson.
Explore the Level Builder asset and see how you can use it to create complete levels using a single curve. You can then peek into the tool to better understand how it works and how all of the pieces come together to create a rich game environment.
PART 1 | The Corridor System
The first step in creating the Level Builder is organizing the system that lays out corridors using a grid. Using an input curve, you will generate interior spaces that connect when the curve overlaps. You will also figure out where the convex and concave corners are and apply appropriate corner geometry to each. At this stage, you will use simple geometry that will get replaced with game assets later on.
PART 2 | Create the Digital Asset
The next step is to wrap up the corridor system into a digital asset then simplify it into points with attributes. These attributes will reference prefabs inside your Unity project that will be assigned to the level automatically. The key is to organize the points so that the right prefabs are being grabbed and then to make sure the normals are oriented in the right direction. You will also add the floor, ceiling and lights to the level.
PART 3 | Modular Wall System
To enhance the level builder tool, you will create new wall panels using a modular system that evaluates different primitive sizes then assigns an appropriate prefab to match. Each prefab will be rotated or scaled into place and will create a more interesting look for the corridor.
PART 4 | Decorate the Level
To add detail to the level, you will procedurally place crates, tanks and doors throughout the level. By establishing placement rules, you can make sure that these items appear where you need them to complete your level with only the one curve as the input.