Saturday, 10 March 2012

Interactive Narrative

Initial brainstorming:

When we had the very first lecture on angles and perspective I was faced with a dilemma already, how can I take this style of project and transfer it into a 3d based project? I have had no past experience with character design/modelling and I have always been more interested in the environment side of things. Due to these complications i was thinking of a number of options.

1. Model an environment and save screenshots of certain angles, then use programs like Iweb and photoshop to add slides accordingly. And then trace over all images in 2d.

2. Model everything in maya and take renders straight from the program

3. Use the Unreal development kit and make an interactive environment instead of a point and click one.

Due to just how much I would learn from doing so, I decided to go with the third option. To make a fully interactive environment and make the decisions and outcomes occur in realtime. This way, I can model a full 3D environment that the player can move around in for the first time. And i can make use of sound effects/ambience and voice manipulation to achieve the same result as 2D students can also achieve.

Starting the project:

As this would be my first time ever using the Unreal development kit, I decided that story was not going to be the main drive for me to finish. It was more that i could make an environment that seemed viable. And not sloppy. As I'm not experienced in making characters I knew that anything that a story could be based around in terms of character development would be impossible.

My best bet would be to make an environment that would speak to the player instead, this way instructions could be slightly more simple. And i could play on more traditional 3d gameplay.

I settled for the basic story of the player being inside a base, and the goal is to escape the base and not get killed in the process. This style of mainstream story would help make my first environment develop, Going for a completely original look/feel was not what i wanted. I wanted to make an environment that felt familiar and traditional. The narrative would come into play via a radio, this radio would talk to the player and give them instructions from the get go.

The narrative ends when the player escapes the base. The game restarts when the player dies by going into the wrong room/activating the wrong object.

Making the environment:


First things first I wrote a list of objects I would need to model in maya ready to export into udk, these would be small time assets like crates, pipes, lights etc. and more significant objects would be computers, doors etc.

I wanted the base to feel industrial, so everything would need to look dirty and worn. With these things in mind i sketched up some very quick overviews of what i would want my rooms to look like. I knew that I wouldn't have time to make a large building, and that it was far more realistic to base this project around a few smaller rooms that were connected to each other. This way the level could progress in stages, such as level 1 would be the first room. When the player makes the right choice, they would then move onto the second room and decide the ending from there.

Using sketchbook pro I sketched some top down views and sketches of what the rooms could look like.


After some other sketches i decided to base this environment around two main rooms, and a few smaller rooms that make the decisions come into play. The first room would have two doors, one would let you advance, the other would result in your death. The second room would be attached via a corridor, for detail and appearance there could be a blown out section on the wall of the corridor, and the player would be able to see trees on the outside. The second room would have a door that wouldn't open, and a room with two objects to interact with, one would open the door to let you escape, and the other would kill you.

Starting on the models:
Due to complications with where I'm living at the moment, I had to receive an extension of my deadline for this project. This meant that I had 2 weeks to have my assets modeled and my environment ready to go. Obviously this was extremely worrying, not only because what I had planned will take a considerable amount of time to finish, but to have something I was happy with in that time would be very difficult. Especially as I had never used UDK before this project began.

Due to being on an extreme time limit I would not have time to make any of my assets next gen looking with use of normals and other maps, the details in the assets would have to lie within the texture maps and that was it, using a very useful website called www.CGtextures.com I was able to get all of the free textures I needed, I then edited them all in photoshop accordingly when my maya models were successfully UV'd.

Smaller objects such as levers and computer screens didn't take a large amount of time to finish, however larger objects like the computer unit took considerably longer. I personally found it difficult to make a computer that could look interesting and could be detailed via texturing, but didn't look over bland and blocky. As the idea was to try and make every object look interesting. Especially due to the meshes i make having to have as little poly's as possible so that my level would run smoothly.

Here is a small collection of assets i modeled for the environment, ready to export into udk.


Originally I had two objects ready to export into udk and had already been uv'd and exported. However when I tried to use UDK with them in the scene, the level wouldn't run smoothly at all, this was due to their high poly count. Although they looked decent and detailed. They would make the level suffer because of it. Having taken an extremely long time to model and UV it was a big shame for them to go to waste. But this is the price I payed for trying to use a high poly mesh in a game engine.

For reference, these were the objects that i described.



For the purpose of the game engine running better, it would be far better to texture in details on objects like these. Modeling things like bolts and screws is a bad idea when there is such little time to get everything finished.

Working with UDK:

It seemed like most of the time spent was on tutorials, and not necessarily putting everything in game. Every object i made in maya had to be exprted in the FBX format, and would need to be placed in a folder a created within the content folder. The folder layout i made was as follows.

Interactive narrative:

static_meshes
texture_samples
sound_effects
packages
maps

Everything would need to be placed into these folder before being exported into UDK, all meshes had to be FBX format. All UV maps or textures needed to be TGA format. And all sound effects would need to be WAV format.

From there, every time an asset was brought into UDK, it would need to be placed in a packages folder created upon import, or a respected folder created earlier by a similar object. This was the first problem i had when putting my level together, when it came to placing in objects outside of the program I would have a serious problem. Because I didn't know about using packages, and saving them once things were imported. I would close the program down after a days work, come back to it the next day and every object would disappear.

It was when i asked one of my piers for advice i realized what i was doing wrong, once i started saving the packages every time i made a change I was able to continue the level without issue.

The first thing I did when constructing my level was block it out using the builder brush, I would make a room according to the grid size first, then i would put myself in the map to change the size of rooms accordingly, eyeballing the construction of the building worked fine for me. Although I'm certain I should do another method next time, after receiving a lecture from Crytek UK I'm well aware they don't use the build brush for environments by the end of the levels development. However due to the time constraint I didn't have time to make the entire level in maya first. Although My assets were created with a cube built to a human size first, for reference.

