Tuesday 27 January 2015

Week 17: From Engine Polish and FPS Problems

Slow Progress - Container Walls

This week just felt like I managed to accomplish nothing at all, however looking back at it, I must admit that I did actually get quite a few things done. It's just not as obvious as it usually is. I left of last week with a change in idea and how I assembled the level and lit it up with torches. The main problem I encountered was an FPS issue at this point, which in return would take me a long time to fix. While it was mainly the PC that was the problem, I wanted the level to run smoothly even on weaker machines, so I decided to take some time and optimise my torches so that they would create less FPS-lag. I started by looking into the particles itself and trying to mess around with the settings so that it would spawn less particles (even though I only had quite a few to begin with), but at the same time making sure it still looks the same. Not much changed after quite a bit of messing around. I only got a very small boost in the FPS.

I then decided to step back and work on materials. A member of my group was supplying me with textures for the walls and it was my job to put them into engine and create the materials. I wanted to make sure, that the materials were customisable, to enable us to mess around with them and do quick changes as necessary. One example for this was that we wanted for the rust on the wall to be optional, so I used Linear Interpolates to blend textures together. In the end we decided to not use this feature though, as a level with rust all around seemed to give off a much better feel. We went through quite a lot of work in getting the rust to look believable, which was a lot harder than we first imagined. One of our first tries resulted in this:
Rusty Container Wall - Take 1.
As you can see the rust just looked a little out of place, which we later found out was caused by the fact that the rest of the wall was just too clean. Our original plan was to just have some walls with rust and some without, but in the end it just looked better with rust all around. We also decided that while it was nice to be able to customise the colour within my wall material, it created quite a few problems with certain colours just not looking great at all, so in the end we just stuck to making the walls white, with a slight greyish tone. We also added a lot of dirt to them, to make them look more worn off. In the end we came to this:
Final Rusty Container Wall.
Wall Texture.
... which I was quite happy with. We encountered a slight problem with seams appearing on certain parts of the texture, but we solved this by creating a patch of dirt and using it as a decal to cover up the seams, which worked like a charm. In the picture above you can also see the ground texture, which was also created by my group member. For the ceiling we decided to use the same material as the walls, as container ceilings usually have the same metal walls on the ceiling, too.

Solving the FPS Issue

Or at least finding a work around... I took quite some time this week on trying to get the level to run smoothly. I tried even creating LODs for the particles on my torches, which on the faster PCs boosted the FPS from 40 to 60 on a scene, however on other PCs the FPS were still just under 10. So in the end after trying nearly everything I decided to get rid of the lights that were being emitted by the particles and instead put a point light into the torch blueprint. I then used the blueprints timeline function to give the light a dynamic intensity and radius to create the torch flickering effect. In the end it didn't look as pretty as it did before, but at least now the FPS were at a more acceptable 24 instead of 9.

Torch Blueprint (Dynamic Light)
Here is also a picture of the final torch:
Torch.
I decided to end the tweaking at this stage though and will now focus on putting in all the assets into the scene. My group members have been hard at work over the past week and all the assets are finally done (I even managed to do a few myself!), however they still need to be unwrapped and textured, which is what we as a group will focus on for the upcoming week. Hopefully, we will be able to get everything done though, since most of the scripting and tweaking within the engine is pretty much done, thanks to my efforts from this week. This should save us some time and once the textures are done we just need to put them into the engine and everything should work just fine. Since there is a bit of confusion as to when our hand-in actually is, we are aiming to complete this project by Friday (instead of Monday), so hopefully in the next post I will be able to show off the rest of the level itself.

Stay tuned~

Tuesday 20 January 2015

Week 16: Change of Plans

Containers in the ground?

Plans do not always work out as intended and so did we encounter a slight problem with our original idea. Last week I introduced to you the new project that we are currently working on in groups of 4. Our original idea was to create our container city level underground inside a cave, however we quickly found out that this wouldn't be possible. The reason for that is that the brief states that the level has to be made out of containers, so while it technically would be possible to create our level the way we intended to, the style in which we planned on doing it just didn't work. We wanted our walls to be made out of bricks and/or stone, but why would anyone create stone walls inside a container?

So we decided to change our plans and while we are still keeping our level indoors, it is now located above the ground. After all, having containers buried in the ground or inside a cave just doesn't seem like a good idea either. We got rid of the whole crystal cave idea and our temple idea has been a lot more simplified. We will basically just keep to containers for the design of our level, but have some Aztec symbols spray painted onto the walls. The idea behind that is that after the apocalypse happened, a bunch of people brought back the original beliefs of the Aztecs and built themselves a base out of containers. The player will break into the base and has to get into the elevator which will lead him into the treasure room to steal the Aztec treasure. All of our other level elements are still in place (such as the key and the generator).

Getting some work done!

Unfortunately I didn't have much time to concentrate on concepts during this week. Instead I took on the task of creating the modular components that will make up most of the level. For that I started by taking our level floor plan and dividing the walls into panels. To do this I first thought about different sections and the different panels that I would need and sketched them on a paper. I then measured out the level and created another floor plan, showing all the component parts in their right places. I also drafted out my component sketches to make the whole thing a bit neater:
Modular Component Floor Plan
I then went into 3DS Max to create all of the required components. It was important at this stage, that the components had a seamless texture, so that I could put them together in any sort of way, without having seams all over the place. At the same time it was very important that the measurements were all correct, so I changed the units in 3DS Max to feet and fractional inches and changed the grid to show 1 inch at the time. I then used snapping to make sure all of the components would fit together perfectly. I also created a high poly version of the 10ft wall and baked it down into a normal map.

