One of the tasks that needed to be done for our virtual reality story, IAN, was to create the level that the player will explore around to uncover clues and progress the story. As such, I took on the task of creating the corridors of the lab environment the player is in.
Before beginning to create the corridors, I had to take into mind certain things to make putting the level together easier as well as creating a realistic environment.
One consideration was the fact that the level layout might needed to be changed in the future. This meant that each section had to be modular, could easily connect to other sections both mechanically and aesthetically and ideally be able to be replaced without the entire level nee
ding to change.
As such, the corridor was broken up into 3 base sections, a straight section, right angled corner and a T junction. This allowed a level to be created with different choices of directions the player could take. Another piece that could be added into the future is an elevator or stairs to allow the player to go up and down as well as a 4 way junction and angled corners for more variance.
This ties in with the other consideration of being able to connect to each other, each section would ideally be able to easily snap to the next section, preventing gaps in the level. I decided to make each section a certain length, width and height that is rounded to the nearest meter allowing us to use the snapping tool in Unity to easily piece levels together.
There also needed to be variance throughout the level so the player would not feel like they are walking down the same corridor as well as to give ambience and that each area has it’s own unique touch. This will be covered more in the next sections but to do this, I can add pillars, pipes along the walls, posters and signs as well as various other lab styled objects you would expect to see.
Creating the corridor – Take 1
For creating the corridor, I used 3DS Max 2016 with the unit scale set to meters. This meant I could design it with real life proportions making it much easier when I used references and if I needed to visualise it with a tape measure.
When designing the first corridor, I quickly realised an issue in that we hasn’t set a height at which the player would be so I did not know how high to make the roofs. We decided to go for a round number of 2 meters for the players height and their eye level would be at 1.75m. This meant I could add a cylinder representing the player into the scene in 3DS MAX allowing me to have a rough idea of what it would look like.
To create the corridor shape itself, the basic shape was made by creating, positioning and rotating planes until they met our desired dimensions. The use of planes compared to boxes for walls was to reduce the number of vertices and polygons to improve performance. The slant at the top of the corridor was created by applying the Edit Poly modifier to the planes that form the wall then using the Slice Plane tool to add an extra edge along where the crease would be. The top vertices were then moved into position.
To save on time and prevent the need for duplicating work, the Symmetry modifier was then applied to the walls which does what the name suggests. The mirror gizmo was positioned in the middle of the corridor with the plane being parallel with the wall to create the desired mirror.
Extra, optional decoration for the corridors was also created which allows us to vary the corridors and break up the flat look. For this, there was the pillars and the pipes that ran along the sides.
For the pillars, the box modelling technique was used with faces being extruded as required as well as vertices and edges manipulated to follow the slant in the corridor. The chamfer modifier was also applied to the edges running up the pillar to create a slightly smoother look without being completely rounded.
The pipes were a cylinder with an Edit Poly modifier applied to it and the hidden polygons deleted. However compared to the other objects, all the polygons in the cylinder were added to the same smoothing group which creates the look that it is completely rounded. It achieves this by adjusting the normals of the vertices (which in this case defines how the light reflects off it) so that the new normal is the result of adding the two previous normals together. The previous normals are tangent to the faces they are used in so by combining them, it can make the faces appear smooth.
As we didn’t want our story to just be one straight line, the creation of corners needed to be created. To allow for the greatest number of combinations, a right angled corner as well as a T junction was created.
The creation of these corridors was very simple, working on top of the existing corridor and adjusting it as required. In some cases however, the normals on the faces were reversed causing them not to render from the desired angle. To solve this, the faces that was experiencing this issue were selected in Edit Poly then the Normals modifier was applied with the “Flip Normals” option checked.
Creating the Corridor – Take 2
After creating a basic level with the corridors, I noticed that it seemed a little too square and claustrophobic. To solve this, we went through a few different sizes of corridors but eventually settled on making the corridors 6 wide and 4 high, creating a more roomy feel.
Textures and lighting
The corridors themselves are somewhat a simple design however creating this design proved tricky to get right. One issue with going simplistic is that not enough detail can make it feel like you have been lazy or that something is busy. The trick is to add enough detail so its not plain and flat whilst not being distracting.
For this, a few different textures needed to be created. The textures on the walls are a flat, slightly off white colour with a black border around the bottom. This helps create a sense that the walls and floor don’t blend into one and offers a nice contrast between the two. The model and texture is UV mapped using a planar project so it does not look stretched and is the correct scale.
The ceiling texture is a little more different as it needs to be able to tile correctly (for joining multiple corridor sections together) as well as actually provide light. To create the base texture, Inkscape was used which is primarily used to create vector graphics but can export rasterized graphics too. A square tile was created then the Tiling tool was used to repeat it in Inkscape to create an even gap between each section. The middle section was then manually edited to create the larger light.
To make the texture emit light, a special emission map is created which is used by Unity to tell what part of the material emits light at what colour and intensity. Creating the map was simple as I used the base texture, turing the center into pure white (so maximum intensity with a white colour) and the rest black which Unity interprets as emitting no light. Then in the material in Unity, the map was assigned to the Emission and level was set to what was appropriate.
A downside of using emissive materials is that they only work with baked lighting. This does offer a performance improvement however it can take a long time to bake lighting on complex levels. Luckily in our case it would take generally only a few minutes to bake lighting.
Corridor T: Corridor T
Corridor Corner: Corridor Right Angle Corner