Once the entire level was blocked out, the next step was to add texture. As i had no environment textures ready I used the preset materials within the content browser. Then when a material was added to the walls/floors/ceiling i used f5 to go into the material properties tool. From there i was able to stop the material from tiling.

Once the material was re-sized, I was able to use the texture manipulation tool to re-position where the textures were. Originally when the material was applied, they were crooked in certain places. Fortunately the re-alignment tool allowed me to fix it and make it look a lot more presentable.

Adding in my own materials/textures was a lot more complicated than i originally thought. Unlike simply importing in static meshes, importing textures that can be applied to your meshes is slightly different. Once the texture is imported, you have to make a material out of it separately. Using the material edit tool you can take your 2d texture and connect the image to the diffuse section of the editor. From there, it's simply a matter of saving your changes and then you can apply the material to your meshes.

You must do something similar when you want to import sound effects, once you import in your sound effects. You have to make a sound cue afterwards, without it, your sound won't be recognized when you try to add it to a kismet sequence.


On the topic of kismet, that was a challenge for me to learn about, especially as i have no scripting experience prior. It seems that every time an event or anything for that matter is set to happen, it must be done via kismet. Making things such as doors opening is very simple once you get your head around it. If you want to make an object move, you must convert it from a static mesh into a mover. From there you must bring up kismet. Create a new matinee, a matinee is a sound effect/animation/camera angle etc.

By using keyframes you can make the animations in engine, and not have to do it all in maya/max first. From there it's a matter of connecting your events together using triggers.

Kismet can be used to create a number of events, here are some different situations i have set in my level.


Using triggers:



Triggers are vital in UDK, they are the key to making events take place, whether it's a door opening, a sound playing or even things such as a player death. They are created by right clicking your scene, and selecting Add actor > trigger, From there use f4 to go into the properties and change the size accordingly. Using kismet, you can then link matinee's to your triggers. If you set your trigger to "touch" the event will take place the very second the player enters the trigger area. If you set it to "used" the players will only activate the trigger by pressing the "E" key whilst in the trigger area. This key can be changed, but I didn't change it for my level.

I found triggers to be especially useful as you can trigger multiple events at the same time from the same trigger, from my experience so far it seems you still have to make a new matinee for them separately, even though they're happening at the same time. I tried to mix a camera animation with a sound effect and when i played it to test, I ran into some issues. Then i put them in different matinee's and everything worked fine.

An issue i also had was the "used" key having inconsistencies when linked to a console command, the command was set to restart the player back at the beginning, the reason for this is so the player can restart when he/she dies by making a bad decision. However when i layed the trigger over the trigger that makes the camera animation for the players death the "E" key wouldn't return the player back to the start. I had to remove the camera animation altogether. This annoyed me personally, as I was happy with how the animation turned out, and set a clear signal that the player was dead.

Collision meshes:

The best way to do collision meshes is to make the in maya first, you name them a certain way alongside your model, and then when it imports into udk it will attach as a collision mesh automatically. The player will not be able to go through whatever shape you created. When i first brought my static meshes in, they did not have any collisions. So at the start, the player was able to simply walk through everything. But because i had imported all my meshes before creating collision meshes alongside them in maya i decided to just make them in engine.

This was done by opening up the object properties in the content browser and using the auto convex collision tool. This is no way the advised way to make collisions, but as a small tool that i could use to make collisions without having to re-import everything i decided it was the best thing to do. 


Narrative within UDK:

Once everything was in place, it was time to add in all of my narrative style sound effects/subtitles into my level. My original plan was to use subtitles alongside the sound effect of a radio turning on when the player entered each room. However subtitles are a lot more hassle than i originally thought. To use subtitles for my level, i had to create them in adobe flash first. Then publish it into the "flash" folder within the "UDKgame" folder. Then trigger it to play GF movie at the desired point. However i could never figure out a way to make the subtitles then disappear, this is mainly because i's mainly used to make hud elements as opposed to subtitles. but it was the best i could do given the situation i was in.  So instead of using it for subtitles, i decided to use it as a small instruction on the top left hand side of the screen.

My alternative choice was to record my own voices and use them in game instead. I used audacity to record voice clips that my brother recorded for me. From there, i made a set of changes via a tutorial i found on www.youtube.com and made him sound robotic. This was able to replicate the sound effect of an automated machine speaking from the radio in the corner of every room. This personally added to it better than subtitles could in my opinion. It makes the narrative a lot more interesting.

Skybox and nature:




Adding a skybox in UDK was very easy, it was a simple matter of picking one from the content browser and dragging it onto my scene. The trees that are outside the base are preset within udk, I was originally planning to use speedtree to make my own, but again, due to time. I did not have time to add my own tress, this is something i regret as i was really looking forward to using my own tress in my first level.

Since this picture was taken i have tweaked with the lighting within the level so the center f the trees aren't bright any more. They show up as black silhouettes, which makes the outside look more isolated and in the background.

Personal thoughts:

As a whole, I'm happy with how my first level turned out. I'm disappointed i couldn't do more due to time reasons. And due to complications whilst making it, I had to leave some stuff out/make changes i didn't necessarily want to make. But so long as the main goal was achieved then that's all that matters. I'm not worrying about what grade I'll receive for this project, because I went into it knowing I wanted to use UDK for it. And due to how much I've managed to learn from this past few weeks I can rest easy knowing I've achieved my personal goal.

My next goal will be to place in some more detailed assets into UDK, ones that utilize maps such as normals. Something i was not able to do this time round.

Sound effects were gathered from www.freesfx.co.uk
textures were gathered from www.cgtextures.com

No comments:

Post a Comment