I was messing around quite a bit with the normal map and the low poly model until I had a decent looking wall and then used the same normal map on the rest of the components:
Modular Components with normal map.
Testing out the wall component in UE4.
I tested the wall in UE4 and created an instanced material that allows me to change the colours of the wall and border pattern very quickly and easily. After that I started assembling the level itself using my floor plan as a guide.

Once all the walls were in place we soon decided to do another change to the level. We wanted the area with the security room to be completely dark, so we thought that instead of having electrical lights, we could give the place some flame torches instead. The area with the security room would then have flame torches that had gone out and the player would have to go down to the locked generator room to pick up a flashlight. This meant, that the generator was only powering the elevator and we decided that it would be stupid to have it so far away, so I quickly redesigned the layout a bit to better suit our idea:
Modified floor plan.
Extending the stairs to go down 2 floors instead of 1.
Placing the generator directly under the elevator.

Scripting and Level Assembly

As you can see in the second screenshot, I also decided to get started with the blueprints we need for our level. I first created some simple torches, using particles for the flame and just a simple placeholder mesh, which I will change out later. The turned out pretty well and didn't take me much time to get ready. I then also created a blueprint for a door, complete with sounds and opening animation, as well as a variable which will check whether you have the key or not. I was going to do some work on the HUD to create the blueprint for the key, however I got asked to instead focus on creating assets so I went back into 3DS Max and created some very simple models for the ceiling and floor of the map.

I then completed assembling the level and placed torches all around the map to light it up. We then encountered a small problem with the player mesh getting lit up by the directional light, which we would need to create an outside area right at the start (with the entrance leading into the container complex). I solved this issue by creating a trigger around the indoor part of the level, which upon entering will turn off the directional light, leaving the torches to be the only light within the level. While I also scripted for the light to be turned back on when going back outside, we decided that once the player would enter the containers, we would look them inside by closing the door behind them.

Unfortunately after getting to this stage I was having some troubles with getting my level to run smoothly on the PCs that I was working on, which was most likely just because the PCs themselves were quite slow. (Our level itself is just made out of modular components, each having round about 150-200 tris and sharing a 512 texture sheet for the normal map, so I doubt the level itself is too resource demanding.)

Hopefully though I will get the level to run a bit smoother on a different PC and I will aim to get some screenshots up of the level as it currently is soon. Until then, stay tuned~

Tuesday 13 January 2015

Week 15: Welcome to 2015!

Catching-Up

First of all I'd like to start by wishing everyone a happy new year at this point. Hope you all made it well into 2015 and are looking forward to another exciting 12 months. The Christmas holidays (which covered week 12,13 and 14) are over and we are back at work with a new project: Container City!

Group Work

Just like our first real project (The Film Room Project), our new project is a group project; and just like with our first group project we were first assigned to find ourselves within groups of 4. Not again... Why can't they just assign us groups?! Guess I'll just have to keep hoping. Luckily this time I quickly got a group together and I am quite happy with my group members as well. Enough of the whole group talk, let's get into more details on the project itself!

Drafting Floor Plans

The Container City Project is an environment project in which we design and create a playable level, which is made out of containers. Whether indoors or outdoors is completely up to us and we have been granted a lot of freedom. When we first sat together as a group we weren't quite sure how to approach this project so we started off by brainstorming a couple of interesting elements that we wanted our level to have. Since the brief stated that we had to have at least 1 interactive element in our level, we quickly came up with the idea of having the player taking an elevator to finish the level. However, the elevator was to be out of power and thus the player would first need to turn on a generator, which would be found inside a locked room. To open said room the player would need a key, which it would get by climbing through a slightly hidden vent into another locked room.

We then drafted a quick floor plan and decided that we should all do a couple of floor plans each. So I sat down and created 3 floor plans myself. I was careful to stick to the original container dimensions so that my floor plans would all be up to scale:
Plan 1

Plan 2

Plan 3
After each of us had created their floor plans we sat together and chose 1 floor plan from each person that we then had to create a basic block out of in 3D. To do this I sat down and created a set of building blocks which used the shipping container measurements that we had been provided with. When we then sat down to review those block outs, I had an idea of merging 2 of my other team members block outs together, with which the rest of my group agreed with:
Final Floor Plan
Having finished the floor plans I then took up the role of creating the final floor plan as a basic block out in 3D, which was easy since I used my team members' block outs as a base to work from.

Themes?

We then had one major problem left and that was deciding on a theme for our level. No playable level is appealing if it's made out of bland blocks, so we decided to brainstorm some ideas. We decided early on that our level was going to be underground, so we thought of possible things you could have underground. Like prisons, vaults, temples, etc. We then assigned a couple of those themes each between us and created moodboards. I had been assigned with "Prison" and "Laboratory" and soon went to research some pictures for my moodboards.
Laboratory Moodboard

Prison Moodboard
We then fed back on each others' moodboards and soon decided to make our theme an "excavation site based inside a temple that was discovered in a series of crystal caves."

Concepting!

The next step was to start coming up with some concepts. To do this we decided to use screenshots from our block out and sketch/photobash over them. We quickly discovered a problem however: How were we going to stick to our theme, but at the same time make the whole level out of containers?

So this is the stage we are currently stuck at and we are having another talk with the tutors tomorrow to see how we can resolve/work around this issue. I will update this blog next week and hopefully be able to show off some concepts so stay tuned~